Skip to main content
Glama

compare_backtests

Run several strategies on the same data and compare side by side.

    One quota-counted call, but compute scales with the number of
    strategies. If the wall-clock compute budget is exceeded, the call
    fails with a tool error (504) instead of returning partial results —
    narrow the request (fewer strategies, shorter date range, coarser
    frequency) and retry.

    Args:
        data_source: Shared data source (same shape as run_backtest).
        strategies: List of {"label": str, "strategy": {...},
            "execution": {...}?} entries. Labels need not be unique or
            id-safe — they are echoed back verbatim in the result.
        include_benchmark: Add a buy-and-hold benchmark to the comparison.
        response_detail: Shaping level applied to each strategy's result.
        trades_limit: Max trades per strategy when detail is 'full'.

    Returns:
        {"strategies": [{"label", "result"}, ...], "equity_curves": {...},
        "alignment"?}, each result shaped at the requested detail. When a
        benchmark is included, non-benchmark entries also carry
        "relative" (beta, alpha, information ratio, etc.). A 400/422
        rejection returns {"accepted": false, "error": ...};
        capacity/timeout/permission failures raise a tool error.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategiesYes
data_sourceYes
trades_limitNo
response_detailNosummary
include_benchmarkNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description fully carries the burden. It discloses quota counting, scaling behavior, timeout failure mode, error structure for 400/422, and return format including relative metrics for benchmarks. This is comprehensive.

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

Conciseness5/5

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

The description is well-structured with a clear purpose statement, paragraphs for behavioral notes, and a bullet-like Args section. Every sentence provides valuable information without unnecessary verbosity.

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 the tool's complexity (5 params, nested objects, output schema), the description covers all aspects: purpose, usage constraints, parameter details, return schema, error handling, and scaling behavior. It is fully complete for agent invocation.

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 coverage is 0%, so the description provides all parameter details. It describes each parameter including the complex 'strategies' array structure, default values, and enum for response_detail. This adds substantial meaning beyond the raw 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?

The description clearly states 'Run several strategies on the same data and compare side by side.' It uses a specific verb (compare) and resource (backtests), and distinguishes itself from siblings like run_backtest by noting it handles multiple strategies in one call.

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

Usage Guidelines4/5

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

The description provides explicit guidance on timeout handling, retry advice, and notes that the call counts as one quota but compute scales. However, it does not explicitly mention when not to use it (e.g., for a single strategy) or suggest alternatives like run_backtest, which would make it a 5.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Every tool targets a distinct operation or resource: backtesting, comparison, macro data, reference catalogs, etc. Even similar tools like run_backtest and compare_backtests are clearly differentiated by purpose and inputs.

Naming Consistency4/5

Overall consistent verb_noun pattern in snake_case, with a few exceptions like engine_info (noun_noun) and export_backtest (verb_noun but less common verb). The pattern is predictable and aids agent selection.

Tool Count4/5

20 tools is slightly above the ideal range but justified by the breadth of the platform (backtesting, data retrieval, reference, export). Each tool serves a clear purpose without redundancy.

Completeness4/5

Covers the full backtesting lifecycle: strategy validation, data sourcing, backtesting, comparison, export, and reference lookups. Minor gaps exist (e.g., no explicit strategy persistence), but the core workflow is complete.

Resources