Skip to main content
Glama

Backtest Result

tt_backtest_result
Read-onlyIdempotent

A finished backtest's NUMBERS — the figures from its own report, as data.

THIS IS FREE. It reads a run the user has already paid for; no engine runs and nothing is charged, however many times it is called. Slice the same run as often as the question needs.

Use it the moment tt_backtest_status says done. tt_backtest_status returns a report_url and no figures, on purpose; this is how you read them without a browser. tt_backtest_trades remains the way to page raw FILLS — this gives you the analysis over them.

Sections (ask by name; the default set is the cheap ones): headline meta costs weekday drawdowns monthly exit_attribution concentration trade_stats setwise stats_table <- default series sub_windows grade timing distribution underwater regime rom benchmark walk_forward montecarlo quality trades positions sets underlyingwise

underlyingwise is P&L, trades and ROI PER UNDERLYING — the same split the report page renders under BREAKDOWNS -> Underlying-wise. Ask for it on any multi-instrument book: the default response announces it in section_notes.underlyingwise when the run holds more than one. Do not re-derive it by paging trades.

sub_windows is summarised by default — six trailing windows are six COMPLETE nested results (measured: 91 KB on a 42-trade run). Each block names what was dropped under _omitted, and section_notes reports approx_chars. Pass caps={"sub_windows_full": true} for the whole blocks.

THREE THINGS THIS DELIBERATELY DOES NOT DO, and you must respect them:

  1. caveats[] is not decoration. Each entry names, in affects, the metric keys it taints. Read it BEFORE quoting any figure. Never present a run carrying a high-severity caveat as evidence of an edge.

  2. A risk-adjusted figure the book cannot support is ABSENT, not zero — see section_notes.headline_withheld for which and why. Do not fill the gap from the report page, and do not estimate it.

  3. section_notes.<name>.basis says whether a section is gross or net. The headline is net; Monte Carlo, PSR, timing and distribution are gross. Never put a net figure and a gross one in the same sentence without saying so.

A section marked single_trial (montecarlo, quality/PSR) assumes ONE backtest was run. After comparing variants it reads high by construction and is not a probability that the strategy works. Say that, or omit it.

Args: job_id: 'ttbt-...' or a bt_id from tt_list_backtests. sections: section names; omit for the default set. caps: per-section row caps, e.g. {"trades": 200}; plus {"sub_windows_full": true} to unsummarise the trailing windows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "job_id": "<job_id>"
    },
    "name": "tt_backtest_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
capsNoOverride a section's row cap, e.g. {"trades": 200}. Raise only when you genuinely need the rows: `trades` is ~56k tokens in full. {"sub_windows_full": true} returns each trailing window's complete nested result instead of its summary.
job_idYesThe run's job_id from tt_backtest_strategy ('ttbt-...') or its bt_id from tt_list_backtests.
sectionsNoWhich parts to return. Omit for the default set, which answers most questions in ~2,400 tokens. Ask for more by name — see `available_sections` in any response.

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?

Annotations already cover safety (readOnly/idempotent/non-destructive), but the description adds substantial context the annotations cannot: it is free and repeatable, sections are chunked with a cheap default set (~2,400 tokens), `caveats[].affects` taints specific metrics, risk-adjusted figures are absent rather than zero (`headline_withheld`), and sections carry a gross/net `basis`. That is exactly the kind of disclosure that changes how an agent reports results.

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 cost, then structured into sections, caveats, and args. It is long (~450 words) and some emphasis (ALL-CAPS 'THIS IS FREE', 'DELIBERATELY DOES NOT DO') is heavier than needed, but nearly every line carries a distinct behavioral rule rather than restating the schema.

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?

For a read-only aggregator with no output schema, the description covers what an agent needs to call it correctly and to report honestly: default section set, cost profile, caveat handling, gross/net labeling, single_trial caveats, and the withheld-metric convention. Nothing material 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, but the description adds real meaning: it enumerates the full section vocabulary and marks the default subset, explains `caps={"sub_windows_full": true}` as an unsummarising switch, and gives the job_id provenance ('ttbt-...' or bt_id from tt_list_backtests). Only the row-cap numeric semantics are left mostly to the schema.

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?

States a specific verb+resource ('a finished backtest's NUMBERS ... as data') and immediately distinguishes itself from two siblings: tt_backtest_status 'returns a report_url and no figures, on purpose' and tt_backtest_trades 'remains the way to page raw FILLS'. An agent can pick this tool without opening any 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?

Gives an explicit trigger ('Use it the moment tt_backtest_status says done'), explicit alternatives for related needs (raw fills via tt_backtest_trades), and explicit guidance on when to request the expensive `underlyingwise` and `sub_windows` sections. Exclusions and routing are both present.

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.

Resources