Skip to main content
Glama

Backtest Trades

tt_backtest_trades
Read-onlyIdempotent

What a finished backtest actually TRADED — its fills, summarised over the whole run and returned one readable page at a time. AUTH-REQUIRED.

Answers the question tt_backtest_status cannot: that tool returns completion and a report_url, and on a Tradetron-fleet run the numbers live only on that web page. A client that cannot open a browser (any of the chat channels, or pip install ttmcp) could run a backtest and never read it. Call this after tt_backtest_status says the run is done, or on any bt_id from tt_list_backtests.

Returns: summary computed over EVERY fill: fills, buys, sells, instruments, first_fill/last_fill, and net_pnl WHEN the run's fills carry a P&L column (net_pnl_column names which one). A figure that is ABSENT was not in the data — say so and point at report_url rather than deriving one. trades one page of fill rows (count, offset, has_more, next_offset). Never ask for everything: one run in the QA set carried 9,823 fills. csv_url / report_url when Tradetron returns them.

A run with no fills is a RESULT, not a failure — the entry conditions never triggered in that window; the response says so in note.

Args: job_id: 'ttbt-...' from tt_backtest_strategy, or a bt_id from tt_list_backtests. A 16-hex btengine job id is rejected with a pointer back to tt_backtest_status, which already carries that engine's own results block and csv_url. limit: trade rows per page (default 25, max 200). offset: trade rows to skip.

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

Input Schema

NameRequiredDescriptionDefault
limitNoTrade rows to return. Default 25, max 200.
job_idYesThe run's job_id from tt_backtest_strategy ('ttbt-...') or its bt_id from tt_list_backtests.
offsetNoTrade rows to skip, for paging. Default 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well past annotations (readOnly/idempotent/closed-world) by disclosing AUTH-REQUIRED, the 16-hex btengine id rejection with a pointer to tt_backtest_status, paging shape (count/offset/has_more/next_offset), and that a no-fill run is a RESULT signalled in `note` rather than an error. Also warns that an absent net_pnl must not be derived. The browser/chat-channel framing is context rather than behavior, but the substantive disclosures are unusually strong.

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 the core statement and structured into Returns / Args sections, which is easy to scan. Some prose is expendable — the aside about chat channels and `pip install ttmcp` motivating why the tool exists could be one clause instead of two sentences.

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 tool with no output schema, the description fully documents the return surface (summary fields, which column net_pnl comes from, page envelope, csv_url/report_url) and the no-fills case. Nothing an agent needs to call or interpret 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 baseline is 3; the description adds real meaning beyond the schema — the accepted job_id formats, plus the rejection rule for 16-hex engine ids that the schema never mentions. Limit/offset are restated with defaults and the max-200/paging intent, which reinforces rather than adds.

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?

Names a specific verb+resource ('what a finished backtest actually TRADED — its fills, summarised') and pins scope: whole-run summary plus one page of fill rows. It explicitly distinguishes itself from tt_backtest_status, so an agent can route without opening either 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 both trigger conditions ('Call this after tt_backtest_status says the run is done, or on any bt_id from tt_list_backtests') and a hard usage constraint ('Never ask for everything' for paging, justified by the 9,823-fill example). It also names the alternative and why that alternative is insufficient, which is genuinely actionable routing guidance.

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