Skip to main content
Glama

backtest_code

Run a strategy you have written against real market history and return its figures. This is a real backtest against real prices — not a simulation and not cached per call — so run it deliberately, after check_strategy passes. Returns metrics only, never the curve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe strategy, in Brighter's language.
rangeNoWindow to test over.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it discloses that execution is against real prices, is not cached per call, and should be run deliberately, plus that only metrics are returned ('never the curve'). It is silent on runtime, cost/quota, and failure modes, so it is strong but not exhaustive.

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?

Two tight sentences, front-loaded with purpose and immediately followed by the operational caveat and return-value scope. Every clause earns its place with no filler.

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 simple two-parameter tool with no output schema, the description usefully compensates by stating that only metrics are returned and never the equity curve. The one remaining gap is sibling differentiation from backtest_strategy, which would matter for correct tool selection.

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% — 'code' is documented as the strategy in Brighter's language and 'range' as the test window with an enum — so the schema already carries the parameter meaning. The description adds no syntax, format, or validity guidance beyond it, making the baseline 3 appropriate.

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 and resource ('Run a strategy you have written against real market history') and clarifies the nature of the execution (real prices, not a simulation). It does not, however, distinguish itself from the sibling 'backtest_strategy', which an agent must disambiguate on its own.

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?

Gives a concrete sequencing rule — run it deliberately, after check_strategy passes — which is actionable when-to-use guidance. It stops short of naming when to prefer this over the sibling backtest_strategy, so no explicit exclusion is provided.

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