Skip to content

MCP Tool Reference

Grouped reference of the tradingview-mcp tools (78+ tools). Organized by category.


Health

Tool Description
tv_health_check Check CDP connection to TradingView
tv_discover List all available TradingView windows/tabs
tv_ui_state Get current UI state (dialogs, panels, menus)
tv_launch Launch TradingView/Chrome with CDP flags

Chart Control

Tool Description
chart_get_state Get full chart state (symbol, timeframe, indicators)
chart_set_symbol Change the chart's symbol
chart_set_timeframe Change the chart's timeframe
chart_set_type Change chart type (candle, bar, line, etc.)
chart_manage_indicator Add or remove indicators
chart_get_visible_range Get the visible time range
chart_set_visible_range Set the visible time range
chart_scroll_to_date Scroll chart to a specific date
symbol_info Get symbol metadata (tick size, session times)
symbol_search Search for symbols by name

Data Access

OHLCV and Quotes

Tool Description
data_get_ohlcv Get OHLCV candle data from visible chart
quote_get Get current quote (bid, ask, last)
depth_get Get order book / market depth

Indicator Data

Tool Description
data_get_indicator Get indicator plot values
data_get_study_values Get study output values by name
data_get_strategy_results Get Pine strategy backtest results
data_get_trades Get strategy trade list
data_get_equity Get strategy equity curve

Pine Graphics (Core Data Tools)

These four tools read Pine Script visual elements rendered by indicators on the chart. They are the primary data source for reading custom indicator output.

Tool Description
data_get_pine_labels Read label.new() objects (text, price, position)
data_get_pine_lines Read line.new() objects (horizontal levels, trend lines)
data_get_pine_tables Read table.new() objects (structured text grids)
data_get_pine_boxes Read box.new() objects (price zones)

All four support the study_filter parameter to target a specific indicator by name substring. See Pine Graphics Deep Dive for return formats and examples.


Pane Tools

Tool Description
pane_list List all panes with symbols and resolutions
pane_set_layout Set chart grid layout
pane_focus Focus a specific pane by index
pane_set_symbol Set symbol on a specific pane

Layout Codes

Code Description Alias
s 1 chart (single) 1, 1x1, single
2h 2 horizontal 2x1
2v 2 vertical 1x2
4 2x2 grid 2x2, grid, quad
6 6 charts
8 8 charts

Tab Tools

Tool Description
tab_list List all open chart tabs
tab_new Open a new chart tab
tab_close Close the current tab
tab_switch Switch to a tab by index

Watchlist Tools

Tool Description
watchlist_get Get all symbols in active watchlist with prices
watchlist_add Add a symbol to the watchlist

Indicator Tools

Tool Description
indicator_set_inputs Change indicator input values by entity ID
indicator_toggle_visibility Show or hide an indicator

Pine Script

Tool Description
pine_get_source Get Pine Script source of an indicator
pine_set_source Set/replace Pine Script source
pine_compile Compile Pine Script
pine_smart_compile Compile with auto-error detection
pine_get_errors Get compilation errors
pine_save Save Pine Script to TradingView
pine_get_console Read Pine Script console output
pine_new Create a new Pine Script
pine_open Open a saved Pine Script by name
pine_list_scripts List saved Pine Scripts
pine_analyze Offline static analysis (no chart needed)
pine_check Server-side compile check (no chart needed)

Drawing Tools

Tool Description
draw_shape Draw horizontal_line, trend_line, rectangle, text
draw_list List all drawings
draw_get_properties Get drawing attributes
draw_remove_one Delete drawing by ID
draw_clear Delete all drawings

Alert Tools

Tool Description
alert_create Set price alert
alert_list View active alerts
alert_delete Remove alert

Replay Tools

Tool Description
replay_start Enter replay at date
replay_step Advance one bar
replay_autoplay Auto-advance with speed
replay_stop Return to realtime
replay_trade Execute buy/sell/close in replay
replay_status Get position, P&L, date

UI Automation

Tool Description
ui_click Click by aria-label, text, data-name, or class
ui_open_panel Open/close/toggle panels
ui_keyboard Press keys/shortcuts
ui_type_text Type into focused input
ui_hover Hover over element
ui_scroll Scroll up/down/left/right
ui_mouse_click Click at x,y coordinates
ui_find_element Find elements by selector
ui_evaluate Execute JavaScript in page context
ui_fullscreen Toggle fullscreen
layout_list List saved layouts
layout_switch Load layout by name

Streaming

Tool Description
stream_quote Real-time price changes (JSONL)
stream_bars Bar updates (JSONL)
stream_values Indicator value changes (JSONL)
stream_lines Pine line level changes (JSONL)
stream_tables Pine table data changes (JSONL)
stream_all All streams for multi-pane (JSONL)

Batch

Tool Description
batch_run Run action across multiple symbols/timeframes

Capture

Tool Description
capture_screenshot Screenshot (regions: full, chart, strategy_tester)

Trading (Partial — Paper Trading Only)

Tool Description Status
trading_login_broker Login to Paper Trading / Tradovate UI automation
trading_get_broker_status Check broker connection Working
trading_place_limit_order Place bracket order (TP/SL) Fragile
trading_cancel_order Cancel pending order Fragile
trading_close_position Close open position Fragile
trading_get_orders List pending orders Fragile
trading_get_positions List open positions Fragile

These tools use UI automation (clicking buttons). They will be replaced by direct broker API tools. See broker-tools.md.