Skip to main content
Glama

Backtrader MCP

English | 中文

Backtrader MCP is an independent, local-first MCP server for building and running reproducible Backtrader strategies. It turns confined CSV files into immutable datasets, typed strategy intent into private drafts, and reviewed drafts into bounded subprocess runs with durable status and reports.

P0 is deliberately offline and backtest-only. It does not expose brokers, stores, credentials, live orders, arbitrary Python execution, or network transports.

Full documentation (English / 中文): https://cloudquant.github.io/backtrader-mcp/ (also buildable on Read the Docs; sources under docs/).

Distribution contract

  • Python 3.10 or newer.

  • MCP Python SDK >=2.0.0,<2.1 (validated at 2.0.0), using MCPServer and local stdio.

  • Independent wheel/source distribution; the only accepted Backtrader runtime is cloudQuant/backtrader, pinned in package metadata to commit 3c967ed61be184c0099ba5bef55d4bed09ad0b4a.

  • SQLite/WAL state, content-addressed CSV data, private draft files, HMAC capabilities, filesystem locks, idempotency records, and startup recovery.

  • Product-owned prepare_strategy_run, start_strategy_run, get_run_status, cancel_strategy_run, and get_run_result tools. MCP SDK v2.0.0 does not provide the Tasks extension, so this product does not claim it.

  • Observability tools: list_jobs (state-filtered job enumeration), get_run_logs (bounded, path-sanitized job log tails), and list_target_tree (read-only target preimages for exact change reviews); get_run_status reports log_uri, elapsed_seconds, and eta_bound.

  • All 30 tools carry readOnlyHint/destructiveHint/idempotentHint/openWorldHint annotations. Tool errors cross the MCP boundary as structured [code] message text with an optional Suggestion: next step; absolute filesystem paths in error text and job logs are redacted.

The wheel includes seven JSON Schema contracts under backtrader_mcp/schemas/ and the deterministic comparison policy under backtrader_mcp/policies/. It also includes its own immutable full metadata snapshot: 1,155 unique records covering 1,152 functional tests, 1,035 three-file strategy packages, and 1,032 verified mappings. The fourteen current-fork template entries (seven archetypes by two output profiles) remain separate from those corpus records.

Related MCP server: flox-mcp

Install without changing the base environment

From this directory, create and activate a dedicated virtual environment, then install the package. python may be any supported Python 3.10+ interpreter:

python -m venv .runtime
. .runtime/bin/activate
python -m pip install -c constraints/requirements-v2.txt .
python -m backtrader_mcp --help

The package dependency installs that pinned CloudQuant source. For a source checkout or an environment where the dependency was skipped, run the explicit installer instead:

backtrader-mcp install-backtrader | python -m json.tool

It installs only when Backtrader is absent. If another Backtrader distribution is already installed, it leaves that distribution untouched and returns the machine-readable installed_backtrader_untrusted warning.

Register only absolute, trusted roots in the host environment:

BACKTRADER_MCP_STATE_ROOT=/absolute/private/state
BACKTRADER_MCP_SOURCE_ROOTS={"market_data":"/absolute/read-only/csv","functional_corpus":"/absolute/read-only/tests/functional/strategies","package_corpus":"/absolute/read-only/strategies"}
BACKTRADER_MCP_TARGET_ROOTS={"strategies":"/absolute/generated/strategies"}
BACKTRADER_MCP_RUNTIMES={"default":"/absolute/cloudquant-backtrader"}

Root maps are JSON objects. MCP callers receive only root IDs and relative paths; they cannot submit absolute paths or executable paths. A runtime root must contain backtrader/__init__.py and have Git origin resolving to github.com/cloudquant/backtrader; another fork or the public PyPI package is rejected before a strategy run. If BACKTRADER_MCP_RUNTIMES is omitted, a verified installed CloudQuant distribution is registered as default.

Before adding a host, export the same values in the installation shell and run the read-only diagnostic. Quoting the JSON values prevents the shell from interpreting them:

export BACKTRADER_MCP_STATE_ROOT='/absolute/private/state'
export BACKTRADER_MCP_SOURCE_ROOTS='{"market_data":"/absolute/read-only/csv"}'
export BACKTRADER_MCP_TARGET_ROOTS='{"strategies":"/absolute/generated/strategies"}'
export BACKTRADER_MCP_RUNTIMES='{"default":"/absolute/cloudquant-backtrader"}'
backtrader-mcp doctor | python -m json.tool

doctor.status must be passed. The report is stable JSON and includes the installed product and dependency versions, installed-Backtrader provenance, configured root checks, supported adapters/run profiles, and the actual Backtrader module_file, version, Git commit, branch, provenance, and runtime capabilities. An existing non-CloudQuant installed package is reported as a warning; a configured non-CloudQuant runtime is an error. The CLI diagnostic itself does not create the state root or write to a source/target root; normal MCP server startup initializes its private state root before tools are available.

Catalog modes

get_catalog_snapshot returns the slim header by default: counts, hashes, provenance, and extensions.entry_count, without the 1,155-record entry list. Set include_entries=true to page through entries with limit (1-100) and offset; the response reports pagination.total/has_more/truncated. Every record has source_available=false: search and provenance are available, but inspect_strategy does not pretend that the original source bytes were shipped. list_strategy_templates (tool and resource) independently returns all 14 current-fork archetype/profile templates. search_strategy_catalog reports total/has_more/offset pagination metadata and actionable empty-result suggestions.

For an explicit source-attached rebuild, register the functional and package corpora as two read-only IDs in BACKTRADER_MCP_SOURCE_ROOTS, then call:

{
  "tool": "refresh_strategy_catalog",
  "arguments": {
    "source_root_id": "functional_corpus",
    "package_root_id": "package_corpus"
  }
}

The server scans metadata and hashes only; it never imports, executes, or modifies a corpus file. The result reports fresh functional_tests/strategy_packages/mapped counts, a content hash, and a diagnostic if they differ from the verified 1,152/1,035/1,032 baseline. Source-attached records use source_available=true; subsequent inspect_strategy detects changed functional or package bytes. Supplying only source_root_id preserves the smaller AST-only refresh for a registered strategy target root.

Host setup

Replace every /ABSOLUTE/PATH placeholder in the matching file.

Claude Desktop / Claude Code

Copy examples/hosts/claude-desktop.json into the host's MCP configuration, or replace every placeholder and run this complete Claude Code command:

claude mcp add-json --scope project backtrader '{
  "type": "stdio",
  "command": "/ABSOLUTE/PATH/backtrader-mcp/.runtime/bin/backtrader-mcp",
  "args": ["serve"],
  "env": {
    "BACKTRADER_MCP_STATE_ROOT": "/ABSOLUTE/PATH/.backtrader-mcp-state",
    "BACKTRADER_MCP_SOURCE_ROOTS": "{\"market_data\":\"/ABSOLUTE/PATH/data\"}",
    "BACKTRADER_MCP_TARGET_ROOTS": "{\"strategies\":\"/ABSOLUTE/PATH/generated-strategies\"}",
    "BACKTRADER_MCP_RUNTIMES": "{\"default\":\"/ABSOLUTE/PATH/cloudquant-backtrader\"}"
  }
}'
claude mcp list

Restart Claude Desktop after editing its JSON. Claude Code can verify the project-scoped server with claude mcp list and its interactive /mcp view.

Codex

Merge examples/hosts/codex-config.toml into ~/.codex/config.toml or a trusted project's .codex/config.toml, then restart the Codex client. The Codex app, Codex CLI, and Codex IDE extension share this configuration. Codex's own approval_policy governs the host, but it does not replace either of this product's trusted local approval records.

The equivalent CLI registration is:

codex mcp add \
  --env BACKTRADER_MCP_STATE_ROOT=/ABSOLUTE/PATH/.backtrader-mcp-state \
  --env 'BACKTRADER_MCP_SOURCE_ROOTS={"market_data":"/ABSOLUTE/PATH/data"}' \
  --env 'BACKTRADER_MCP_TARGET_ROOTS={"strategies":"/ABSOLUTE/PATH/generated-strategies"}' \
  --env 'BACKTRADER_MCP_RUNTIMES={"default":"/ABSOLUTE/PATH/cloudquant-backtrader"}' \
  backtrader -- /ABSOLUTE/PATH/backtrader-mcp/.runtime/bin/backtrader-mcp serve
codex mcp list --json

OpenCode

Merge examples/hosts/opencode.json into the global or project OpenCode configuration. The current configuration places each named local server directly below mcp; the command is an argument vector and enabled is true. Run opencode mcp list and require the backtrader server to be connected before starting a strategy request.

OpenClaw

Edit and run examples/hosts/openclaw-add.sh, then keep the successful openclaw mcp doctor backtrader --probe output as setup evidence.

First host verification

All four adapters start the same stdio server. A successful connection performs MCP initialize; the host then discovers tools/list, resources/list, and prompts/list. Use the host's MCP view/logs to confirm those discovery calls, then submit this non-mutating first request:

Use only the backtrader MCP server. Call doctor, then call
get_catalog_snapshot. Return doctor.status, the default runtime's module_file,
version and commit, plus snapshot.extensions.entry_count. Do not create a
draft, write a target, or start a run.

Expected evidence is doctor.status=passed, a module_file below the registered runtime, the expected Backtrader version/commit, and catalog entry_count=1155. Use these host-specific discovery checks:

Host

Registration check

Interactive discovery

Claude Code

claude mcp list

/mcp shows backtrader, then run the first request

Codex

codex mcp list --json

Start/restart Codex, inspect its MCP tools, then run the first request

OpenCode

opencode mcp list

Require backtrader connected, then run the first request

OpenClaw

openclaw mcp doctor backtrader --probe

Inspect the workspace MCP tools, then run the first request

For raw protocol evidence independent of host UI wording, the isolated v2 protocol test performs initialize, tools/list, resources/list, prompts/list, and a typed get_catalog_snapshot call.

Host configuration references: Claude MCP, Codex MCP, OpenCode MCP, and OpenClaw MCP.

Upgrade and uninstall

For a compatible 0.2.x upgrade, stop every connected host, back up the private state root, activate the dedicated environment, and reinstall:

. .runtime/bin/activate
python -m pip install --upgrade -c constraints/requirements-v2.txt .
backtrader-mcp doctor | python -m json.tool

Restart the host and repeat its registration check and first request. Do not reuse draft validation tokens, change/run tokens, or approvals across an incompatible release. This product does not migrate pre-P0 state.

To uninstall, first remove the backtrader MCP registration from each host (or delete only its matching configuration entry), stop active runs, then:

. .runtime/bin/activate
python -m pip uninstall backtrader-mcp

Uninstalling the wheel intentionally leaves the configured state, datasets, generated strategies, and source files untouched. Archive or remove those paths separately only after reviewing their contents. If .runtime was dedicated solely to this product, it can be removed with the platform's file manager after deactivation.

