Back to MCP catalog
edit_strategy

Atomically edit authored document paths with an expected version.

Area

Strategy Builder

Group

Editing & management

Access

Write

Risk

Destructive

Details

Full description

Atomically set authored JSON Pointer paths at expected_version.

Edit value definitions at /values/<id>/source or /name; null removes an unreferenced definition. Sources can contain named_value by name or id. Read get_strategy for conditions and values keyed by id and ordered rules addressed by rule_id. Omitted sections stay unchanged. Nonempty objects replace whole; field edits preserve siblings. An empty configuration section {} is refused: choose a variant with its declared fields, or use null to clear execution, position_policy, risk_policy or allocation. Explicit defaults stay stored configurations, distinct from absence. Clearing restores implicit market/gtc execution, single-position behavior without entry limits, no daily-loss breaker with the default 30% short-equity floor, or unset allocation (required on a basket), respectively. Null removes a keyed child or clears a nullable field; a property's null keeps that property's meaning. Empty batches and overlapping paths are refused. Sizing switches require the new mode's value and refuse supplied inactive fields. Remove referring rules with their condition in either order. Refuse remaining references, unknown paths and invalid results without writing. Sizing cannot be cleared (sizing_required). Returns field changes including derived effects, the stored name, any name-normalization warning, and the edited document's readiness. Read include=["paths"] for the generated editable slots, accepted kinds and consumer restrictions.

Examples (c = definition id, r = rule id; use the latest version): Add an anchor and reference it in c:

[{"path":"/anchors/open","value":{"source":{"kind":"bar_index","bar_index":0}}},{"path":"/conditions/c/source/right","value":{"kind":"anchor","anchor_id":"open","anchor_field":"close"}}]

Change c's threshold:

[{"path":"/conditions/c/source/right","value":105}]

Remove c and its referring r in one batch:

[{"path":"/conditions/c","value":null},{"path":"/rules/r","value":null}]

Rules keep creation order. Equal-priority predicate exits use that order for same-bar ties. Standing stops/targets have separate fill precedence. There is no reorder operation: remove r, then add_rule(definition_id=c, role="exit") to append it again:

[{"path":"/rules/r","value":null}]

Capabilities

Bounded options and operating modes surfaced above the full JSON schema.

No bounded capability options are declared for this tool.

Required Inputs

changesarray<DocumentChangeInput>Ordered path/value changes applied together as one edit: each path is a JSON Pointer into the strategy document, and a null value removes a keyed child or clears a nullable field.
expected_versionintegerLatest returned version; get_strategy reads the initial version. Stale edits are refused
strategy_idstringID of the strategy to edit.

Optional Inputs

None.
Quawd

A subscription SaaS platform for designing, backtesting, and paper-trading algorithmic trading strategies on equities and crypto — described in plain English to an AI agent, no code required.

© 2026 Quawd. All rights reserved.

Quawd is a software tool, not a broker-dealer or investment adviser, and does not provide investment advice. Trading involves substantial risk of loss. Backtested and hypothetical results have inherent limitations and are not indicative of future performance.