Skip to main content
Glama
tedorigawa001

TradingView-MCP

run_backtest_matrix

Execute saved Pine strategies across defined symbol, timeframe, and input combinations, returning per-job results or a resolved execution plan. Preserves chart state and never places orders.

Instructions

Run a bounded, serial matrix of saved Pine strategies across explicit symbol, timeframe, and input combinations. The matrix is limited to 24 jobs and a soft runtime budget. Each strategy is temporarily added, bound to a full-ledger SHA-256 id, removed, and the original chart state is restored after every job. Failures and insufficient samples remain as rows; results are never ranked. Without confirm=true this only returns the resolved execution plan. It never places orders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobsYes
confirmNoMust be true to change the chart and run the matrix. Default: false
minimum_tradesNoClosed trades required per job. Default: 30
expected_symbolYesExact active-chart symbol before and after the matrix
expected_timeframeYesExact active-chart timeframe before and after the matrix
max_runtime_secondsNoDo not start another job after this soft deadline. Default: 600, maximum: 1800

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so excellently. It discloses the 24-job cap, soft runtime budget, temporary strategy add/remove lifecycle, full-ledger SHA-256 id binding, chart-state restoration, handling of failures/insufficient samples, non-ranking of results, confirm-gated execution, and that it never places orders.

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?

Four sentences, each dense with critical operational information. The main purpose is front-loaded, and the safety-related behavior ('never places orders', 'confirm=true') is positioned where it matters. No filler or repetition.

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 complex matrix execution tool with no output schema and no annotations, the description covers execution planning, confirmation semantics, safety (no orders), state restoration, job bounds, runtime limits, and result-row behavior. An agent has enough to decide whether and how to invoke it 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 coverage is already high at 83%, so the baseline is 3. The description adds meaningful meaning on top by explaining job lifecycle semantics, the confirm execution-plan gate, the soft runtime budget, and the meaning of insufficient samples relative to minimum_trades. This goes beyond the schema's basic field 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?

The description states a specific verb ('Run') and a precise resource ('a bounded, serial matrix of saved Pine strategies across explicit symbol, timeframe, and input combinations'). This clearly distinguishes it from single-run tools like run_backtest, and the matrix framing is unique among sibling 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 gives clear context for when this tool is appropriate: when running multiple saved Pine strategy jobs across explicit combinations. It also explains the confirm=true gate and the non-order-placing behavior, but it does not explicitly name alternative tools or state when not to use it.

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

Install Server

Other Tools