Closed-loop workflow

  1. inspect_dataset reads headers and a bounded sample from a configured source root.

  2. register_dataset requires an explicit canonical column map and writes a normalized immutable CSV to the CAS. Registration fails if the source changes while read.

  3. preview_dataset reads a bounded CAS preview.

  4. derive_tabular_dataset runs only identity, dropna, returns, or sma with typed parameters and an exact source-manifest hash. It creates a new dataset ID; no DataFrame, callable, pickle, or in-memory object crosses the protocol. returns/sma drop their warmup rows and register the derived column as a pandas_custom_lines feature line, so a derived dataset can feed precomputed_ml strategies directly.

  5. search_strategy_catalog selects one of seven archetypes.

  6. create_strategy_draft renders either single_test or python_bundle. All seven archetypes support both profiles. The spec may declare an allowlisted analyzer set (extensions.analyzers: sqn/calmar/vwr/ timereturn) whose typed metrics flow into the result's extra_metrics, and an optional canonical seed that freezes into the run manifest and seeds the candidate's random/numpy state for reproducible strategies.

  7. update_strategy_draft requires the current revision and file hash.

  8. validate_strategy_draft parses and compiles AST without importing the candidate in the server. It classifies direct Strategy classes separately from cooperative Indicator/LineIterator/Observer/Analyzer objects. A direct Strategy does not have a global super().__init__() requirement; a custom cooperative line object does.

  9. Read the current target tree with list_target_tree (relative path to sha256), then prepare_strategy_changes with the validation token, exact target preimage hashes, and an idempotency key. It returns a signed change token and a complete create/replace/delete review.

  10. Review the change, then run the printed command locally:

    backtrader-mcp approve \
      --change-set CHANGE_ID \
      --change-token 'SIGNED_TOKEN' \
      --yes

    The approval record is created in the private local database. There is no MCP tool for approval and no approved=true parameter.

  11. apply_strategy_changes requires that approval ID, the signed change token, and a new idempotency key. It rechecks draft and target hashes, stages the complete managed directory, and uses a journaled rename transaction.

  12. prepare_strategy_run requires a fresh validation token, immutable dataset ID, registered runtime ID, timeout, one of the fixed run profiles (runonce, runnext, runonce_runnext_compare, fixed_tests, or parameter_sweep), and an idempotency key. parameter_sweep freezes a typed param_grid (StrategySpec parameter names to value lists, at most 64 combinations) under the same single approval and ranks the per-combination results by return_rate. It freezes the exact draft, artifact, validation, dataset, runtime, profile, and timeout hashes and returns a signed run token.

  13. Review those frozen inputs, then create a separate execution approval locally:

    backtrader-mcp approve \
      --run-plan RUN_PLAN_ID \
      --run-token 'SIGNED_RUN_TOKEN' \
      --yes

    Change approvals and run approvals have different subject types and cannot be reused for one another.

  14. start_strategy_run accepts only that run plan ID, signed run token, execution approval ID, and a new idempotency key. Poll get_run_status every 2-5 seconds until a terminal state (it reports log_uri, elapsed_seconds, and eta_bound); optionally call cancel_strategy_run; read the normalized JSON and Markdown report with get_run_result. Use list_jobs to recover job IDs across sessions. On FAILED/TIMED_OUT/ORPHANED, read the bounded sanitized tails with get_run_logs before changing the strategy.

Job states are QUEUED, RUNNING, CANCEL_REQUESTED, CANCELLED, SUCCEEDED, FAILED, TIMED_OUT, and ORPHANED. Every transition is a compare-and-swap write with one arbitration rule: a terminal state, once persisted, is never overwritten, and a visible CANCEL_REQUESTED suppresses SUCCEEDED/FAILED/TIMED_OUT. Cancelling a job that already finished returns already_terminal instead of touching it.

A server-owned watchdog (started only by serve, never by CLI commands) consumes the worker heartbeat, enforces the wall-clock deadline with a grace period, orphans jobs whose worker died, and cleans up detached candidate process groups. Jobs report a structured error_kind (user_strategy/resource_limit/timeout/validation/infrastructure/ cancelled/orphaned) so clients can distinguish a strategy bug from a resource cap or a supervision decision.

The concurrency cap rejects instead of queueing: start_strategy_run fails with an actionable suggestion when max_concurrent_jobs is reached. Retention: backtrader-mcp clean --kind jobs|cas|drafts|approvals|nonces --before YYYY-MM-DD removes finished job records, unreferenced CAS objects, unreferenced drafts, consumed/expired approvals, and consumed token nonces respectively. Dataset registration streams row-by-row (bounded memory), deduplicates identical sources without re-parsing, and catalog refresh reuses an (mtime,size) fingerprint cache.

Successful results contain exactly eleven canonical metrics: bar_num, buy_count, sell_count, win_count, loss_count, trade_num, final_value, sharpe_ratio, annual_return, max_drawdown, and return_rate. sharpe_ratio and annual_return are nullable. The bundled comparison-profile-v1 defines deterministic integer equality and floating point tolerances for run comparison.

Execution semantics

  • Default sizer is bt.sizers.FixedSize(stake=1): self.buy() without a size trades exactly one unit. Templates demonstrate explicit sizing where it matters (order_risk uses a risk fraction).

  • Commission is a fixed percentage applied to both sides (cerebro.broker.setcommission(percabs=True)).

  • There is no cheat-on-close; market orders fill at the next bar's open.

  • SharpeRatio assumes riskfree rate 0.01 and population standard deviation; the annualization factor follows the data timeframe (252/52/12).

  • max_drawdown is reported as a positive percent.

  • The yahoo adapter stores raw close prices (adjclose=False); no adjustment metadata is applied.

  • The CloudQuant fork resamples with bar2edge=True by default, which differs from upstream backtrader.

  • parameter_sweep runs each grid combination once (runonce) with the params passed through cerebro.addstrategy(..., **override); one approval covers the whole frozen grid (at most 64 combinations).

Typed data adapters and bar operations

register_local_dataset accepts six independent typed adapters: generic_csv, backtrader_csv, yahoo_csv, mt5_csv, pandas, and pandas_custom_lines. Every source is parsed and normalized into an immutable canonical CSV object before execution. The controlled worker then constructs the named Backtrader adapter for each feed; it does not silently route every format through GenericCSVData.

Pandas inputs must use source_type=materialized_dataframe and reference a confined .csv file. Pickles, arbitrary Python objects, and caller-supplied constructors are rejected. pandas_custom_lines also requires every custom line to be declared in both lines and columns. MT5 feeds reject sub-minute timeframes (the adapter would otherwise silently truncate precision), and alignment.mode accepts only intersection.

Registration enforces a data-quality gate: non-positive OHLC prices and inconsistent bars (high below low, high below max(open,close), low above min(open,close)) are rejected with row-numbered errors. Markets where zero or negative prices are legitimate can opt out per feed with adapter_options.allow_non_positive_prices=true; OHLC consistency is always enforced.

Each feed may declare a typed extensions.bar_operation:

{"mode": "direct"}

or:

{"mode": "resample", "timeframe": "minutes", "compression": 5}

mode may also be replay. Resample and replay are applied with Cerebro.resampledata and Cerebro.replaydata, respectively. Successful fixed-test results include per-mode feed_runtime evidence with the requested format, actual adapter class, bar operation, source row count, and output bar count.

Security model

  • Stdio writes protocol frames only to stdout. Candidate stdout/stderr are redirected to per-job private log files.

  • Source, target, draft, CAS, and job paths are confined. Symlinks and parent traversal are rejected at caller-controlled boundaries.

  • Validation and change tokens use a random 256-bit local secret, random nonces, expirations, and HMAC-SHA256 over canonical hash bindings.

  • Apply authorization comes only from the trusted local CLI record.

  • Target application replaces the entire managed strategy directory. Callers must provide the exact hash of every pre-existing file, including files that will be deleted.

  • Candidate code is never imported by the MCP process. A worker launches it with a fixed interpreter, fixed entrypoint, minimal environment, separate process group, timeout, captured output, and validated result contract.

  • Every run manifest fingerprints the runtime's git HEAD commit, the runtime's version-file hash, and the resolved pandas/numpy versions (best-effort: a pip-installed runtime without a git checkout records a null commit).

Process control uses a POSIX session and resource-limit pre-exec hook on POSIX, while non-POSIX startup omits those options, uses a Windows process group when available, and preserves only the required SystemRoot launch variable. The automated suite exercises both branch contracts, but a real Windows fourteen-cell host run has not yet been recorded.

Static AST policy and a subprocess are not an OS sandbox. Reviewed candidate code still runs with the local user's filesystem permissions. P0 is intended for trusted local strategy development; run it in a container or restricted OS account for hostile code. SQLite state is single-host, and the journaled directory swap is crash-recoverable but not a multi-host distributed transaction. Cancellation is process-based, not an MCP Tasks capability. Watchdog cleanup records PIDs without process start-time binding; on a long-lived host a reused PID could in theory be signalled, and the heartbeat staleness check is the primary defence.

Approval host assumption. Change and run approvals are created only by the trusted local CLI, but the human-vs-agent separation holds only while the host does not grant the agent local command execution: an agent with shell access could run the printed approve command itself. Every approval record and its audit entry carry the OS identity of the local approver; for stronger separation, gate the approve CLI behind sudo/another OS account or an approval daemon outside the agent's reach. Signed tokens now carry one-time nonces consumed at the authorization landing point (apply/start), and replayed, expired, or clock-skewed tokens are rejected. On Windows the lock layer falls back to msvcrt byte-range locking, but a real Windows host run has still not been recorded.

The CloudQuant Backtrader ecosystem:

Development and acceptance

Run all commands from this directory:

python -m pip install -e ".[test]"
PYTHONPATH=src python -m pytest -q
ruff check src tests scripts
ruff format --check src tests scripts
PYTHONPATH=src python -m mypy src/backtrader_mcp
# With the four BACKTRADER_MCP_* root variables from the install section:
PYTHONPATH=src python -m backtrader_mcp doctor
PYTHONPATH=src python -m backtrader_mcp audit-independence
python scripts/run_acceptance.py --matrix all \
  --require-no-skills --require-no-agent

The project dependency pins cloudQuant/backtrader at commit 3c967ed61be184c0099ba5bef55d4bed09ad0b4a; no public PyPI Backtrader fallback is accepted. Test runtime resolution is explicit BACKTRADER_MCP_TEST_RUNTIME_ROOT, then a sibling checkout, then the installed package. Every candidate is provenance-checked against CloudQuant; an invalid or untrusted explicit override fails closed. Ruff is the only formatter and mypy is a required quality gate. The current branch-coverage gate is 80%; its exact configured value is the release criterion.

Protocol tests install mcp==2.0.0 only into a temporary target directory. They must not upgrade or remove the user's base-environment mcp==1.20.0. The fixed acceptance entrypoint consumes a structured 14-cell artifact rather than inferring success from pytest progress dots. It first builds a temporary wheel, installs the wheel's [test] dependency closure under the repository constraints into a clean temporary target, and runs pytest from a separate directory outside this source checkout. That target must contain the pinned CloudQuant Backtrader distribution and a matching direct-URL provenance record, so it does not borrow the active environment's product dependencies. backtrader_mcp is imported only from the installed wheel target.

The matrix executes all seven archetypes with both output profiles as real runonce/runnext child-process backtests, covers all six adapters plus resample/replay, and records inspect/register/preview, draft/validate, prepare/apply, run, and compare evidence. Its JSON output also records the wheel SHA-256, installed module origin, source_checkout_on_sys_path=false, sibling-product absence, and the independence audit. Callers cannot supply an arbitrary pytest target. The wheel acceptance additionally verifies the exact full-snapshot SHA-256 and imports/searches it from a clean temporary site directory outside this repository, with no sibling AI product on PYTHONPATH.


📖 中文文档

English | 中文


Backtrader MCP 是一个独立、本地优先的 MCP 服务器,用于构建和运行可复现的 Backtrader 策略。它把受限的 CSV 文件转换为不可变数据集,把 typed 策略意图转换为 私有草稿,把经过审查的草稿转换为带超时边界的子进程运行,并持久化运行状态与报告。

P0 版本刻意设计为离线、仅回测。它不暴露 broker、store、凭证、实盘订单、任意 Python 执行或网络传输。

完整文档(English / 中文): https://cloudquant.github.io/backtrader-mcp/(亦可在 Read the Docs 构建; 源文件位于 docs/)。

