builder_composeCombine two or more existing condition cards into one logical card (AND/OR/NOT/sequence).
Area
Strategy Builder
Group
Authoring
Access
Write
Risk
May change server state
Details
Full description
Details
Combine multiple existing condition cards into one logical card. Call after creating two or more conditions with builder_add_condition when you need AND / OR / NOT logic, an N-of-M counter, a consecutive-bar requirement, or an ordered sequence. Returns a new card_id you can pass to builder_attach or compose further.
Modes
allOf— all children true on the same bar (AND)anyOf— at least one child true (OR)not— invert a single childat_least— N-of-M children true (requiresmin_true)consecutive— child true formin_truebars withinwindow_barssequence— ordered steps (requires astepspayload)
Parameter aliases: mode/combinator and condition_ids/card_ids are interchangeable — pass exactly one of each pair.
builder_compose(strategy_id, mode="allOf", condition_ids=[rsi_card_id, ema_card_id])
Operates on
Builder objects this tool reads or produces, linked to their reference pages.
Capabilities
Bounded options and operating modes surfaced above the full JSON schema.
Composition modes
mode
allOfanyOfnotat_leastconsecutivesequenceRequired Inputs
strategy_idstringStrategy IDOptional Inputs
card_idsanyOf (2 variants)Alias for `condition_ids`. Pass one of `condition_ids` or `card_ids`.combinatoranyOf (2 variants)Alias for `mode`. Pass one of `mode` or `combinator`.condition_idsanyOf (2 variants)Card IDs to compose. Alias: `card_ids`.min_trueanyOf (2 variants)Required for consecutive (min bars true) and at_least (min conditions true). Ignored otherwise.modeanyOf (2 variants)Combinator: allOf (AND), anyOf (OR), not, at_least (N-of-M), consecutive (N bars), sequence (ordered steps). Alias: `combinator`.sequence_idanyOf (2 variants)sequence: optional explicit id for the SequenceCondition. Required when any SequenceStepSignalRef targets this sequence. Must be unique within the strategy.stepsanyOf (2 variants)sequence: ordered step dicts [{"condition_id": "<card_id>", "within_bars": <int|null>, "hold_bars": <int|null>, "id": "<step_id|null>"}]. Step `id` is required when the step's matched bar will be referenced via a SequenceStepSignalRef (e.g. a retest stop). This MCP builder surface does not accept raw SequenceStep StateOp fields such as `on_enter` or `on_bar`; those remain raw-IR-only until a dedicated state operation builder API exists.strictbooleanconsecutive: if true bars must be consecutive, if false any N-of-M in windowwindow_barsanyOf (2 variants)Required for consecutive: rolling window size in bars. Ignored otherwise.