Skip to main content
Glama
tedorigawa001

TradingView-MCP

set_indicator_input

Change indicator or strategy inputs live on a TradingView chart to A/B test parameters without re-saving the Pine script. Restore original values anytime.

Instructions

Change input values of an indicator or strategy already on a chart — the write counterpart to get_indicator_inputs. The Pine source is untouched, but the study's input values on the chart remain changed until set back (this is a live chart edit, like opening the study's Settings dialog, and may be captured by TradingView's own layout autosave). Works for both plain indicators and strategies (for a strategy, follow up with get_strategy_report to read the recalculated backtest). Use this to A/B-test parameters without re-saving the script each time, and restore the original values when done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsYesInputs to change, e.g. [{id:'in_0', value:14}]. Get ids/current values from get_indicator_inputs
study_idYesIndicator/strategy id from get_chart_context or add_pine_to_chart/run_backtest(keep_on_chart:true)
chart_indexNoChart index in a multi-chart layout. Default: the active chart

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.4/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 well: it discloses that the Pine source is untouched, that changes are live chart edits persisting until reset, that TradingView layout autosave may capture them, and that strategy backtests recalculate. This gives an agent accurate expectations about side effects without relying on 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?

Three sentences deliver action, side-effect transparency, use case, and follow-up guidance with no filler. Key scoping ('Pine source untouched') is front-loaded and every clause earns its place.

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 strong for a mutating tool: it covers scope, persistence, autosave caveat, strategy workflow, and restoration. It does not describe the return value or failure behavior, and with no output schema that small gap keeps it just shy of complete.

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

Parameters3/5

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

Schema coverage is 100%, and the schema descriptions already explain study_id, inputs, and chart_index with examples and source hints. The description adds overall workflow context but not additional per-parameter semantics, so the 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 opens with a specific action and resource: 'Change input values of an indicator or strategy already on a chart,' and immediately labels itself 'the write counterpart to get_indicator_inputs,' making the read/write distinction explicit. This clearly differentiates it from sibling tools like get_indicator_inputs.

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 gives a concrete use case ('A/B-test parameters without re-saving the script each time') and says to restore original values when done. It also notes the strategy-specific follow-up with get_strategy_report. However, it does not explicitly name an alternative like save_pine_script for cases where permanent source changes are needed, though 'Pine source is untouched' implies the distinction.

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