分发契约

  • Python 3.10 及以上。

  • MCP Python SDK >=2.0.0,<2.1(以 2.0.0 验证),使用 MCPServer 与本地 stdio。

  • 独立的 wheel / 源码分发;唯一可接受的 Backtrader 运行时是 cloudQuant/backtrader,包元数据固定到 commit 3c967ed61be184c0099ba5bef55d4bed09ad0b4a。

  • SQLite/WAL 状态、内容寻址的 CSV 数据、私有草稿文件、HMAC 能力令牌、文件系统 锁、幂等性记录以及启动恢复。

  • 产品自有的 prepare_strategy_run、start_strategy_run、 get_run_status、cancel_strategy_run 和 get_run_result 工具。MCP SDK v2.0.0 不提供 Tasks 扩展,因此本产品也不声称支持。

  • 可观测性工具:list_jobs(按状态过滤的作业枚举)、get_run_logs(有界、 绝对路径脱敏的作业日志尾部)与 list_target_tree(只读目标树原像,用于 精确变更评审);get_run_status 返回 log_uri、elapsed_seconds 和 eta_bound。

  • 全部 30 个工具都带有 readOnlyHint/destructiveHint/idempotentHint/ openWorldHint 注解。工具错误以结构化 [code] 消息 文本跨越 MCP 边界,可选 附带 Suggestion: 下一步建议;错误文本与作业日志中的绝对文件系统路径会被脱敏。

wheel 在 backtrader_mcp/schemas/ 下包含七个 JSON Schema 契约,在 backtrader_mcp/policies/ 下包含确定性比较策略。它还内置自己的不可变完整元数据 快照:1,155 条唯一记录,覆盖 1,152 个功能测试、1,035 个三文件策略包和 1,032 个 已验证映射。当前 fork 的十四条模板条目(七个 archetype × 两种输出 profile)与 这些语料记录分开存放。

不改动基础环境的安装

在本目录下创建并激活一个专用虚拟环境,然后安装本包。python 可以是任意受支持的 Python 3.10+ 解释器:

python -m venv .runtime
. .runtime/bin/activate
python -m pip install -c constraints/requirements-v2.txt .
python -m backtrader_mcp --help

包依赖会安装该固定的 CloudQuant 源码。若从源码检出运行或此前跳过了依赖安装,可改用 显式安装入口:

backtrader-mcp install-backtrader | python -m json.tool

它只会在 Backtrader 缺失时安装;若已存在其他 Backtrader 发行版,会保持原环境不变并 返回机器可读的 installed_backtrader_untrusted 警告。

只在宿主环境中注册绝对、可信的 root:

BACKTRADER_MCP_STATE_ROOT=/absolute/private/state
BACKTRADER_MCP_SOURCE_ROOTS={"market_data":"/absolute/read-only/csv","functional_corpus":"/absolute/read-only/tests/functional/strategies","package_corpus":"/absolute/read-only/strategies"}
BACKTRADER_MCP_TARGET_ROOTS={"strategies":"/absolute/generated/strategies"}
BACKTRADER_MCP_RUNTIMES={"default":"/absolute/cloudquant-backtrader"}

Root 映射是 JSON 对象。MCP 调用方只能拿到 root ID 和相对路径,不能提交绝对路径或 可执行路径。运行时 root 必须包含 backtrader/__init__.py,且 Git origin 必须解析为 github.com/cloudquant/backtrader;其他 fork 或公开 PyPI 包会在启动策略前被拒绝。若未 设置 BACKTRADER_MCP_RUNTIMES,已验证的已安装 CloudQuant 分发会自动注册为 default。

新增宿主之前,先在安装 shell 中导出同样的值并运行只读诊断。给 JSON 值加引号可以 避免被 shell 解释:

export BACKTRADER_MCP_STATE_ROOT='/absolute/private/state'
export BACKTRADER_MCP_SOURCE_ROOTS='{"market_data":"/absolute/read-only/csv"}'
export BACKTRADER_MCP_TARGET_ROOTS='{"strategies":"/absolute/generated/strategies"}'
export BACKTRADER_MCP_RUNTIMES='{"default":"/absolute/cloudquant-backtrader"}'
backtrader-mcp doctor | python -m json.tool

doctor.status 必须为 passed。报告是稳定的 JSON,包含已安装产品及依赖版本、已安装 Backtrader 的溯源、已配置的 root 检查、支持的 adapter / run profile,以及实际的 Backtrader module_file、版本、Git commit、分支、溯源和运行时能力。已有的非 CloudQuant 已安装包会显示 warning;已配置的非 CloudQuant 运行时则是 error。CLI 诊断 本身不会创建 state root,也不会写入 source / target root;正常 MCP 服务器启动时才会 在工具可用之前初始化自己的私有 state root。

Catalog 模式

get_catalog_snapshot 默认只返回精简 header:计数、哈希、溯源以及 extensions.entry_count,不含 1,155 条记录列表。设置 include_entries=true 可 以用 limit(1-100)与 offset 分页获取条目;响应会报告 pagination.total/has_more/truncated。全部记录的 source_available=false:搜索和溯源可用,但 inspect_strategy 不会假装原始源 码字节随包分发。list_strategy_templates(工具与资源两种形态)独立返回当前 fork 的全部 14 条 archetype / profile 模板。search_strategy_catalog 返回 total/has_more/offset 分页元数据以及可操作的空结果建议。

若要显式重建带源码的快照,把 functional 和 package 两个语料以两个只读 ID 注册到 BACKTRADER_MCP_SOURCE_ROOTS,然后调用:

{
  "tool": "refresh_strategy_catalog",
  "arguments": {
    "source_root_id": "functional_corpus",
    "package_root_id": "package_corpus"
  }
}

服务器只扫描元数据和哈希,绝不导入、执行或修改任何语料文件。结果会报告最新的 functional_tests/strategy_packages/mapped 计数、内容哈希,以及与已验证的 1,152/1,035/1,032 基线不一致时的诊断信息。带源码的记录使用 source_available=true,后续 inspect_strategy 可检测 functional 或 package 字节 是否变化。只提供 source_root_id 时,则保留针对已注册策略 target root 的更小 AST-only 刷新。

宿主配置

请替换对应文件中每一个 /ABSOLUTE/PATH 占位符。

Claude Desktop / Claude Code

把 examples/hosts/claude-desktop.json 复制进宿主的 MCP 配置,或替换全部占位符后 运行下面这条完整的 Claude Code 命令:

claude mcp add-json --scope project backtrader '{
  "type": "stdio",
  "command": "/ABSOLUTE/PATH/backtrader-mcp/.runtime/bin/backtrader-mcp",
  "args": ["serve"],
  "env": {
    "BACKTRADER_MCP_STATE_ROOT": "/ABSOLUTE/PATH/.backtrader-mcp-state",
    "BACKTRADER_MCP_SOURCE_ROOTS": "{\"market_data\":\"/ABSOLUTE/PATH/data\"}",
    "BACKTRADER_MCP_TARGET_ROOTS": "{\"strategies\":\"/ABSOLUTE/PATH/generated-strategies\"}",
    "BACKTRADER_MCP_RUNTIMES": "{\"default\":\"/ABSOLUTE/PATH/cloudquant-backtrader\"}"
  }
}'
claude mcp list

编辑 Claude Desktop 的 JSON 后需重启。Claude Code 可用 claude mcp list 及其交互 式 /mcp 视图验证项目级服务器。

Codex

把 examples/hosts/codex-config.toml 合并到 ~/.codex/config.toml 或可信项目的 .codex/config.toml,然后重启 Codex 客户端。Codex App、Codex CLI 和 Codex IDE 扩展共用这份配置。Codex 自身的 approval_policy 管理宿主,但不替代本产品的任一 可信本地审批记录。

等价的 CLI 注册命令:

codex mcp add \
  --env BACKTRADER_MCP_STATE_ROOT=/ABSOLUTE/PATH/.backtrader-mcp-state \
  --env 'BACKTRADER_MCP_SOURCE_ROOTS={"market_data":"/ABSOLUTE/PATH/data"}' \
  --env 'BACKTRADER_MCP_TARGET_ROOTS={"strategies":"/ABSOLUTE/PATH/generated-strategies"}' \
  --env 'BACKTRADER_MCP_RUNTIMES={"default":"/ABSOLUTE/PATH/cloudquant-backtrader"}' \
  backtrader -- /ABSOLUTE/PATH/backtrader-mcp/.runtime/bin/backtrader-mcp serve
codex mcp list --json

OpenCode

把 examples/hosts/opencode.json 合并到全局或项目级 OpenCode 配置。当前配置把每个 具名的本地服务器直接放在 mcp 下;command 是参数向量,enabled 为 true。运行 opencode mcp list,并要求 backtrader 服务器在发起策略请求前已连接。

OpenClaw

编辑并运行 examples/hosts/openclaw-add.sh,然后保留成功的 openclaw mcp doctor backtrader --probe 输出作为安装证据。

宿主首次验证

四个 adapter 启动的是同一个 stdio 服务器。连接成功会执行 MCP initialize,随后 宿主发现 tools/list、resources/list 和 prompts/list。用宿主的 MCP 视图 / 日 志确认这些发现调用,然后提交下面这个非变更的首个请求:

Use only the backtrader MCP server. Call doctor, then call
get_catalog_snapshot. Return doctor.status, the default runtime's module_file,
version and commit, plus snapshot.extensions.entry_count. Do not create a
draft, write a target, or start a run.

预期证据是 doctor.status=passed、位于已注册运行时之下的 module_file、预期的 Backtrader 版本 / commit,以及 catalog entry_count=1155。各宿主的发现检查如下:

宿主

注册检查

交互式发现

Claude Code

claude mcp list

/mcp 显示 backtrader,然后运行首个请求

Codex

codex mcp list --json

启动 / 重启 Codex,查看其 MCP 工具,然后运行首个请求

OpenCode

opencode mcp list

要求 backtrader 已连接,然后运行首个请求

OpenClaw

openclaw mcp doctor backtrader --probe

查看工作区 MCP 工具,然后运行首个请求

如需独立于宿主 UI 措辞的原始协议证据,隔离的 v2 协议测试会执行 initialize、 tools/list、resources/list、prompts/list 和一次 typed get_catalog_snapshot 调用。

宿主配置参考: Claude MCP、 Codex MCP、 OpenCode MCP 和 OpenClaw MCP。

升级与卸载

兼容的 0.2.x 升级:停止所有已连接宿主、备份私有 state root、激活专用环境并重装:

. .runtime/bin/activate
python -m pip install --upgrade -c constraints/requirements-v2.txt .
backtrader-mcp doctor | python -m json.tool

重启宿主并重复其注册检查和首个请求。不要跨不兼容版本复用草稿校验令牌、change/run 令牌或审批。本产品不迁移 pre-P0 state。

卸载时,先从每个宿主移除 backtrader MCP 注册(或只删除其对应配置项),停止活动 运行,然后:

. .runtime/bin/activate
python -m pip uninstall backtrader-mcp

卸载 wheel 时有意保留已配置的 state、数据集、生成的策略和源文件不动。请在审查内容 后再单独归档或删除这些路径。若 .runtime 仅专用于本产品,可在 deactivate 后用平 台文件管理器删除。

