Skip to main content
Glama

运行回测

platform_run_backtest
Destructive

【策略】提交回测任务(写操作,需用户确认)。strategy 为策略代码字符串或已有策略 ID(纯数字),symbol 为交易标的如 BTCUSDT,timeframe 可选 1m/5m/15m/30m/1H/4H/1D。params 为指标参数覆盖(可选,写入引擎 indicator_params,与代码内 # @param 默认值合并、此处优先),与同步链 /api/cex/indicator/backtest 的 params 同口径。(cost: ≈ 27 credits/次(90d·1H))(写操作,外部调用将以 apikey 身份直接执行)

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": "<strategy>",
      "symbol": "<symbol>"
    },
    "name": "platform_run_backtest"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsNo指标参数覆盖,如 {"fast_period":20,"slow_period":60}(可选)
symbolYes交易标的,如 BTCUSDT(必填)
endDateNo结束日期,如 2024-12-31(可选)
strategyYes策略代码或策略 ID(纯数字视为 ID)
startDateNo开始日期,如 2024-01-01(可选)
timeframeNoK 线周期(可选)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=false and destructiveHint=true, so the write nature is known. The description adds useful context beyond them: user confirmation is required, external calls execute directly under the apikey identity, and each run has a concrete credit cost (≈27 per 90d·1H). It stops short of explaining post-submission behavior (task ID, polling, or whether the task can be cancelled), so it is not 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The write-operation warning is front-loaded and the parameter notes are dense and useful, but the write-op status and external-execution identity are restated twice (at the start and at the end), and the cost parenthetical is awkwardly buried mid-sentence. The content mostly earns its place, but the duplication costs clarity.

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 6-parameter write tool with no output schema, it covers the required inputs, the timeframe values, the params-merge semantics, the cost, and the confirmation requirement. It does not explain what the call returns (a task or backtest ID) or how to fetch results afterward, which matters given that no output schema exists.

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. The description goes further by listing the timeframe values (1m/5m/15m/30m/1H/4H/1D) that the schema leaves as a free string, by explaining that a numeric strategy value is treated as an ID, and by specifying how params merge with # @param defaults and which source takes precedence.

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?

The description states a specific verb and resource: submit a backtest task (提交回测任务), with the strategy input, symbol, and timeframe spelled out. This is enough to distinguish it from a list or history tool, but the description never names a sibling such as platform_backtest_result, platform_backtest_history, or platform_explain_backtest, so the boundaries remain implicit.

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?

The description gives decision-relevant context: this is a write operation that requires user confirmation, and each run costs about 27 credits. However, it does not say when to choose this tool instead of platform_backtest_result (fetching results) or platform_explain_backtest (explaining results), so the agent must infer those relationships.

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.