Skip to main content
Glama

Run Backtest

run_backtest

Run a policy-aware historical backtest for this agent. Results appear in the agent's Backtesting tab and Activity feed. Requires Backtesting Pro.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
algo_idNoOptional saved algo ID for strategy parameters
symbolsYesTickers to backtest (max 10)
end_dateYesEnd date YYYY-MM-DD
nicknameNoOptional label for the run
timeframeNo1d | 1h | 30m | 15m | 5m1d
start_dateYesStart date YYYY-MM-DD
asset_classNostock | crypto | forex | commodity | etf
position_sizeNoSize value depending on mode
strategy_typeNoOptional strategy type override
respect_policyNoApply agent policy constraints (default false, opt-in only)
initial_balanceNoStarting equity (default 100000)
position_size_modeNofixed_units | percent_equity | usd_notional | from_strategy
strategy_parametersNoOptional strategy parameters override

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
messageNo
successNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / description
      Previous value: -"Structured Gogi result. Error responses include error and message fields."New value: +"Structured result. Error responses include error and message."
    • addedOutput schema / properties
      Added value: +{
      +  "error": {
      +    "type": "string"
      +  },
      +  "message": {
      +    "type": "string"
      +  },
      +  "success": {
      +    "type": "boolean"
      +  }
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Structured Gogi result. Error responses include error and message fields.",
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, so the agent knows this is a non-idempotent external write. The description adds genuinely useful context the annotations lack: results location (Backtesting tab and Activity feed) and a Pro plan requirement. It still omits whether a run is asynchronous, whether it consumes quota, or how long results take, which matters for a backtest.

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?

Three short sentences, front-loaded with the action, then the outcome location, then the gating requirement. Every sentence earns its place with no filler.

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

Completeness3/5

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

With an output schema present, return-value explanation is not needed, and annotations cover the mutation profile. What's missing is async/sync behavior and typical duration for a 13-parameter, possibly long-running backtest, plus routing to the get_backtest_run/list_backtest_runs siblings.

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

Parameters3/5

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

Schema description coverage is 100%, so every one of the 13 parameters is documented in the schema, making a 3 the baseline. The description adds no parameter detail at all, and notable nuances (respect_policy defaults false/opt-in, symbol cap of 10, timeframe units) are all already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (run) and resource (policy-aware historical backtest), scoped to 'this agent', which distinguishes it from sibling read tools like get_backtest_run and list_backtest_runs. However, it doesn't reference those siblings or explain what 'policy-aware' means beyond the name.

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?

Gives an implied gating condition ('Requires Backtesting Pro') which tells when it will succeed, but provides no guidance on when to use this vs the get_backtest_run/list_backtest_runs siblings or prerequisites like needing a saved algo.

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