闭环工作流

  1. inspect_dataset 从已配置的 source root 读取表头和有界样本。

  2. register_dataset 需要显式的规范列映射,并把归一化的不可变 CSV 写入 CAS。读取 期间源文件发生变化则注册失败。

  3. preview_dataset 读取有界的 CAS 预览。

  4. derive_tabular_dataset 只运行 identity、dropna、returns 或 sma,带 typed 参数和精确的 source-manifest 哈希。它创建新的 dataset ID;任何 DataFrame、callable、pickle 或内存对象都不会穿越协议。

  5. search_strategy_catalog 在七个 archetype 中选择一个。

  6. create_strategy_draft 渲染 single_test 或 python_bundle。七个 archetype 都支持这两种 profile。

  7. update_strategy_draft 需要当前 revision 和文件哈希。

  8. validate_strategy_draft 解析并编译 AST,但不在服务器中导入候选项。它把直接 Strategy 类与协作式 Indicator/LineIterator/Observer/Analyzer 对象分开判定。 直接 Strategy 没有全局 super().__init__() 要求;自定义协作式 line 对象则需要。

  9. prepare_strategy_changes 需要校验令牌、精确的 target 原像哈希和一个幂等键。它 返回一个签名 change token 和完整的 create/replace/delete 审查。

  10. 审查 change 后,在本地运行打印出的命令:

    backtrader-mcp approve \
      --change-set CHANGE_ID \
      --change-token 'SIGNED_TOKEN' \
      --yes

    审批记录写入私有本地数据库。没有用于审批的 MCP 工具,也没有 approved=true 参数。

  11. apply_strategy_changes 需要该审批 ID、签名 change token 和一个新的幂等键。它 会重新检查草稿和 target 哈希,暂存完整的受管目录,并使用带日志的 rename 事务。

  12. prepare_strategy_run 需要一个新的校验令牌、不可变 dataset ID、已注册的运行时 ID、超时、固定 run profile 之一(runonce、runnext、 runonce_runnext_compare 或 fixed_tests)以及一个幂等键。它冻结确切的草稿、 artifact、校验、数据集、运行时、profile 和超时哈希,并返回签名 run token。

  13. 审查这些冻结输入后,在本地单独创建一个执行审批:

    backtrader-mcp approve \
      --run-plan RUN_PLAN_ID \
      --run-token 'SIGNED_RUN_TOKEN' \
      --yes

    change 审批和 run 审批的 subject type 不同,不能互相复用。

  14. start_strategy_run 只接受该 run plan ID、签名 run token、执行审批 ID 和一个新 的幂等键。每 2-5 秒轮询一次 get_run_status 直到终态(响应含 log_uri、 elapsed_seconds 与 eta_bound);可选调用 cancel_strategy_run;用 get_run_result 读取归一化的 JSON 和 Markdown 报告。跨会话找回 job ID 用 list_jobs。FAILED/TIMED_OUT/ORPHANED 时,先用 get_run_logs 读取有界脱敏 日志尾部,再修改策略。

作业状态为 QUEUED、RUNNING、CANCEL_REQUESTED、CANCELLED、SUCCEEDED、 FAILED、TIMED_OUT 和 ORPHANED。每个迁移都是 compare-and-swap 写入,仲裁 规则唯一:终态一旦持久化永不被覆写,可见的 CANCEL_REQUESTED 会抑制 SUCCEEDED/FAILED/TIMED_OUT。取消已结束的作业会返回 already_terminal 而不是触碰它。

服务器自有的 watchdog(仅由 serve 启动,CLI 命令从不启动)消费 worker 心跳、以宽限期强制执行墙钟截止、把 worker 已死亡的作业判定为孤儿,并清理 脱离的候选进程组。作业报告结构化的 error_kind (user_strategy/resource_limit/timeout/validation/infrastructure/ cancelled/orphaned),让客户端能区分策略 bug、资源封顶与监督决策。

并发上限是"拒绝而非排队":达到 max_concurrent_jobs 时 start_strategy_run 失败并附可操作建议。保留策略:backtrader-mcp clean --kind jobs|cas|drafts|approvals|nonces --before YYYY-MM-DD 分别删除已结束的 作业记录、未被引用的 CAS 对象、未被引用的草稿、已消费或已过期的审批、已消费 的令牌 nonce。数据集注册逐行 流式处理(有界内存)、相同源免重解析去重,目录刷新复用 (mtime,size) 指纹缓存。

成功结果恰好包含 11 个规范指标:bar_num、buy_count、sell_count、 win_count、loss_count、trade_num、final_value、sharpe_ratio、 annual_return、max_drawdown 和 return_rate。sharpe_ratio 和 annual_return 可为空。内置的 comparison-profile-v1 定义了运行比较时确定性的整 数相等判定和浮点容差。

执行语义

  • 默认 sizer 为 bt.sizers.FixedSize(stake=1):不带 size 的 self.buy() 恰好 成交 1 单位。模板在关键处演示显式 sizing(order_risk 使用风险比例)。

  • 佣金为双边固定百分比(cerebro.broker.setcommission(percabs=True))。

  • 无 cheat-on-close;市价单在下一根 bar 的开盘价成交。

  • SharpeRatio 假设无风险利率 0.01、总体标准差;年化因子随数据 timeframe (252/52/12)。

  • max_drawdown 以正数百分比报告。

  • yahoo adapter 存储未调整收盘价(adjclose=False),不应用调整元数据。

  • CloudQuant fork 默认 bar2edge=True 重采样,与上游 backtrader 不同。

  • parameter_sweep 每个网格组合以 runonce 执行一次,参数经 cerebro.addstrategy(..., **override) 传入;一次审批覆盖整个冻结网格 (最多 64 个组合)。

Typed 数据 adapter 与 bar 操作

register_local_dataset 接受六个独立的 typed adapter:generic_csv、 backtrader_csv、yahoo_csv、mt5_csv、pandas 和 pandas_custom_lines。每个 源在执行前都被解析并归一化为不可变的规范 CSV 对象。受控 worker 随后为每个 feed 构 造具名的 Backtrader adapter,而不会把所有格式都悄悄走 GenericCSVData。

Pandas 输入必须使用 source_type=materialized_dataframe 并引用一个受限的 .csv 文件。pickle、任意 Python 对象和调用方提供的构造器都会被拒绝。pandas_custom_lines 还要求每条自定义 line 同时在 lines 和 columns 中声明。

每个 feed 可声明一个 typed extensions.bar_operation:

{"mode": "direct"}

或:

{"mode": "resample", "timeframe": "minutes", "compression": 5}

mode 也可为 replay。resample 和 replay 分别通过 Cerebro.resampledata 和 Cerebro.replaydata 应用。成功的 fixed-test 结果包含按 mode 记录的 feed_runtime 证据:请求格式、实际 adapter 类、bar 操作、源行数和输出 bar 数。

安全模型

  • stdio 只把协议帧写入 stdout。候选项的 stdout/stderr 被重定向到按作业私有的日志 文件。

  • source、target、draft、CAS 和作业路径都被限定。符号链接和父目录穿越在调用方控制 的边界处被拒绝。

  • 校验和 change token 使用随机 256 位本地密钥、随机 nonce、过期时间,以及对规范哈 希绑定的 HMAC-SHA256。

  • apply 授权只来自可信的本地 CLI 记录。

  • target 应用会替换整个受管策略目录。调用方必须提供每个既有文件的精确哈希,包括即 将被删除的文件。

  • 候选代码绝不被 MCP 进程导入。worker 用固定解释器、固定入口、最小环境、独立进程 组、超时、捕获输出和已校验的结果契约来启动它。

进程控制在 POSIX 上使用独立 session 与 resource-limit pre-exec hook;在非 POSIX 上 不会传入这两个参数、可用时使用 Windows process group,并只保留启动所需的 SystemRoot 环境变量。自动化套件覆盖两类分支契约,但尚未记录真实 Windows 的十四格 host 运行结果。

静态 AST 策略加子进程并不是 OS 沙箱。经审查的候选代码仍以本地用户的文件系统权限运 行。P0 面向可信的本地策略开发;对恶意代码请在容器或受限 OS 账户中运行。SQLite 状态 是单主机的,带日志的目录交换可崩溃恢复,但不是多主机分布式事务。取消是基于进程的, 不是 MCP Tasks 能力。watchdog 清理只记录 PID 而不绑定进程启动时间;在长期运行的宿主 上,被复用的 PID 理论上可能被误发信号,心跳失速判定是主要防线。

审批的宿主假设。 change/run 审批只由可信本地 CLI 创建,但"人机分离" 只在宿主不给 Agent 本地命令执行能力时成立:有 shell 权限的 Agent 可以自行 运行打印出来的 approve 命令。每条审批记录及其审计行都携带本地审批者的 OS 身份;需要更强隔离时,请把 approve CLI 置于 sudo/另一 OS 账户或 Agent 触达 范围之外的审批守护进程之后。签名令牌现在携带一次性 nonce,在授权落地点 (apply/start)原子消费;重放、过期或时钟偏移超窗的令牌一律被拒绝。Windows 上锁层回退到 msvcrt 字节范围锁,但真实 Windows 宿主运行仍未记录。

相关资源

CloudQuant Backtrader 生态:

开发与验收

所有命令在本目录下运行:

python -m pip install -e ".[test]"
PYTHONPATH=src python -m pytest -q
ruff check src tests scripts
ruff format --check src tests scripts
PYTHONPATH=src python -m mypy src/backtrader_mcp
# 配合安装章节中的四个 BACKTRADER_MCP_* root 变量:
PYTHONPATH=src python -m backtrader_mcp doctor
PYTHONPATH=src python -m backtrader_mcp audit-independence
python scripts/run_acceptance.py --matrix all \
  --require-no-skills --require-no-agent

项目依赖固定 cloudQuant/backtrader 的 commit 3c967ed61be184c0099ba5bef55d4bed09ad0b4a,不接受公开 PyPI Backtrader fallback。 测试运行时依次解析显式 BACKTRADER_MCP_TEST_RUNTIME_ROOT、相邻 checkout、已安装包; 每个候选都必须通过 CloudQuant 溯源校验,显式路径无效或不可信时会 fail closed。Ruff 是 唯一 formatter,mypy 是 required 质量门禁。当前分支覆盖率门槛为 80%,以配置中的精确值 作为发布标准。

协议测试只把 mcp==2.0.0 安装到一个临时目标目录,绝不升级或移除用户基础环境的 mcp==1.20.0。固定的验收入口消费一个结构化的 14 格 artifact,而不是从 pytest 进 度点推断成功。它先构建临时 wheel,再根据仓库 constraints 把 wheel 的 [test] 依赖 闭包安装到干净的临时目标,并从本源码检出之外的另一个目录运行 pytest。该 target 必须 包含固定的 CloudQuant Backtrader 分发及匹配的 direct-URL 溯源记录,因此不会借用活动 环境中的产品依赖;backtrader_mcp 本身只从已安装的 wheel target 导入。

矩阵把全部七个 archetype × 两种输出 profile 作为真实的 runonce/runnext 子进程回测 执行,覆盖全部六个 adapter 加 resample/replay,并记录 inspect/register/preview、 draft/validate、prepare/apply、run 和 compare 证据。其 JSON 输出还记录 wheel SHA-256、已安装模块来源、source_checkout_on_sys_path=false、sibling 产品缺失以及 独立性审计。调用方不能提供任意 pytest 目标。wheel 验收还会验证完整快照的确切 SHA-256,并从本仓库之外的干净临时 site 目录导入 / 搜索它,且 PYTHONPATH 上没有 sibling AI 产品。

Available Tools

30 tools
apply_strategy_changesApply Strategy ChangesA
DestructiveIdempotent

Apply only an exact change with a trusted local CLI approval record.

    Destructive: replaces the entire managed target strategy directory after
    rechecking every preimage hash.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
approval_idYes
change_tokenYes
change_set_idYes
idempotency_keyYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior5/5

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

