Skip to main content
Glama

run_backtest

Start a backtest of one saved strategy over a window of history. Takes a strategy_id -- it reads the stored strategy's own rules, asset, timeframe and risk parameters. The recorded market is the default; pass quote_token and/or market_data_venue when the person chooses another quote or execution venue. An omitted choice keeps its recorded value. Check and report the selected market; never silently substitute a feed. IT RETURNS A SUBMISSION, NOT A RESULT: a real backtest takes minutes, so this hands back the run's id and the config it will use, and the metrics arrive on their own once the engine finishes. Tell the person it is running; do not call this again for the same question, and do not wait. It consumes a unit of the user's monthly backtest allowance at submission -- so it CHECKS THE STRATEGY FIRST, and a refusal costs nothing: a problem (verify_strategy's problems) always refuses, and a signal parameter still at its library default refuses until you either save chosen values or pass acknowledge_defaults=true to stand by the defaults deliberately. One (strategy, window) is ONE measurement: submitting the same strategy over the same dates again is refused and the existing run named -- read that with get_backtest instead. Both start_date and end_date are required: name the days, so the same question asked next week gives the same answer. Every message carries the current time, so work them out from that.

[Access: pay 0.10 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
end_dateYesISO end of the window.
start_dateYesISO start of the window, e.g. 2026-01-01.
quote_tokenNoQuote currency of the requested market.
strategy_idYesThe strategy's UUID.
engine_generationNoOnly set when the person specifies an engine generation; omitted uses latest.
market_data_venueNoExact venue of the requested market.
acknowledge_defaultsNoPass True to submit even though signal parameters are at their library defaults -- an explicit statement that the defaults were considered and stood by, never a way to skip considering them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses async submission semantics, that it consumes a unit of the monthly allowance at submission, that refusal is free, that duplicate (strategy, window) is refused and the existing run named, and the acknowledge_defaults gate. It also discloses payment/access paths (x402 vs API key), which is behavioral context an agent needs before calling.

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?

Front-loaded with purpose and return-shape before caveats, and nearly every sentence carries a distinct constraint. It is dense and long, but the length is earned by the number of refusal modes; a slight tightening of the allowance/verify paragraph would help readability without losing content.

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

Completeness5/5

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

Given 7 parameters, no output schema, and no annotations, the description supplies everything needed: the return shape (run id + config, metrics arrive later), refusal conditions, cost, duplicate handling, and the required-date rationale. Nothing an agent needs to invoke it correctly is missing.

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 100%, so the baseline is 3; the description still adds real meaning beyond the schema — omitted quote_token/market_data_venue keeps the recorded value, both dates are required 'so the same question asked next week gives the same answer', and acknowledge_defaults is framed as deliberate consent, not a skip. It does not add format detail for dates or UUIDs, which the schema already handles.

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

Purpose5/5

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

Opens with a specific verb+resource ('Start a backtest of one saved strategy over a window of history') and immediately distinguishes itself from result-reading siblings by stating 'IT RETURNS A SUBMISSION, NOT A RESULT' and pointing at get_backtest. An agent can separate this from list_backtests and get_backtest without opening a schema.

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

Usage Guidelines5/5

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

Explicit when-to-use (user wants a new measurement), when-not (do not call again for the same question, do not wait, duplicate window is refused — use get_backtest), and prerequisite routing (verify_strategy problems always refuse). Alternatives and failure conditions are named rather than left to inference.

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.