Skip to main content
Glama

Backtest Job Status

tt_backtest_status
Read-onlyIdempotent

Check a backtest's completion and fetch what its engine returns.

A job_id need not come from the user: tt_list_backtests returns every run in their account with its job_id already attached.

Call this after tt_backtest_strategy. A backtest takes ~10-75s; if it's not finished yet this returns state 'queued'/'running', so poll it after a short beat. THE SHAPE DEPENDS ON WHICH ENGINE SERVED THE RUN (the response's engine field says which):

  • engine 'tradetron-fleet' (job ids 'ttbt-…' — the normal path since 2026-08-25): completion + report_url ONLY. You may also pass the BARE backtest id the user reads off their Tradetron report page or the trades-CSV filename (e.g. 10053270260902); it is normalised onto this route, so a run started on the website is reachable too. The numbers live on the public per-run report page; this response carries NO results block, csv_url or raw payload — present report_url and read the numbers there, never invent a P&L figure here. To READ the run without a browser (any chat channel, or the ttmcp CLI), call tt_backtest_trades with its job_id: that returns the fills plus a summary computed over all of them.

  • engine 'btengine' (16-hex job ids — sweeps and non-default-knob runs): done => {summary_md, results:{net_pnl, roi_pct, max_drawdown, charges, trading_days, fills, currency, ...}, report_url, csv_url}, plus raw (the untouched btengine payload).

  • failed (either engine): {done: True, failed: True, error, summary_md (incl. auto-refund note)}.

  • not_found: Tradetron is returning no record for this id — it is wrong, or the run belongs to another account. TERMINAL: do not poll again, ask the user to re-check the id on their Backtests page.

  • unavailable: the status could NOT be read. This is NOT evidence the run is progressing — never report it as "still running". Retry once, then send the user to their Backtests page.

RELAY summary_md verbatim (it's unit- and currency-correct — crypto is USD, not ₹). Then add the report_url as a clickable link. If the submit charged the user (the tt_backtest_strategy billing block), remind them of that charge in the same message, quoting the submit's own value (never a hardcoded figure); on a failed run, the fee auto-refunds — say so.

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_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare read-only/idempotent/non-destructive; the description adds far more: latency, polling semantics, engine-dependent response shapes, terminal vs. retryable failure states, and billing/auto-refund behavior tied to tt_backtest_strategy's billing block. It also warns against fabricating a P&L figure for the fleet engine, which is exactly the kind of behavioral guardrail annotations cannot express.

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 prerequisites, then cleanly grouped by engine and terminal state. It is longer than ideal and the report_url/P&L warning is restated across two paragraphs, but nearly every sentence earns its place as operational instruction.

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?

With no output schema and only one undocumented parameter, the description compensates fully by enumerating return shapes per engine, the failed and not_found/unavailable outcomes, and the required relay behavior for summary_md and report_url. An agent has everything needed to call it and correctly interpret every response state.

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

Parameters5/5

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

Schema description coverage is 0% for the single required job_id, so the description carries the full burden and does: it explains that job_id may come from tt_list_backtests, may be a 'ttbt-…' or 16-hex id, or may be a bare backtest id read off the report page or trades-CSV filename, which is normalised onto this route. No syntax or format ambiguity remains.

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?

The description opens with a specific verb and resource ('Check a backtest's completion and fetch what its engine returns') and immediately distinguishes itself from siblings: tt_list_backtests for finding job ids, tt_backtest_strategy as the predecessor, and tt_backtest_trades for reading fills without a browser. An agent can select this tool over the alternatives 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?

It states explicit prerequisites ('Call this after tt_backtest_strategy'), timing expectations (~10-75s with a short-beat poll), and named alternatives for overlapping goals (tt_backtest_trades). It also gives negative guidance for the not_found ('TERMINAL: do not poll again') and unavailable ('never report it as "still running"... retry once, then send the user to their Backtests page') cases.

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