Skip to main content
Glama
mnemox-ai

TradeMemory Protocol

by mnemox-ai

Evolution Run Backtest

evolution_run_backtest
Idempotent

Backtest a candidate trading pattern against historical OHLCV data to evaluate Sharpe ratio, win rate, max drawdown, trade count, and total PnL.

Instructions

Backtest a candidate pattern against historical OHLCV data.

Takes a pattern dict (from discover_patterns) and runs a vectorized backtest. Returns fitness metrics: Sharpe ratio, win rate, trade count, max drawdown, total PnL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoDays of history to backtest against (default 90)
symbolNoTrading pair (e.g. "BTCUSDT")BTCUSDT
timeframeNoBar timeframe — "5m", "15m", "1h", "4h", "1d"1h
pattern_dictYesCandidatePattern as dict (from discover_patterns output)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.4

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), so the description adds 'vectorized' as a mild performance hint. However, it does not explain why a seemingly pure computation is flagged readOnlyHint=false (e.g., writes a log or caches results), leaving that inconsistency unaddressed.

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?

Two tight paragraphs, front-loaded with the core action, no filler. The trailing metrics list is partly redundant given an output schema exists, costing a small amount of value.

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, the return-value list is redundant, and full schema coverage handles parameters. The remaining gap is behavioral: no guidance on when to choose this over sibling analysis tools and no explanation of the non-read-only side effects implied by annotations.

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 all four parameters are already documented in the schema, including pattern_dict coming from discover_patterns. The description's 'pattern dict (from discover_patterns)' merely restates the schema, adding no new syntax or constraints.

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?

States a specific verb (backtest) and resource (a candidate pattern against historical OHLCV data), and identifies the upstream producer of the input ('from discover_patterns'). An agent can immediately distinguish this from siblings like evolution_evolve_strategy or validate_strategy.

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?

It implies a workflow by naming discover_patterns as the source of pattern_dict, but never states when to backtest versus validate_strategy or evolve_strategy, nor any prerequisites or exclusions. Usage is implied rather than prescribed.

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