Skip to main content
Glama

Run a backtest

acubic_run_backtest
Destructive

Runs a walk-forward backtest of one saved strategy and saves it in place of the previous one: at each rebalance the strategy is rebuilt from the data then available, with transaction costs, against the S&P 500 (SPY). 1 to 10 years, monthly, quarterly or annual rebalancing, 0 to 200 bps costs. It uses one backtest from the plan's monthly allowance, returned if the run fails or is cancelled. May return a run_id for acubic_get_backtest_status. One MCP run per person at a time. Results are hypothetical and carry a disclosure. To read a saved backtest use acubic_get_backtest.

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": {
      "strategy_id": "<strategy_id>"
    },
    "name": "acubic_run_backtest"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearsNoLength of the test in years.
localeNoThe language of this conversation.
strategy_idYesThe saved strategy to backtest.
rebalance_freqNoM monthly, Q quarterly, A annual (needs at least 3 years).M
response_formatNoconcise
client_request_idNoIdempotency key.
transaction_cost_bpsNoCost of each buy and sell in basis points.

Output Schema

NameRequiredDescriptionDefault
errorNo
quotaNo
backtestNo
truncatedNo
disclosureNo
client_request_idNoThe idempotency key this call used (yours, or one made for it). Repeat the call with it to get the same run without a second charge.
quota_unavailableNoTrue when the quota counters could not be read after the work was saved; the work is saved.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the prior saved backtest is replaced, that a unit of the monthly quota is consumed but refunded on failure or cancellation, the single-concurrent-run limit, the possibility of an asynchronous run_id, and that results are hypothetical with a disclosure. The destructiveHint=true annotation is corroborated rather than merely repeated.

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 what the tool does and its in-place overwrite, then packs constraints and caveats into short clauses. Dense but nearly every clause carries operational meaning; only the range restatements are redundant with the schema.

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?

For a mutating, quota-consuming, potentially asynchronous tool with an output schema, the description covers the overwrite semantics, cost model, quota accounting, concurrency, follow-up tool, and the hypothetical-results disclosure. There is no material behavior an agent needs that is 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 coverage is 86%, so the schema already documents parameters and the 3-year minimum for annual rebalancing. The description restates the ranges (1-10 years, M/Q/A, 0-200 bps) without adding format or interaction details, so it earns the baseline rather than more.

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 and resource ('Runs a walk-forward backtest of one saved strategy') and adds the crucial scope detail that it saves the result in place of the previous one. It explicitly contrasts with the sibling acubic_get_backtest for reading, so the agent can distinguish the two without opening either schema.

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?

Names the read alternative (acubic_get_backtest) and the status follow-up (acubic_get_backtest_status via run_id), plus the concurrency precondition of one MCP run per person. It stops short of describing when a backtest is the right choice versus related tools like acubic_project_strategy, but the routing context is clear.

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