Skip to main content
Glama

BotSpot: AI Trading, Backtests and Bots

List backtests

list_backtests
Read-only

Summarize recent backtests for the user, optionally scoped to a strategy or conversation. For the current attached strategy, use scope='strategy' and omit id, strategyId, and aiStrategyId. The server resolves the exact strategy from the scoped MCP token, avoiding copied-identifier errors. Supports server-side sorting via sortBy + sortOrder (default is createdAt desc). Use status to filter by one or more backtest statuses (comma-separated). Use offset+limit to page through full history (for example, limit=50 offset=0, then offset=50 for older runs). For lightweight summaries, includeArtifacts defaults to false; set includeArtifacts=true only when you need artifact manifests inline (artifact pages are capped to 10 rows). If a backtest status is initiated/in_progress/backtesting, only status/log diagnostics may be available; do not fetch trades.csv, indicators.csv, or stats.csv until the run reaches a terminal status. The response includes a 'Tool IDs' section listing full backtestId/revisionId/aiStrategyId/strategyId for each row so downstream tools can chain without manual lookup. For normal questions about 'this backtest', 'the backtest', or 'how did it do', select one relevant terminal run from this response and keep that same backtestId for every get_backtest_artifact, get_backtest_logs, and query_csv call in the answer. Only inspect multiple run ids when the user asks for all runs, a comparison, or a different named run. If the user or conversation history already gives an exact backtest id, list_backtests is optional discovery only and does not replace direct artifact/log inspection. If this response is empty, still use the explicit id with get_backtest_artifact/get_backtest_logs/backtest_status/query_csv when diagnosing that named run. Do not replace a user-provided backtest id with a newer or listed run unless the user asks for latest, comparison, or a different named run. IMPORTANT: Each backtest has TWO date concepts: (1) 'createdAt' = when the backtest was RUN (e.g., '2024-12-08T22:48:17Z'), (2) 'period'/'startDate'/'endDate' = the historical date RANGE the backtest covers (e.g., '2024-01-01 → 2024-12-01'). When user asks for 'most recent' or 'latest' backtest, use createdAt to determine recency, NOT the period. COMMUNICATION: When referring to backtests, NEVER use the backtest ID (meaningless to users). Instead describe it by WHEN it ran and WHAT it covers, e.g.: 'The backtest that ran at 5:48 PM covering Dec 2024 to Dec 2025...' Convert createdAt timestamps to the user's timezone for communication.

Input Schema

NameRequiredDescriptionDefault
idNo
limitNo
scopeNoall
offsetNo
sortByNoServer-side sort field. Supported values: createdAt, totalReturn, cagrAnnualReturn, sharpe, maxDrawdown, status.createdAt
statusNoOptional comma-separated status filter. Valid values: initiated, in_progress, completed, completed_no_trades, failed, force_stopped, terminated_timeout, not_found, completed_with_errors. Do not use deployment-only statuses such as terminated. Example: completed,completed_no_trades.
sortOrderNoSort direction: desc (default) or asc.desc
strategyIdNo
aiStrategyIdNo
includeArtifactsNoInclude artifact manifests in each backtest item (default false to keep responses lightweight).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds substantial undisclosed behavior: default sort createdAt desc, timestamp semantics ('createdAt' vs 'period'), the 'Tool IDs' response section for chaining, artifact manifests capped at 10 rows, and the constraint that non-terminal runs only expose status/log diagnostics.

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

Conciseness3/5

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

Front-loaded correctly with scope and sorting, but the text is roughly 350 words with real redundancy: the 'select one terminal run and reuse the same backtestId' rule is restated three times across sentences, and the COMMUNICATION section is user-facing phrasing style rather than tool-selection guidance.

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 10-parameter list tool with 40% schema coverage and no output schema, the description covers filtering, sorting, paging, payload weight, response shape, empty responses, and downstream chaining. 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 only 40%, so the description must compensate, and it largely does: it explains scope/id/strategyId/aiStrategyId interaction, sortBy+sortOrder defaults, comma-separated status values, offset+limit paging with an example, and includeArtifacts' false default. The bare `id` parameter is never positively defined (only 'omit id'), leaving one gap.

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+scope: 'Summarize recent backtests for the user, optionally scoped to a strategy or conversation.' It also distinguishes itself from siblings by naming get_backtest_artifact, get_backtest_logs, query_csv, and backtest_status, and stating that list_backtests is 'optional discovery only' when an exact id is known.

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 rules throughout: use scope='strategy' for the attached strategy, inspect multiple run ids only for 'all runs', comparison, or a different named run, and don't substitute a listed run for a user-provided backtest id. It even covers the negative case — an empty response should still route to artifact/log tools with the explicit id.

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.