Skip to main content
Glama

save_strategy

To promote a sweep pick, pass source_experiment_id and source_run_index; the service loads its authorized configuration and checks coverage before saving. Its recorded venue and quote token are defaults: pass market_data_venue and/or quote_token only when the person chooses a different market. Otherwise compose and save a trading strategy from signals in the library. Give it a strategy_name, an asset, and the entry and exit signals you chose -- each one {name, params?, timeframe?}, with params defaulting from the library when omitted. DO NOT pass a signal's role: TRIGGER and FILTER are read from the library, and an entry must resolve to exactly one TRIGGER plus any number of FILTERs. Find real signal names with query_knowledge first; never invent one. The server checks the entry against the current market regime itself -- a strategy composed against the wrong regime is refused, and telling the person why is a better answer than saving it anyway. Pass constraints ONLY for values the person actually stated: they are kept exactly as given, while everything else comes from canon. Saving the same strategy twice returns the first one rather than making a duplicate, and says so in created. What you save is a DRAFT: not tradeable until a backtest of it meets the platform's threshold spec, and it leaves draft on its own when one does.

[Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

Input Schema

NameRequiredDescriptionDefault
assetYesAsset symbol, e.g. BTC or ETH.
constraintsNoExecution values the person stated, e.g. {"max_risk_per_trade": 0.01}. Each is kept exactly as given rather than nudged.
quote_tokenNoQuote currency of the requested market.
exit_signalsNoThe signals that close one, same shape. A strategy may have none, and then it exits on risk rules alone.
entry_signalsNoThe signals that open a position. Exactly one must be a TRIGGER in the knowledge graph; the rest are FILTERs.
strategy_nameYesWhat to call it, in plain words a person reads -- the entry trigger's friendly_name from the knowledge graph, then the asset and timeframe, e.g. "Upside Range Breakout - BTC 1h". Never a code name such as btc_strategy or bb_upper_breakout.
regime_overrideNoSave anyway when the regime check refuses. Only ever on the person's explicit say-so, after they have been told why.
regime_directionNoThe direction band from get_market_regime, e.g. bear. The signal searches filter by it and find_sweep_runs marks each row's regime_fit with it; save_strategy and update_strategy read the current band themselves, so their check runs without it.
source_run_indexNoThe selected sweep row, including zero.
market_data_venueNoExact venue of the requested market.
source_config_hashNoThe selected row's config_hash, as find_sweep_runs reported it. Pass it with the other two: a relaunched sweep can give one run_index to several runs, and without it such an index is refused.
source_experiment_idNoFor a sweep pick, its experiment ID. Supply with source_run_index. The stored run supplies the exact signals and execution settings. With no market given, it saves on the run's corpus market, or on the same venue's execution quote when the corpus quote is not one (Binance USDT saves as Binance USDC).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and does so thoroughly: it explains regime refusal behavior, default venue/quote-token handling, exact retention of constraints, duplicate-save idempotency, and the draft lifecycle until a qualifying backtest. The x402/API-key access note adds payment context that an agent otherwise would not know.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but justified by a complex 12-parameter tool with two save modes and several refusal/default rules. It is mostly front-loaded and every sentence adds operational value, though the dense paragraph could be structured more clearly for faster scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex mutation tool with no annotations and no output schema, the description is impressively complete on invocation rules, refusals, defaults, idempotency, and draft status. The main gap is that it does not fully describe the return payload beyond mentioning the created indicator.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds meaningful cross-parameter semantics: source_experiment_id and source_run_index trigger the sweep-loading path, market_data_venue and quote_token are defaults from the recorded run, and entry signals must resolve to exactly one TRIGGER plus FILTERs. It does not cover every parameter narratively, notably source_config_hash, but the schema does.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific action (save a strategy) and clearly separates two modes: promoting a sweep pick versus composing from library signals. It is very clear about what is being created, but it does not explicitly distinguish itself from sibling tools such as update_strategy or build_strategy_for_regime.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives strong when/when-not guidance: use source_experiment_id and source_run_index for sweep picks, otherwise compose from signals; do not pass signal roles; pass constraints only when stated; use regime_override only with explicit consent. It also directs the agent to query_knowledge for real signal names, though it does not compare itself to save-adjacent siblings like update_strategy.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.