Skip to main content
Glama
Backtest360

backtest360-mcp

Official
by Backtest360

run_backtest

Run a historical backtest to evaluate trading strategies using OHLCV data or signal series, with configurable execution settings and detailed performance metrics.

Instructions

Run a historical backtest against the engine.

Quota-counted and compute-bound. Validate the strategy first (validate_strategy is far cheaper). On a 504 compute timeout, do NOT retry the same request — reduce the date range, use a coarser frequency, or simplify the strategy. On 429/503, wait for the advertised Retry-After before retrying.

Args: data_source: Either inline OHLCV ({"ohlcv": {dates, open, high, low, close, volume?}} as parallel arrays, ISO-8601 dates) or a server-side fetch ({"symbol", "start", "end", "frequency"} — requires a paid plan). strategy: Strategy document (indicators[] + condition_tree). Mutually exclusive with signals. signals: Precomputed signal series ({"dates": [...], "values": [-1|0|1, ...]}). Mutually exclusive with strategy. execution: Execution/cost/risk/sizing settings. Use values from get_catalog('execution-modes'/'stop-types'/'sizing-methods'); omit for engine defaults. benchmark: Optional benchmark data source (same shape as data_source) — adds benchmark-relative metrics. data_inputs: Optional custom time-series the strategy references (name -> {dates, values}). response_detail: 'summary' (default — headline metrics, smallest), 'stats' (every metric), 'full' (plus trades and series downsampled to a fixed, server-controlled number of points). include: Optional add-on blocks at summary/stats detail: 'trades', 'equity_curve', 'monthly_returns', 'yearly_returns'. trades_limit: Max trades returned when trades are included.

Returns: The shaped result at the requested detail; an oversized result is thinned and marked truncated_by_mcp. If the engine rejects the request as invalid (400/422), returns {"accepted": false, "error": ...} so you can fix the named field(s) and retry. Capacity, timeout, and permission failures (e.g. 429/503/504/401/403) raise a tool error carrying explicit recovery guidance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNo
signalsNo
strategyNo
benchmarkNo
executionNo
data_inputsNo
data_sourceYes
trades_limitNo
response_detailNosummary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description fully discloses behavioral traits: quota-counted, compute-bound, error handling for 400/422/401/403/429/503/504, return truncation, and error recovery guidance. It does not explicitly state idempotency or side effects, but the detail is high.

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?

The description is well-structured with a main paragraph, error guidance, parameter list, and return explanation. It is front-loaded with the core purpose. However, it is slightly verbose, though every sentence carries useful information.

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 complexity (9 parameters, no annotations, output schema present), the description covers purpose, usage guidelines, behavioral transparency, parameter semantics, and return values comprehensively. It addresses error scenarios and recovery, making it complete for an AI agent.

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?

The schema has 0% parameter descriptions, but the description compensates with detailed explanations for all 9 parameters, including mutual exclusivity of strategy/signals, data_source options (inline vs server-side), execution defaults, response_detail enum meanings, and include options. This adds significant value beyond the 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 a historical backtest against the engine' and distinguishes it from the cheaper `validate_strategy`. It explains the tool's primary verb and resource, and the context signals confirm uniqueness among sibling tools.

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 guidance is provided: validate first with `validate_strategy`. It advises against retrying on 504 errors and recommends reducing date range or simplifying strategy. On 429/503, it instructs to wait for Retry-After. Alternatives like `compare_backtests` and `get_catalog` are referenced.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Backtest360/backtest360-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server