The description goes beyond the destructiveHint annotation by specifying exactly what gets replaced ('the entire managed target strategy directory') and the safety step taken ('after rechecking every preimage hash'). It also communicates a prerequisite ('trusted local CLI approval record') that is not present in the annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is extremely compact: two short sentences that front-load the core constraint and then state the destructive behavior. Every sentence earns its place and there is no redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the destructive behavior and a prerequisite, but for a 4-required-parameter tool with zero schema descriptions, it leaves the agent without enough information to construct valid arguments. It does not reference sibling tools like prepare_strategy_changes that likely produce the required IDs, and it does not explain how idempotency_key or change_token should be obtained.

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

Parameters1/5

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

Schema description coverage is 0% and the description provides no explanation of any of the four required parameters (change_set_id, change_token, approval_id, idempotency_key). The parameter names are self-descriptive at a surface level, but the description adds nothing about their origin, format, or relationship to other tools.

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 clearly identifies the action ('Apply') and the resource ('strategy changes'), and adds an important scope constraint: 'only an exact change with a trusted local CLI approval record.' However, it does not explicitly distinguish itself from sibling tools like apply_strategy_repair or prepare_strategy_changes, so the differentiation is implied rather than named.

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?

The phrase 'Apply only an exact change with a trusted local CLI approval record' gives clear context about when this tool is appropriate: for exact, pre-approved changes only. It does not name alternatives or state when not to use it, so it stops short of a full 5.

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

apply_strategy_repairApply Strategy RepairB
Idempotent

Apply an exact-hash repair and invalidate the old validation capability.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYes
draft_idYes
relative_pathYes
validation_idYes
idempotency_keyYes
expected_revisionYes
expected_file_hashYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior4/5

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

Given that annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=true, the description adds value by explicitly stating that the old validation capability is invalidated. This is a meaningful behavioral side effect not captured by the annotations, though further side-effect detail is sparse.

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?

The description is a single, focused sentence with no filler or repetition. It is concise but somewhat under-specified; it states the core action and side effect without elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With seven required parameters, zero schema descriptions, and no usage guidance, this description is far from complete for an agent to invoke the tool safely. The output schema reduces the need to explain return values, but the operational context and parameter semantics are still major gaps.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden for explaining the seven required parameters. It only weakly hints at 'exact-hash' and 'validation', leaving draft_id, relative_path, content, expected_revision, and idempotency_key semantically unexplained.

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 uses a specific verb ('apply') and names a concrete operation ('exact-hash repair') with a clear side effect ('invalidate the old validation capability'). This distinguishes it from siblings like apply_strategy_changes and validate_strategy_draft, though 'exact-hash repair' remains somewhat domain-specific jargon.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to use this tool versus alternatives such as apply_strategy_changes or validate_strategy_draft. No prerequisites, exclusions, or context for choosing this tool are provided, leaving the agent to guess based on the name alone.

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

audit_independenceAudit IndependenceA
Read-only

Audit source imports and dynamic execution against product boundaries.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds useful scope by identifying what is audited, but it doesn't explain what 'audit' entails operationally or what the outcome reflects beyond the product-boundary check.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is a single well-structured sentence with no filler. The verb and resource are front-loaded, and every word contributes to the overall meaning.

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?

With zero parameters, read-only annotations, and an output schema present, the description covers the essential invocation context. The main gap is the lack of usage guidance or expected output semantics, but the low parameter complexity and available annotations make the description reasonably complete.

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?

The tool has zero parameters, so there is no parameter burden for the description to carry. Schema description coverage is effectively complete, and the description adds no parameter-level detail because none is needed.

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 names a specific verb ('Audit') and a distinct resource ('source imports and dynamic execution') with a stated criterion ('against product boundaries'). It is clear enough to distinguish from siblings, though 'product boundaries' is somewhat vague and could use one clarifying phrase.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool compared to siblings like validate_strategy_spec, inspect_dataset, or doctor. The description implies an auditing use case but provides no explicit when-to-use or exclusionary context.

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

cancel_strategy_runCancel Strategy RunB
DestructiveIdempotent

Cancel a queued or running product job.

    Destructive: terminates the worker and candidate processes.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYes
idempotency_keyYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true. The description adds critical context beyond annotations: 'terminates the worker and candidate processes.' This discloses the concrete destructive effect, which is valuable for an agent deciding whether to invoke this tool. No contradiction with annotations.

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?

The description is extremely brief—two short sentences. The first sentence states the purpose, and the second adds the key destructive detail. It's front-loaded and efficient, though it could arguably include a bit more context without becoming bloated.

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?

The tool has an output schema, so return values are covered elsewhere. The description covers the core action and the destructive effect. However, it doesn't explain the idempotency_key parameter's role or what happens if the job is already completed, which are relevant for a cancellation tool. The annotations cover safety, but the parameter semantics gap remains.

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

Parameters2/5

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

Schema description coverage is 0%, and the description provides no explanation of what job_id or idempotency_key mean or how they should be formatted. The parameter names are somewhat self-explanatory, but the description adds zero value beyond the schema. With 0% coverage, the description should compensate but doesn't.

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 ('Cancel') and resource ('queued or running product job'), which clearly distinguishes it from sibling tools like start_strategy_run and get_run_status. It doesn't explicitly name a sibling alternative, but the action is unambiguous.

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 implies usage for queued or running jobs, which gives some context. However, it doesn't explicitly state when not to use it (e.g., for completed jobs) or mention alternatives like get_run_status for checking state first. The 'queued or running' qualifier provides partial guidance.

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

compare_strategy_runsCompare Strategy RunsB
Read-only

Compare canonical metrics and provenance using comparison-profile-v1.

ParametersJSON Schema
NameRequiredDescriptionDefault
left_run_idYes
right_run_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description's 'Compare' is consistent with a non-mutating operation. It adds context that the comparison covers canonical metrics and provenance under comparison-profile-v1, but it does not describe output behavior, errors, or side effects; the annotations cover the safety profile.

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?

The description is a single sentence with no filler, front-loading the action ('Compare') and the subject. It is appropriately brief for a simple tool, though the brevity contributes to the under-specification of usage and parameters.

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?

For a simple read-only comparison tool with two self-named parameters and an output schema, the description covers the core purpose. However, it leaves 'comparison-profile-v1' and 'canonical metrics' undefined and provides no guidance on how this differs from related run tools, so an agent may lack enough context to know when it is the right call.

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

Parameters2/5

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

Schema description coverage is 0%, and the description says nothing about left_run_id or right_run_id. The parameter names and titles are self-explanatory, but the description does not compensate for the missing schema descriptions or explain what 'left' and 'right' mean in this comparison.

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 uses a specific verb ('Compare'), names the resource ('strategy runs'), and specifies the object ('canonical metrics and provenance') plus the profile version. It is the only compare tool among the siblings, so an agent can likely distinguish it from get_run_result or inspect_strategy, though it does not explicitly call out those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to choose this over siblings such as get_run_result, render_strategy_report, or audit_independence. It implies comparison between two runs, but there is no 'use this when...' or 'for X use Y instead' statement, so the agent must infer usage.

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

create_strategy_draftCreate Strategy DraftB

