Skip to main content
Glama
firyomaefx

TradingView Chrome MCP

by firyomaefx

tv_backtest_compare

Destructive

Compare a Pine strategy across multiple parameter sets using TradingView's Strategy Tester. Run backtests with different parameter combinations to analyze performance.

Instructions

Compare a Pine strategy across multiple parameter sets using the Strategy Tester. Pro+ only. DESTRUCTIVE: changes the chart, saves/loads the strategy, and opens the Strategy Tester.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesFull Pine strategy v6 source including //@version=6
symbolYesSymbol to test, e.g. NASDAQ:AAPL
maxWaitMsNoMax milliseconds to wait for Strategy Tester results per run (default 20000)
paramSetsYesList of parameter maps to apply to the source (e.g. [{fastLength: 10, slowLength: 30}])
timeframeYesTimeframe for the test, e.g. D, 240, 60
Behavior4/5

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

Annotations already mark destructiveHint=true, but the description adds concrete behavioral details: it 'changes the chart, saves/loads the strategy, and opens the Strategy Tester.' This goes beyond the annotation and provides useful side-effect information. 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 concise and well-structured: the first sentence states the primary purpose, and the second warns about destructiveness and Pro+ restriction. Every sentence adds value with no 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?

Given the tool's complexity (backtesting with multiple parameter sets), the description covers the core purpose, licensing, and side effects. Although no output schema exists, the tool name and paramSets parameter make the comparison intent clear. It could mention that results are returned after waiting, but the maxWaitMs parameter already implies this behavior. Overall, the description is complete enough for a reasonably informed agent.

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 100%, meaning all parameters (source, symbol, timeframe, paramSets, maxWaitMs) already have descriptions in the input schema. The tool description does not add further meaning to the parameters; it only references 'multiple parameter sets' which matches the paramSets field. Baseline 3 is appropriate.

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 the specific action ('Compare') and the resource ('a Pine strategy across multiple parameter sets using the Strategy Tester'). This distinguishes it from sibling tools like tv_read_strategy_tester (which reads results) and tv_pine_save (which saves), as it focuses on comparative backtesting.

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 when to use this tool: when comparing multiple parameter sets of a Pine strategy via the Strategy Tester. It also notes the 'Pro+ only' license prerequisite and destructive side effects, which helps the agent decide if this tool is appropriate, but it does not explicitly mention alternatives or provide 'when not to use' guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/firyomaefx/tradingview-chrome-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server