Skip to main content
Glama

Sentinel Aleph

Run backtest

run_backtest

Replays one of your saved strategies on historical candles and returns the summary: trade count, win rate, profit factor, drawdown, return and data coverage. Use it to test a strategy from get_my_strategies on past data; it is research, not a forecast, and places no orders. To reread an earlier run use get_my_backtests or get_backtest, which spend no compute quota; to change the settings first use update_strategy; for how published signals actually did use get_signal_ledger. Needs an API key with write scope and spends compute quota (beta: 5 runs a day, 1 a minute); a run can take up to about 85 seconds and returns an error if it does not finish. from and to are UTC dates at most 90 days apart, from 2018-01-01 to today; symbol defaults to the strategy's first symbol and is required when it lists none; initial_capital sets the starting balance the return and drawdown are measured on.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd date, YYYY-MM-DD (UTC), at most 90 days after from.
fromYesStart date, YYYY-MM-DD (UTC).
symbolNoPair to replay. Required when the strategy lists no symbols; otherwise one of the strategy's symbols (default: its first).
timeframeNoCandle timeframe.4h
strategy_idYesId of one of your strategies (get_my_strategies).
initial_capitalNoStarting capital in USDT for the replay.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd date (UTC).
fromNoStart date (UTC).
noteNoResearch, not a forecast.
errorNoSet only on a failed call (isError true): what went wrong.
statsNoWin rate, profit factor, drawdown, return and related figures from the worker; absent if it returned none.
statusNoRun status.
symbolNoPair replayed.
durationNoWorker run time.
timeframeNoCandle timeframe.
backtest_idNoRun id.
strategy_idNoStrategy replayed.
trade_countNoTrades in the replay.
data_coverageNoHow much of the range had candles; absent if unknown.
strategy_nameNoIts name.
initial_capitalNoStarting balance, USDT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "backtest_id": {
      +      "description": "Run id.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "data_coverage": {
      +      "description": "How much of the range had candles; absent if unknown."
      +    },
      +    "duration": {
      +      "description": "Worker run time.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Set only on a failed call (isError true): what went wrong.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "from": {
      +      "description": "Start date (UTC).",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "initial_capital": {
      +      "description": "Starting balance, USDT.",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "description": "Research, not a forecast.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "stats": {
      +      "description": "Win rate, profit factor, drawdown, return and related figures from the worker; absent if it returned none."
      +    },
      +    "status": {
      +      "description": "Run status.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "strategy_id": {
      +      "description": "Strategy replayed.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "strategy_name": {
      +      "description": "Its name.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "symbol": {
      +      "description": "Pair replayed.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "timeframe": {
      +      "description": "Candle timeframe.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "to": {
      +      "description": "End date (UTC).",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "trade_count": {
      +      "description": "Trades in the replay.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnlyHint=false, idempotent=false, destructive=false). The description adds what they cannot: write-scope API key requirement, compute-quota cost (beta 5 runs/day, 1/minute), an up-to-85-second runtime with error-on-timeout, and confirmation that no orders are placed.

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?

Front-loads purpose and alternatives before mechanics, and every clause carries information (quota, latency, date bounds, defaults). It is dense and long for a single paragraph, but close to no waste.

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?

A write-like, quota-spending, slow-running tool with an output schema; the description covers auth, cost, latency, failure mode, date-range constraints, and defaults, so an agent needs nothing more before invoking it.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema: the 2018-01-01 lower bound on from, symbol defaulting to the strategy's first symbol and being required only when it lists none, and initial_capital being the basis for return and drawdown.

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 (replays) plus resource (a saved strategy on historical candles) and enumerates the returned summary fields. It is immediately distinguishable from siblings like get_my_backtests and get_signal_ledger, which are named directly.

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?

Explicitly routes the agent: reread earlier runs via get_my_backtests/get_backtest, change settings via update_strategy, check published-signal performance via get_signal_ledger. It also states the tool is research, not a forecast, and places no orders.

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