Create a private single-test or Python-bundle draft.

    strategy_spec must satisfy the strategy-spec-v1 JSON Schema contract
    (available at backtrader-mcp://contracts/strategy-spec). Each call
    creates a new draft ID.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
strategy_specYes
scaffold_profileNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior3/5

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

Annotations are all false and carry little positive information, so the description must carry the behavioral burden. It does add useful context: drafts are private, each call produces a new draft ID, and strategy_spec must satisfy a named contract. However, it does not disclose side effects, permissions, or failure behavior. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is short and front-loaded. Every sentence earns its place: core purpose, schema contract, and non-idempotency. There is no filler, repetition, or restatement of the tool name.

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?

An output schema exists, so return values need not be explained. The required strategy_spec parameter is constrained via the contract URI, and the tool's creation behavior is clear. However, scaffold_profile is left unexplained, and no pointer to update/validate siblings is provided. This is adequate for basic calls but incomplete for full parameter understanding.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It meaningfully constrains strategy_spec by pointing to the strategy-spec-v1 contract URI, but it never explains scaffold_profile, its values, or its effect on the created draft. One of the two parameters is therefore entirely undocumented.

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?

The description opens with a specific verb and resource: 'Create a private single-test or Python-bundle draft.' It also adds that each call creates a new draft ID, which helps distinguish this creation tool from siblings like update_strategy_draft and get_strategy_draft.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance about when to use this tool versus update_strategy_draft, validate_strategy_draft, or prepare_strategy_changes. The non-idempotent creation behavior is implied, but no alternatives or prerequisites are stated, so the agent must infer usage on its own.

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

derive_tabular_datasetDerive Tabular DatasetA
Idempotent

Run one product-owned tabular transform into a new immutable dataset.

    Supported profiles: identity, dropna, returns, sma. Requires the exact
    source-manifest hash; identical inputs yield the same derived dataset ID.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
typed_paramsYes
source_dataset_idYes
transform_profile_idYes
expected_manifest_hashYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior4/5

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

The description adds useful behavioral context beyond the annotations: it states the output is immutable and that identical inputs yield the same derived dataset ID, which concretizes the idempotentHint. It does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is short, front-loaded, and every sentence contributes meaningful information. There is no filler or repetition of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the required nested typed_params object and the lack of any schema commentary, the description is not complete enough for an agent to know what parameters to pass for each supported profile. The output schema may cover return values, but the input side still has a critical documentation gap.

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

Parameters2/5

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

With 0% schema description coverage, the description must compensate. It does explain transform_profile_id values and expected_manifest_hash requirements, but it leaves typed_params completely unspecified even though it is a required free-form object. source_dataset_id is also only implied by its name, so the most ambiguous parameter has no semantic guidance.

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?

The description uses a specific verb and resource ('Run one product-owned tabular transform') and makes the output clear ('new immutable dataset'). This clearly separates it from sibling tools like register_dataset or preview_dataset, and the supported profiles add further specificity.

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 implies when to use the tool by listing supported profiles and requiring an exact manifest hash, but it does not explicitly state when not to use it or point to alternatives. Usage context is inferable rather than directly stated.

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

doctorDoctorA
Read-only

Diagnose package dependencies, configured roots, and Backtrader runtimes.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds the three focus areas, but does not explain what running a diagnostic entails or what kind of output to expect beyond what the output schema presumably provides.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is a single, focused sentence that front-loads the action verb and immediately names the objects of diagnosis. It contains no filler, repetition, or unnecessary elaboration.

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 zero-parameter, read-only diagnostic with safety annotations and an output schema, the description identifies the domain well enough to guide usage. It could be slightly richer about the nature of the diagnostic, but the output schema likely covers return details.

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?

The tool has zero parameters, so the input schema fully documents the input surface. The description correctly adds no parameter-specific details, matching the baseline for zero-parameter tools.

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?

The description uses the concrete verb 'Diagnose' and specifies three distinct resources: package dependencies, configured roots, and Backtrader runtimes. This clearly distinguishes the tool from sibling tools focused on datasets, strategies, runs, and catalog operations.

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 scope implies use for diagnosing environment, dependency, root, and runtime health, but the description does not state when to use this tool over alternatives or when not to use it. No explicit conditions or exclusions are provided.

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

get_catalog_snapshotCatalog SnapshotA
Read-only

Read the bundled immutable strategy catalog snapshot.

    By default returns only counts, hashes, and provenance (extensions.
    entry_count reports the 1155 records). Set include_entries=true to page
    through entries with limit (1-100) and offset; pagination reports
    total/has_more/truncated. Prefer search_strategy_catalog for queries.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
include_entriesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint=true, the description adds substantial behavioral context beyond annotations: the snapshot is bundled and immutable, default returns are limited to counts/hashes/provenance, entry_count reports 1155 records, and pagination exposes total/has_more/truncated. No contradictions with the annotations.

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?

The description is concise and front-loaded with the primary purpose, then default behavior, then optional paging, then the alternative. There is minor wasted or malformed text in 'provenance (extensions.' which reads as an incomplete parenthetical, slightly hurting clarity.

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 read-only tool with an output schema, the description covers the essential context: default vs paged behavior, parameter ranges, pagination semantics, and the sibling tool to prefer for queries. Nothing critical is missing for correct invocation.

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?

The schema provides parameter names and defaults but 0% description coverage. The description compensates by explaining include_entries behavior, limit range (1-100), offset paging, and pagination output fields. It could be slightly more explicit about the exact meaning of each parameter, but the core semantics are conveyed.

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?

The description uses a specific verb and resource: 'Read the bundled immutable strategy catalog snapshot.' It clearly describes what the tool returns (counts, hashes, provenance, or paged entries) and differentiates it from sibling search_strategy_catalog by naming that alternative explicitly.

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?

The description gives clear context on default usage versus paged entry retrieval and explicitly says 'Prefer search_strategy_catalog for queries.' It does not exhaustively enumerate exclusions, but the main alternative and the conditions for choosing it are clearly stated.

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

get_run_logsRun LogsA
Read-only

Read bounded tails of a job's private log files.

    Use after a FAILED/TIMED_OUT/ORPHANED job to diagnose the cause before
    changing the strategy. tail_bytes is capped at 25000; absolute paths in
    log content are redacted.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYes
tail_bytesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate read-only and non-destructive behavior, and the description adds valuable operational constraints: tail_bytes is capped at 25000 and absolute paths in log content are redacted. These details go beyond the annotations and help set agent expectations about limits and data privacy.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Two focused sentences with no filler. The core action is stated first, followed by actionable usage guidance and key constraints. Every sentence earns its place.

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?

The tool is a simple read operation with an output schema available, so the description does not need to explain return values. The annotations cover safety, and the description provides usage timing, parameter limits, and redaction behavior, making it complete for an agent to select and invoke correctly.

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 description coverage is 0%, but the description compensates by explaining the meaning of tail_bytes through 'bounded tails' and the explicit cap of 25000. It also clarifies that job_id refers to the job whose private logs are being read. It does not detail formatting or defaults, but the core parameter semantics are communicated.

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?

The description uses a specific verb ('Read') with a clear resource ('bounded tails of a job's private log files'), making the tool's function immediately obvious. It is distinct from sibling tools like get_run_status or get_run_result, which deal with status and results rather than raw log content.

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?

The description explicitly states when to use the tool: 'Use after a FAILED/TIMED_OUT/ORPHANED job to diagnose the cause before changing the strategy.' This is strong contextual guidance, though it does not name alternative tools or provide explicit when-not-to-use conditions.

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

get_run_resultRun ResultA
Read-only

Read the normalized result and Markdown report for a successful job.

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description's 'Read' is consistent with that. It adds useful context about the return content and the success precondition, but it does not disclose behavior on failed jobs or any other edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

A single sentence with no filler. The action, object, and condition are all present and front-loaded, making it easy to parse.

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?

With annotations covering the safety profile, an output schema covering return shape, and one clearly named parameter, the description is mostly sufficient. The main gap is explicit guidance for failed jobs, but that is minor for a simple read-only retrieval tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It does not explain that job_id identifies the specific job whose run result should be read, leaving the only parameter to be inferred from its name and title.

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?

The description uses a specific verb, 'Read', and names concrete outputs: 'normalized result and Markdown report'. Scoping it to 'a successful job' helps distinguish it from siblings like get_run_status and get_run_logs.

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?

'For a successful job' implies a precondition for using this tool, but it does not explicitly mention alternatives or when not to use it. An agent must infer that get_run_status or get_run_logs are better suited for checking status or diagnosing failures.

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

get_run_statusRun StatusA
Read-only

Read the durable state of a product-owned asynchronous run.

    Includes derived polling fields: log_uri (see get_run_logs),
    elapsed_seconds, and eta_bound for active jobs. Terminal states:
    SUCCEEDED, FAILED, TIMED_OUT, CANCELLED, ORPHANED.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description builds on that by explaining the durable-state semantics, the derived polling fields, and the exact terminal-state vocabulary. This adds useful behavior beyond the annotation flags without contradicting them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The key action is front-loaded in the first line and the supporting facts (derived fields, terminal states, log sibling) are compactly grouped. Every sentence carries distinct information with no filler.

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?

With an output schema present, the return-value details are not the description's job; it supplies the run-state vocabulary, polling fields, and a pointer to get_run_logs. It is complete for a simple single-parameter read operation, though it could have noted the source/format of job_id.

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

Parameters2/5

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

There is one required parameter, job_id, and schema description coverage is 0%; the description never explains what job_id is, where it comes from, or its expected format beyond the schema's property name. The parameter is self-descriptive, but the description does not compensate for the lack of any schema-level documentation.

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?

Starts with a precise verb-resource pair: 'Read the durable state of a product-owned asynchronous run.' It also distinguishes itself from get_run_logs by noting that log_uri belongs to the log tool, and enumerates terminal states, so an agent can tell status from result/log tools.

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?

The description provides clear usage context for polling a run: it is read-only, includes derived polling fields (elapsed_seconds, eta_bound), and points to get_run_logs as the sibling for log content. It does not explicitly list when-not-to-use conditions versus get_run_result, but the context is strong enough.

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

get_strategy_draftRead Strategy DraftB
Read-only

Read a private draft with exact file hashes.

ParametersJSON Schema
NameRequiredDescriptionDefault
draft_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds the 'private' scope and that the response includes 'exact file hashes,' but does not disclose more about permissions, errors, or availability.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler. Every word contributes meaning: 'Read,' 'private draft,' and 'exact file hashes' all add value.

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?

With one required parameter, read-only annotations, and an output schema, the description gives enough context for basic invocation. It conveys the private scope and the hash-related return detail; mentioning potential access restrictions would improve completeness but is not essential.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain draft_id beyond the schema's bare title. Although draft_id is a simple and arguably self-explanatory parameter, the low schema coverage means the description should compensate more than it does.

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 clearly states the verb 'Read' and the resource 'private draft,' and adds 'with exact file hashes' to specify the output detail. It does not explicitly distinguish itself from sibling tools like inspect_strategy, but the private-draft scope provides reasonable clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus alternatives such as inspect_strategy, search_strategy_catalog, or get_catalog_snapshot. The only implied usage is reading a private draft, with no exclusions or context.

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

inspect_datasetInspect DatasetA
Read-only

Inspect a confined local CSV without registering it.

    Returns the detected columns and a bounded sample. Use this before
    register_dataset to build an explicit column map.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
root_idYes
relative_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds meaningful context: the operation is confined to a local CSV and does not register it, plus it returns a bounded sample. This goes beyond the safety profile already encoded in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Two sentences with no filler: the core action and non-registration aspect are front-loaded, the return behavior is stated, and the intended workflow placement is given. Every sentence earns its place.

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?

Given simple parameters, strong annotations, and an output schema, the description covers the operation's purpose, safety, and workflow context. The main gap is parameter semantics: root_id and relative_path are not described, so an agent may not know how to construct valid arguments without further inference.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the burden of explaining parameters. It mentions 'local CSV' generally but does not explain what root_id or relative_path mean, how they relate, or what formats are expected. The parameter names are somewhat self-explanatory, but the description does not compensate for the missing schema descriptions.

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 ('Inspect') and resource ('confined local CSV'), and explicitly differentiates from registration by saying 'without registering it'. It also names the return value (detected columns and bounded sample), so an agent can tell this apart from register_dataset and preview_dataset.

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?

Explicitly says to use it before register_dataset to build an explicit column map, giving a clear workflow trigger. It does not enumerate when-not-to-use or name alternative tools beyond register_dataset, so it stops short of full alternative routing.

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

inspect_strategyInspect StrategyB
Read-only

Inspect bundled or source-attached strategy metadata without importing it.

ParametersJSON Schema
NameRequiredDescriptionDefault
strategy_idYes
expected_source_hashNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds the key behavioral trait that no import occurs, which is valuable. However, it does not disclose what 'metadata' includes, whether expected_source_hash affects behavior, or what happens if the hash mismatches. With annotations covering safety, a 3 is appropriate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

One sentence, front-loaded with the verb and resource, and the key non-import behavior is stated immediately. No wasted words.

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?

The tool has an output schema, so return values are presumably documented there. However, with 0% parameter coverage and a non-obvious optional parameter (expected_source_hash), the description leaves a meaningful gap: an agent cannot tell what the hash is for or when to provide it. For a read-only inspection tool this is adequate but not complete.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for the two parameters. It does not explain strategy_id beyond its name, and expected_source_hash is entirely unexplained—an agent cannot know its purpose or whether it is required for verification. The description adds no parameter-level meaning.

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 ('Inspect') and resource ('bundled or source-attached strategy metadata') and clarifies that it does not import the strategy. This distinguishes it from import-like operations, though it doesn't explicitly name a sibling alternative. The phrase 'without importing it' adds useful scope.

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 implies when to use this tool: when you need to inspect metadata without importing. However, it does not explicitly state when not to use it or name alternatives among the many siblings (e.g., get_strategy_draft, validate_strategy_spec). The context is clear but exclusions are absent.

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

list_jobsList JobsA
Read-only

List durable jobs newest-first with pagination metadata.

    Filter by a job state or the pseudo-state "active" (QUEUED/RUNNING/
    CANCEL_REQUESTED). Unknown states enumerate the valid values. Advance
    through pages with offset while has_more is true.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
stateNo
offsetNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses non-obvious behaviors: the 'active' pseudo-state expands to QUEUED/RUNNING/CANCEL_REQUESTED, unknown states cause enumeration of valid values, and pagination advances with offset while has_more is true. This gives an agent accurate expectations for edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is compact and front-loaded, with the core purpose in the first sentence and each subsequent sentence adding a specific, non-redundant usage detail. No filler or repetition exists.

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?

The description is complete for a read-only list tool with an existing output schema: it covers filtering, state semantics, and the pagination loop. The only minor gap is explicit default-limit behavior, but the schema provides the default, so the information is accessible.

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?

With 0% schema description coverage, the description compensates well for state (pseudo-state semantics, unknown-state behavior) and offset (page-advance condition). Limit is not explicitly described, but its name and schema default convey its role; overall, parameter meaning is significantly enriched.

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?

The description opens with a specific verb and resource ('List durable jobs') plus an explicit ordering ('newest-first'), immediately distinguishing it from sibling tools that operate on strategy runs, drafts, and datasets. No ambiguity remains about what this tool does.

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?

The description gives clear operational context: how to filter by state, what the 'active' pseudo-state means, how to handle unknown states, and how to paginate using offset and has_more. It does not name alternative tools, but no sibling has an overlapping purpose, so explicit exclusions are unnecessary.

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

list_strategy_templatesList Strategy TemplatesA
Read-only

List the fourteen archetype/output-profile scaffold templates.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, and destructiveHint=false, covering the safety profile. The description adds only the fixed count of fourteen archetype/output-profile templates, but does not describe output behavior, ordering, or return structure. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

A single, front-loaded sentence with no wasted words. It communicates the verb, resource, and a meaningful constraint in under ten words.

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 zero-argument, read-only tool with an output schema, the description is nearly complete: it names the resource and fixed count. It lacks explicit usage-routing context, but nothing about invoking the tool is missing.

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?

The tool has zero parameters and 100% schema coverage, so there are no parameter semantics to explain. The zero-parameter baseline of 4 applies, and the description appropriately does not attempt to document nonexistent parameters.

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 action ('List') and a precise resource ('the fourteen archetype/output-profile scaffold templates'), adding detail beyond the title. This clearly distinguishes it from sibling tools like list_target_tree or get_catalog_snapshot.

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?

There is no explicit when-to-use or alternative routing, but the description implies that this tool is for retrieving scaffold templates for strategy archetypes/output profiles. The usage context is minimal and left mostly to inference.

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

list_target_treeList Target TreeA
Read-only

Read a confined target directory tree as relative-path to sha256.

    Use before prepare_strategy_changes to construct exact
    expected_target_hashes preimages.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
target_root_idYes
target_relative_dirYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds that the read is 'confined' and returns relative-path to sha256 pairs, which are behavioral details not in the annotations. It does not disclose traversal edge cases (e.g., symlinks or hidden files), but the annotation safety profile lowers the burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Two short sentences carry all the content, with the core action front-loaded and the usage context in the second sentence. There is no filler or repetition of the schema field names.

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 and read-only annotations, the description covers purpose and usage adequately. However, the complete absence of parameter semantics for both required arguments leaves an agent guessing about valid values for target_relative_dir, so the description is only minimally complete.

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

Parameters2/5

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

Schema description coverage is 0%, and the description never explains target_root_id or target_relative_dir beyond what their names already imply. There is no format guidance, relationship between the two parameters, or example, so the description fails to compensate for the schema gap.

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?

The description opens with a specific verb and resource: 'Read a confined target directory tree as relative-path to sha256.' It states both the scope and the output shape, and the reference to prepare_strategy_changes separates it from other read/list tools among the siblings.

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?

It explicitly says to use the tool before prepare_strategy_changes to construct expected_target_hashes preimages, giving a clear trigger condition. It does not spell out when not to use it or name alternatives, so it stops one step short of a full 5.

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

prepare_strategy_changesPrepare Strategy ChangesA
Idempotent

Prepare an exact diff; this does not approve or write the target.

    Returns a signed change token and the printed local approval command.
    apply_strategy_changes requires the approval created by that command.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
draft_idYes
target_root_idYes
idempotency_keyYes
validation_tokenYes
target_relative_dirYes
expected_target_hashesYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

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

Annotations already provide idempotent and non-destructive hints, so the description adds valuable context about the no-write/no-approve boundary, the signed change token, and the printed local approval command. This clarifies the two-phase workflow beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is three tight sentences. The core behavior is front-loaded, followed by the most important output detail and the dependency on the approval command. No filler.

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?

The workflow and output are reasonably covered, and the output schema likely documents return details. However, the parameter contract is completely undocumented and there is no guidance about preparing the required hashes/validation token, leaving a meaningful gap for a six-parameter tool.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain any of the six required parameters. Terms like validation_token, expected_target_hashes, target_relative_dir, and idempotency_key are left to the agent to infer from names alone.

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?

The description states a specific action ('prepare an exact diff') and explicitly scopes what it does not do ('does not approve or write the target'). This clearly distinguishes it from apply_strategy_changes and other strategy tools.

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?

The description implies when to use this tool by noting that apply_strategy_changes requires the approval created here. It provides a clear sequencing hint, though it does not explicitly say 'use this before apply_strategy_changes' or mention alternative tools.

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

prepare_strategy_runPrepare Strategy RunA
Idempotent

Freeze exact run inputs and return a signed plan requiring local approval.

    The response includes the printed local approval command. A separate
    execution approval is mandatory before start_strategy_run. For
    run_profile_id=parameter_sweep, param_grid maps StrategySpec parameter
    names to value lists (at most 64 combinations); one approval covers
    the whole grid.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
draft_idYes
dataset_idYes
param_gridNo
runtime_idNodefault
run_profile_idNofixed_tests
idempotency_keyNo
timeout_secondsNo
validation_tokenYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior5/5

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

Beyond annotations, the description discloses meaningful behavior: the output is a signed plan requiring local approval, the response includes the printed approval command, and a second approval is needed before execution. It also specifies the param_grid combination limit and that one approval covers the entire grid. No contradiction with annotations exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is compact and front-loaded. The core purpose appears in the first sentence, and the second sentence delivers targeted edge-case behavior. There is no filler or redundant restatement of the tool name.

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?

The approval workflow and parameter_sweep behavior are well covered, and the presence of an output schema reduces the need to describe return values. However, with eight parameters and zero parameter descriptions in the schema, the tool is not fully self-sufficient for an agent: critical fields like validation_token and runtime_id are left to inference.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden of explaining parameters. It only adds semantic value for run_profile_id and param_grid. Required parameters like draft_id, validation_token, and dataset_id, plus others like runtime_id and timeout_seconds, remain unexplained, leaving an agent to infer their meaning from names and types alone.

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?

The description states a specific verb and resource: 'Freeze exact run inputs and return a signed plan requiring local approval.' This clearly contrasts with sibling run execution tool start_strategy_run and communicates what makes this preparation step distinct.

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?

The description clearly establishes the tool as a prerequisite to start_strategy_run by stating that 'a separate execution approval is mandatory before start_strategy_run.' It also gives conditional usage guidance for the parameter_sweep profile. It does not explicitly name alternatives or when-not-to-use cases, but the workflow context is clear.

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

preview_datasetPreview DatasetA
Read-only

Return a bounded preview of an immutable dataset.

    Includes a truncation_message telling how to raise the limit (up to the
    configured max) or derive a filtered dataset.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
dataset_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds useful behavioral context: the dataset is immutable and the response includes a truncation_message that explains how to raise the limit or derive a filtered dataset. No contradiction exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is two tight sentences. The core purpose is front-loaded, and the second sentence adds exactly one valuable behavioral detail without any fluff.

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?

An output schema exists, so return values do not need to be spelled out. Combined with annotations, the description gives enough behavioral context for a read-only preview tool, though it misses sibling differentiation.

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?

The schema has zero description coverage, so the description must carry meaning for the parameters. It partially explains limit by referencing a configured maximum and the truncation_message guidance, but dataset_id is left entirely to inference.

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 opens with 'Return a bounded preview of an immutable dataset,' which is a specific verb, resource, and scope. It clearly says what the tool does, though it does not explicitly distinguish itself from the sibling inspect_dataset.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use preview_dataset instead of inspect_dataset, derive_tabular_dataset, or other siblings. The truncation_message note explains a follow-up behavior, not when or when not to select this tool.

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

refresh_strategy_catalogRefresh Strategy CatalogA

Refresh one AST root, or rebuild both metadata corpora when package_root_id is set.

    Scans metadata and hashes only; corpus files are never imported or executed.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
source_root_idYes
package_root_idNo
expected_previous_snapshot_hashNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior4/5

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

Annotations provide readOnly=false, openWorld=true, idempotent=false, and destructive=false, and the description adds a meaningful safety boundary: 'Scans metadata and hashes only; corpus files are never imported or executed.' This clarifies exactly what the refresh operation does not do, which is valuable beyond the annotation set. No contradiction is present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is two sentences, front-loaded with the primary behavior and conditional mode, followed by the key safety caveat. Every sentence carries useful information and there is no filler or repetition.

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?

Given an output schema exists, return values need not be explained. The description covers the two modes and the no-execution safety property, but leaves expected_previous_snapshot_hash semantics unexplained and gives no usage guidance relative to sibling tools. For an agent calling this tool, the optimistic-concurrency parameter is a notable gap.

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 0%, so the description must compensate. It does explain source_root_id and package_root_id semantically via the first sentence ('Refresh one AST root' vs 'rebuild both metadata corpora'), but expected_previous_snapshot_hash is left entirely to its parameter name, with no explanation of its concurrency or safety role.

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 action ('Refresh one AST root, or rebuild both metadata corpora') and distinguishes two modes based on package_root_id. It is clear about the resource being operated on, though it does not explicitly differentiate it from siblings like get_catalog_snapshot or prepare_strategy_changes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit guidance on when to use this tool versus alternatives. 'When package_root_id is set' describes an internal parameter condition, not a usage context or exclusion. The safety note about scanning metadata only implies a lightweight refresh, but no sibling tool is referenced.

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

register_datasetRegister DatasetB
Idempotent

Normalize a confined CSV into the immutable content-addressed store.

Requires an explicit canonical column map (datetime/open/high/low/close/ volume/openinterest). Identical content maps to the same dataset ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
root_idYes
column_mapYes
relative_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, but the description adds valuable context by explaining the mechanism: content is normalized and stored in an immutable content-addressed store, and identical content maps to the same dataset ID. This meaningfully clarifies retry and deduplication behavior beyond the annotation values. No contradiction with the annotations is present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is three short sentences, each earning its place: the core action, the required column map, and the content-addressing behavior. It is front-loaded with the verb and resource, and contains no filler or redundant restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the schema has zero parameter descriptions and there is a sibling tool for local registration, the description leaves important gaps. An agent still cannot determine what root_id and relative_path refer to or what 'confined CSV' means, which are necessary to invoke the tool correctly. The output schema exists, but that does not cover input parameter meaning.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden for parameter meaning. It explains the column_map values by listing the canonical fields (datetime/open/high/low/close/volume/openinterest), but it says nothing about root_id or relative_path, which are required and non-obvious. The description compensates for only one of the three parameters.

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 opens with a specific verb and resource: 'Normalize a confined CSV into the immutable content-addressed store.' It also clarifies the purpose by noting that identical content maps to the same dataset ID. However, it does not explicitly differentiate this from the sibling register_local_dataset, so it stops short of a 5.

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 provides clear context and a prerequisite — it requires an explicit canonical column map with the listed fields. It does not, however, say when to prefer register_dataset over alternatives like register_local_dataset, nor does it state any exclusion conditions. Usage is implied rather than explicit.

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

register_local_datasetRegister Local DatasetA
Idempotent

Register one or more local feeds from a hash-bound DataSpec v1.

    Accepts the six typed adapters (generic_csv, backtrader_csv, yahoo_csv,
    mt5_csv, pandas, pandas_custom_lines) with optional bar_operation
    (direct/resample/replay). Rejections enumerate the valid values.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
data_specYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already establish that this mutation is idempotent and non-destructive. The description adds useful behavioral detail: the set of accepted adapters, valid bar_operation modes, and the fact that invalid values are rejected with an enumeration of valid options.

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?

The description is compact and front-loaded with the core purpose, followed by the key allowed values. The unexplained 'hash-bound' terminology costs some clarity, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite an output schema and useful annotations, the open, nested data_spec parameter is underdocumented: an agent cannot confidently construct the DataSpec v1 or understand what 'one or more local feeds' requires. The description also fails to position the tool against the closely named register_dataset sibling.

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?

With 0% schema description coverage, the description is the only source of meaning for the data_spec object. It contributes adapter names and bar_operation values, but does not define the structure or semantics of a 'hash-bound DataSpec v1' or how multiple feeds are expressed, leaving a substantial gap.

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 identifies a concrete action, registering local feeds, and the resource (a hash-bound DataSpec v1). The 'local' qualifier and the adapter list distinguish it from sibling register_dataset, though it does not explicitly contrast them.

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 tool's scope is implied by 'local feeds' and by listing the six accepted adapters, but there is no explicit when-to-use guidance, no exclusion criteria, and no mention of register_dataset as the alternative for non-local registration.

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

render_strategy_reportRender Strategy ReportA
Read-only

Render a successful canonical result as Markdown or JSON.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_idYes
output_formatNomarkdown

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, and destructiveHint=false, so the description needs only to add context beyond those. It adds a success precondition and the output format behavior, but does not describe potential side effects, authentication needs, or response structure; the output schema likely covers return details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler or repetition. It conveys the core action and output options efficiently, even though the term 'canonical' could be clearer.

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?

Given the simple two-parameter read-only nature and the presence of an output schema, this is close to adequate for basic invocation. The main gaps are the undefined 'canonical result' terminology and the lack of explicit differentiation from sibling result/report tools, which is important given the large sibling set.

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 0%, so the description partially compensates by mapping 'Markdown or JSON' to output_format and connecting run_id to a successful canonical result. However, it does not clarify the exact run_id format or enumerate all valid output_format values beyond the two mentioned.

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 clearly states the action ('Render') and the resource ('a successful canonical result'), and it names the output formats (Markdown or JSON). It is not a tautology and is broadly distinguishable from siblings like get_run_result because it emphasizes formatting, though 'canonical result' is domain jargon that is not fully defined.

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 word 'successful' implies the tool should only be used when a successful canonical result already exists, giving an implicit usage condition. However, it does not explicitly name alternatives or state when to choose this renderer over related result/report tools such as get_run_result, compare_strategy_runs, or get_run_logs.

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

search_strategy_catalogSearch Strategy CatalogA
Read-only

Search deterministic built-in patterns by text and archetype.

    Returns total/has_more/offset pagination metadata. Empty results carry
    suggestions with the valid archetype list. Unknown archetypes enumerate
    the valid values in the error message.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo
offsetNo
archetypeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description reveals useful behavioral details: pagination metadata in responses, suggestions for empty results, and error behavior for unknown archetypes. This materially helps an agent anticipate edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The main sentence front-loads the tool's purpose, and the two follow-up sentences describe response and error behavior. There is no filler or redundancy.

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 read-only search tool with an output schema and annotations, the description covers invocation mode, pagination, empty results, and invalid input handling. It provides enough context for an agent to select and call the tool correctly.

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 0%, so the description must compensate. It explains that query is text search and archetype filters patterns, and offset is implied by pagination metadata. However, limit/offset semantics and valid archetype values are not explicitly defined, leaving partial coverage.

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 verb and resource: search deterministic built-in patterns by text and archetype. It clearly implies a filtered query over the catalog, which is distinct from snapshot/refresh siblings, though it does not explicitly name an alternative.

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?

The description gives clear context for when to use the tool: when searching built-in patterns by text or archetype. It does not explicitly exclude alternatives or mention get_catalog_snapshot for full listing, but the search trigger is stated directly.

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

start_strategy_runStart Strategy RunA
Idempotent

Consume a distinct local execution approval and launch a durable job.

    Returns a job_id; poll get_run_status until a terminal state, then read
    get_run_result on SUCCEEDED or get_run_logs on failure.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
run_tokenYes
approval_idYes
run_plan_idYes
idempotency_keyYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior4/5

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

The description adds behavioral detail beyond the annotations by disclosing that the tool consumes a local execution approval, launches an asynchronous durable job, and returns a job_id for polling. Nothing contradicts the annotations, which already mark the tool as idempotent and non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Two sentences carry the full purpose and the required follow-up workflow with no filler. The key action is front-loaded, and every clause adds operational value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is incomplete for invocation because all four required parameters are undocumented in both the schema and the description, and prerequisite steps such as acquiring the run plan and approval are only implied. The output schema covers return values, but the parameter semantics remain a major gap.

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

Parameters1/5

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

The input schema has 0% description coverage for all four required parameters, and the description explains none of them. run_plan_id, run_token, approval_id, and idempotency_key receive no semantic meaning, so an agent cannot reliably determine what values to supply.

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?

The description clearly states that this tool consumes an execution approval and launches a durable job, then returns a job_id. It differentiates itself from siblings like prepare_strategy_run, get_run_status, and cancel_strategy_run by naming the launch action and the resulting polling workflow.

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?

The description provides explicit lifecycle guidance: poll get_run_status until a terminal state, then read get_run_result on SUCCEEDED or get_run_logs on failure. It does not explicitly state prerequisites or when not to use this tool, but the follow-up workflow gives clear operational context.

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

update_strategy_draftUpdate Strategy DraftB

Update one editable draft file with optimistic concurrency.

Requires the current revision and exact file hash; stale values are rejected with a conflict error.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYes
draft_idYes
relative_pathYes
expected_revisionYes
expected_file_hashYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior4/5

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

The description goes beyond the annotations (readOnlyHint=false, destructiveHint=false) by disclosing that the operation uses optimistic concurrency and that stale values are rejected with a conflict error. This is valuable behavioral context not present in the annotations. It effectively communicates the concurrency mechanism and error behavior, though it does not detail side effects on the file or whether partial updates are allowed. Given the annotations already flag it as a write operation, the description adds meaningful transparency.

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?

The description is extremely concise—two sentences—with the core action front-loaded. There is no fluff. It manages to convey the purpose and a critical behavioral detail (optimistic concurrency) in very few words. It could be slightly longer to cover parameters, but as a concise statement it is efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With five required parameters, zero schema descriptions, and no output schema visible (though the signal says one exists), the description is insufficient for an agent to correctly invoke the tool. It lacks explanations of what a 'draft file' is, how to identify it via draft_id and relative_path, how to generate expected_revision and expected_file_hash, and what content format is expected. The description covers the concurrency aspect but leaves the rest to guesswork. This is a critical incompleteness for a tool with this many parameters.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden for parameter semantics. It only implicitly references 'expected_revision' and 'expected_file_hash' through the phrase 'current revision and exact file hash', but it does not define them or any of the other three parameters (draft_id, relative_path, content). An agent would have no idea what format content should be in, what relative_path refers to, or how to obtain the expected values. This is a significant gap given no schema descriptions exist.

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 clearly states the action ('Update one editable draft file') and includes the key mechanism (optimistic concurrency). It is specific about the resource type (draft file) and distinguishes it from other draft-related tools like get_strategy_draft or validate_strategy_draft by focusing on the update action. However, it does not explicitly name any sibling tool or contrast with them, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus the many sibling tools (e.g., create_strategy_draft, validate_strategy_draft, apply_strategy_changes). The description only explains what the tool does, not the conditions under which it should be chosen over alternatives. No exclusions or prerequisites are mentioned beyond the requirement of current revision/hash, which is more of a technical constraint than a usage context.

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

validate_strategy_draftValidate Strategy DraftB

Statically validate a draft and issue an exact hash-bound capability.

Parses and compiles AST without importing the candidate. Every call creates a new validation record and capability.

ParametersJSON Schema
NameRequiredDescriptionDefault
draft_idYes
expected_revisionYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

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

It explicitly discloses that 'every call creates a new validation record and capability,' revealing side effects and non-idempotence beyond the annotations. The statement about parsing/compiling the AST without importing the candidate adds meaningful behavioral context. This is consistent with annotations, so no contradiction.

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?

The description is compact, front-loaded, and contains no filler. The first sentence states the purpose and the second adds behavioral details, so both sentences earn their place.

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, return values need not be described, and the side-effect behavior is covered. Still, the description omits any prerequisite context, such as where expected_revision comes from or how this differs from validating a spec, leaving a noticeable completeness gap.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain draft_id or expected_revision. draft_id is likely inferable, but expected_revision is not obvious; the 'hash-bound' phrase is only a weak hint. The description does not compensate for the schema gap.

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: 'Statically validate a draft' and adds that it 'issue[s] an exact hash-bound capability,' which makes the core action clear. It does not explicitly differentiate from the similarly named sibling validate_strategy_spec, so it stops short of a 5.

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 provides useful context: validation is static and does not import the candidate, which implies it is safe to use for draft checks without executing code. However, it gives no explicit when-to-use or when-not-to-use guidance and does not mention alternatives such as validate_strategy_spec.

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

validate_strategy_specValidate Strategy SpecA
Read-only

Validate and canonicalize StrategySpec against its immutable dataset.

    Read-only: no draft, token, or state record is created.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
strategy_specYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already mark the tool as read-only and non-destructive. The description adds value by explicitly naming what is not created: 'no draft, token, or state record is created.' This gives concrete behavioral transparency beyond the annotation flags.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Two short sentences deliver the core purpose and the key side-effect guarantee. The information is front-loaded and every phrase earns its place with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists and the tool is simple, the description leaves ambiguity about what a valid StrategySpec looks like and what 'against its immutable dataset' means operationally. The agent has enough to understand the high-level purpose but not enough to confidently invoke the tool with a correct payload.

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

Parameters2/5

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

The schema provides only a generic 'object' type with additionalProperties true and zero description coverage. The description mentions 'StrategySpec' by name but does not explain its required structure, fields, or how it relates to the immutable dataset. The description does not compensate for the schema's lack of parameter documentation.

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?

The description uses specific verbs, 'validate' and 'canonicalize', against the 'StrategySpec' resource. It also distinguishes itself from draft-related siblings by explicitly noting that no draft is created, making the tool's role clear.

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 read-only note implies this tool is for validation without side effects, but there is no explicit statement about when to use this tool versus alternatives like validate_strategy_draft. The usage context is implied rather than spelled out.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 30 tool updatesv0.2.0
    • First observedapply_strategy_changes
    • First observedapply_strategy_repair
    • First observedaudit_independence
    • First observedcancel_strategy_run
    • First observedcompare_strategy_runs
    • First observedcreate_strategy_draft
    • First observedderive_tabular_dataset
    • First observeddoctor
    • First observedget_catalog_snapshot
    • First observedget_run_logs
    • First observedget_run_result
    • First observedget_run_status
    • First observedget_strategy_draft
    • First observedinspect_dataset
    • First observedinspect_strategy
    • First observedlist_jobs
    • First observedlist_strategy_templates
    • First observedlist_target_tree
    • First observedprepare_strategy_changes
    • First observedprepare_strategy_run
    • First observedpreview_dataset
    • First observedrefresh_strategy_catalog
    • First observedregister_dataset
    • First observedregister_local_dataset
    • First observedrender_strategy_report
    • First observedsearch_strategy_catalog
    • First observedstart_strategy_run
    • First observedupdate_strategy_draft
    • First observedvalidate_strategy_draft
    • First observedvalidate_strategy_spec

TDQS

B3.4/5.0

Scored across 30 tools

Disambiguation4/5

The toolset separates phases clearly (inspect/register/preview, draft/validate/change, prepare/start/run), and most tools have unique resource-action pairings. Minor confusion exists between register_dataset and register_local_dataset, and between inspect_dataset and preview_dataset, since both deal with bounded CSV/dataset inspection.

Naming Consistency4/5

Almost every tool follows a consistent verb_noun snake_case pattern (register_dataset, preview_dataset, start_strategy_run, get_run_logs). The single outlier 'doctor' breaks the pattern, and 'list_jobs' is slightly less descriptive than the strategy-specific names, but the convention is otherwise uniform.

Tool Count2/5

30 tools is above the 25+ threshold and feels heavy for a typical MCP server, even though the lifecycle is broad. The set could be consolidated into fewer, higher-level tools or grouped behind subresources.

Completeness4/5

The server covers the full dataset/strategy/run lifecycle: ingest and derive datasets, create/validate/deploy strategy drafts, execute and compare runs, and render reports. Notable gaps are lack of dataset enumeration/listing and no explicit discard/delete operation for strategy drafts, though immutability and approval flows mitigate this.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Local-first backtesting engine with built-in overfitting detection (PBO, deflated Sharpe, bootstrap CI, walk-forward) and a native MCP server for AI agents to validate trading strategies.
    4
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for the FLOX trading framework. About 30 tools to run backtests, scaffold strategies, validate for lookahead bias, compute indicators, place orders, and query PnL from Claude/Cursor.
    38
    225
    MIT