Skip to main content
Glama

backtest_run

Run reproducible trading strategy backtests on Bybit market data, writing results only to experiments.db with metrics like trades, win rate, PnL, and fees.

Instructions

Run reproducible backtest via bybit_ws.experiments.backtest_runner. Пишет только в experiments.db (боевой state.db не трогает), 180s timeout, single-flight. Returns metrics: trades, win_rate, pnl, total_fees, equity_hash, git_commit

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "backtest_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoHistory depth (days)
paramsNoOptional param overrides (JSON object)
symbolYesTrading pair, e.g. SOLUSDT
intervalNoCandle interval (D, 240, 60, ...)240

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv11.5.0

TDQS

A3.7/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 unusually well: it discloses the write scope (only experiments.db, production state.db untouched), a hard 180s timeout, and a single-flight concurrency constraint. It omits error/failure behavior and any auth requirements, which keeps it from a 5.

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?

Three dense sentences, front-loaded with the core action, with every clause carrying real information (safety scope, timeout, concurrency, return fields). The mixed Russian/English phrasing slightly hurts skim-ability for some readers but wastes no space.

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?

No output schema exists, and the description compensates by enumerating the returned metrics. Combined with the disclosed timeout, side-effect boundary and concurrency behavior, an agent has nearly everything needed to call this correctly; only failure modes and sibling routing are missing.

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 the schema already documents symbol, days, interval and params; the description adds nothing about parameter meaning, valid ranges, or how the nested params overrides interact with defaults. Baseline 3 is appropriate when the schema does all the work.

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 action (run a reproducible backtest) plus the underlying execution path (bybit_ws.experiments.backtest_runner), which is far more precise than the bare name backtest_run. It does not explicitly contrast itself with siblings like experiment_list or validation_report, but the verb+resource combination makes the distinction obvious.

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?

Usage is implied rather than stated: an agent can infer this is the tool for producing a new backtest result, and the experiments.db note hints that this is a sandboxed analysis action. There is no explicit when-to-use / when-not-to-use guidance, no mention of prerequisites, and no named alternative.

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