Skip to main content
Glama

Replay a backtest

replay_backtest
Read-onlyIdempotent

Re-run a stored backtest and report whether it still produces the same numbers.

    Same spec, same `as_of`, same data questions. If the numbers moved, either the engine
    version changed or the underlying data was restated — both are reported, neither is
    smoothed over. Args: run_id.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNo
errorNo
reasonNo
run_idNo
blockedNo
poll_withNo
job_statusNo
reproducedNo
differencesNo
queue_positionNo
interactive_capNo
running_secondsNo
estimate_secondsNo
marketplace_cardNo
numbers_reproducedNo
not_investment_adviceNo
not_reproduced_reasonNo
replay_engine_versionNo
original_engine_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / hint
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Hint"
      +}
    • addedOutput schema / properties / interactive_cap
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Interactive Cap"
      +}
    • addedOutput schema / properties / marketplace_card
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Marketplace Card"
      +}
  2. Changed5 schema fields changed
    • addedOutput schema / properties / estimate_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Estimate Seconds"
      +}
    • addedOutput schema / properties / job_status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Job Status"
      +}
    • addedOutput schema / properties / poll_with
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Poll With"
      +}
    • addedOutput schema / properties / queue_position
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Queue Position"
      +}
    • addedOutput schema / properties / running_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Running Seconds"
      +}
  3. Changed2 schema fields changed
    • addedOutput schema / properties / not_reproduced_reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Not Reproduced Reason"
      +}
    • addedOutput schema / properties / numbers_reproduced
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Numbers Reproduced"
      +}
  4. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations cover the read-only, idempotent, and non-destructive nature, so the description adds value by explaining its core behavior: it reports whether numbers moved and attributes changes to engine version or data restatement. It also clarifies that it does not 'smooth over' discrepancies, which is useful context beyond the annotations. No contradiction exists.

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 concise and front-loaded: the first sentence states the primary purpose, and the second adds contextual detail about the causes of differences. No unnecessary words or redundancy. It is well-structured and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter, a read-only idempotent operation, and an output schema (not shown), the description covers the purpose, interpretation of results, and root causes. It does not need to explain return values given the output schema exists. The description is essentially complete for an agent to call it correctly, though it could benefit from clarifying that run_id refers to an existing backtest run.

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

Parameters2/5

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

The input schema provides zero description for run_id (0% coverage), and the description only lists 'Args: run_id' without explaining that it is the identifier of the stored backtest to replay. The semantic burden falls entirely on the description, which fails to provide explicit meaning for the parameter. This is a significant 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?

The description states a specific verb ('re-run') and resource ('stored backtest') with a clear objective: report whether it still produces the same numbers. It explicitly mentions 'same spec, same as_of, same data questions', distinguishing it from run_backtest (new run) and get_backtest (retrieve results). This is precise and differentiates from siblings.

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

Usage Guidelines3/5

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

The description implies when to use this tool (to verify reproducibility after engine changes or data restatements) but does not explicitly name alternatives or state clear conditions to choose it over run_backtest or get_backtest. The guidance is inferred rather than spelled out, so it meets the minimum viable level but leaves room for better exclusions.

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