-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Tool Reference
All 84 tools, grouped by category. Descriptions come straight from the server's tool registrations. Every tool returns { success: true/false, ... }.
Not sure which tool to reach for? Start with Agent Workflows — it's a decision tree that maps intents ("what's on my chart?", "work on Pine Script") to the right tool. This page is the exhaustive lookup.
Jump to: Health & Connection · Chart Control · Symbols & Quotes · Price & Study Data · Pine Graphics · Indicators · Pine Script · Drawing · Alerts · Replay · Screenshots · Batch · Layouts, Tabs & Panes · Watchlist · UI Automation
| Tool | Purpose |
|---|---|
tv_launch |
Launch TradingView Desktop with CDP (remote debugging) enabled. Auto-detects install location on Mac, Windows, Linux, including Windows MSIX/Store installs, with an automatic local-copy fallback when a Store install blocks the debug port. |
tv_health_check |
Check the CDP connection to TradingView and return current chart state. |
tv_discover |
Report which known TradingView API paths are available and their methods. |
tv_ui_state |
Get current UI state: which panels are open, what buttons are visible/enabled/disabled. |
tv_update |
Update the MCP server to the latest version (git fast-forward + npm ci when deps changed). Safe by design; requires a restart afterward. |
| Tool | Purpose |
|---|---|
chart_get_state |
Get current chart state: symbol, timeframe, chart type, and indicators with entity IDs. Call this first. |
chart_set_symbol |
Change the chart symbol (e.g., AAPL, ES1!, NYMEX:CL1!). |
chart_set_timeframe |
Change the timeframe/resolution (e.g., 1, 5, 15, 60, D, W). |
chart_set_type |
Change chart type (Candles, Heikin Ashi, Line, Area, Renko, etc.). |
chart_manage_indicator |
Add or remove an indicator/study. Use the full name. |
chart_get_visible_range |
Get the visible date range (unix timestamps) and bars range. |
chart_set_visible_range |
Zoom the chart to a specific date range (unix timestamps). |
chart_scroll_to_date |
Jump the chart view to center on a specific date. |
| Tool | Purpose |
|---|---|
symbol_info |
Get detailed metadata about the current symbol (name, exchange, type, description). |
symbol_search |
Search for symbols by name or keyword. |
quote_get |
Get real-time quote data (price, OHLC, volume). If a differing symbol is passed, the chart briefly switches to fetch it then restores (~1–2s). |
depth_get |
Get order book / DOM (Depth of Market) data from the chart. |
| Tool | Purpose |
|---|---|
data_get_ohlcv |
Get OHLCV bar data. Use summary=true for compact stats instead of all bars (saves context). |
data_get_study_values |
Get current values from the data window for all visible studies (RSI, MACD, Bollinger Bands, EMAs, custom plot() indicators). |
data_get_indicator |
Get indicator/study info and input values. |
data_get_strategy_results |
Get strategy performance metrics from Strategy Tester. Auto-opens the panel and auto-unhides a hidden strategy. |
data_get_trades |
Get the trade list from Strategy Tester. Auto-opens the panel and auto-unhides a hidden strategy. |
data_get_equity |
Get equity curve data from Strategy Tester. |
Read graphics that custom Pine indicators draw — invisible to normal data tools. See Reading Custom Pine Output. Pass study_filter to target one indicator; the indicator must be visible.
| Tool | Purpose |
|---|---|
data_get_pine_lines |
Read horizontal price levels drawn by line.new. Deduplicated per study. |
data_get_pine_labels |
Read text labels drawn by label.new. Returns text + price pairs. |
data_get_pine_tables |
Read table data drawn by table.new. Returns formatted rows per table. |
data_get_pine_boxes |
Read box/zone boundaries drawn by box.new. Returns deduplicated {high, low} zones. |
| Tool | Purpose |
|---|---|
indicator_search |
Search TradingView's Indicators dialog for indicators, strategies, and community/public scripts. Returns titles grouped by section. |
indicator_add |
Search the Indicators dialog and add a result by name. Works for strategies and community scripts, not just built-ins. Returns the new study entity_id. |
indicator_set_inputs |
Change indicator/study input values (length, source, period, etc.). |
indicator_toggle_visibility |
Show or hide an indicator/study on the chart. |
See the Pine dev loop in Agent Workflows.
| Tool | Purpose |
|---|---|
pine_get_source |
Get current Pine source from the editor. |
pine_set_source |
Set Pine source code in the editor. |
pine_compile |
Compile / add the current Pine Script to the chart. |
pine_smart_compile |
Intelligent compile: detects the button, compiles, checks errors, reports study changes. |
pine_get_errors |
Get compilation errors from Monaco markers. |
pine_get_console |
Read Pine console/log output (compile messages, log.info(), errors). |
pine_check |
Compile via TradingView's server API without needing the chart open. Great for pre-validation. |
pine_analyze |
Static analysis without compiling — catches array out-of-bounds, unguarded array.first()/last(), bad loop bounds, implicit bool casts. Works offline. |
pine_new |
Create a new blank Pine Script. |
pine_open |
Open a saved Pine Script by name. |
pine_save |
Save the current script (Ctrl+S). |
pine_list_scripts |
List saved Pine Scripts. |
| Tool | Purpose |
|---|---|
draw_shape |
Draw a shape/line: horizontal_line, trend_line, rectangle, text. |
draw_list |
List all shapes/drawings on the chart with IDs. |
draw_get_properties |
Get properties and points of a specific drawing. |
draw_remove_one |
Remove a specific drawing by entity ID. |
draw_clear |
Remove all drawings from the chart. |
| Tool | Purpose |
|---|---|
alert_create |
Create a price alert on the current symbol (conditions: crossing, greater_than, less_than). |
alert_list |
List active alerts. |
alert_delete |
Delete a specific alert by id, or all active alerts. |
| Tool | Purpose |
|---|---|
replay_start |
Start bar replay mode, optionally at a specific date. |
replay_step |
Advance one bar. |
replay_autoplay |
Toggle autoplay, optionally set speed. |
replay_trade |
Execute a trade action (buy, sell, or close position). |
replay_status |
Get current replay mode status (mode, date, position, P&L). |
replay_stop |
Stop replay and return to realtime. |
| Tool | Purpose |
|---|---|
capture_screenshot |
Take a screenshot of the chart. Regions: full, chart, strategy_tester. Saves a PNG and returns the file path. |
| Tool | Purpose |
|---|---|
batch_run |
Run an action (screenshot, get_ohlcv, get_strategy_results) across multiple symbols and/or timeframes. |
| Tool | Purpose |
|---|---|
layout_list |
List saved chart layouts. |
layout_new |
Create a new named blank chart layout (opens in a new tab). |
layout_switch |
Switch to a saved layout by name or ID. |
tab_list |
List all open chart tabs. |
tab_new |
Open a new chart tab. Optionally load a blank named layout or a saved layout. |
tab_switch |
Switch to a chart tab by index. |
tab_close |
Close the current chart tab. |
pane_list |
List all chart panes in the layout with their symbols and active state. |
pane_focus |
Focus a specific pane by index (0-based). |
pane_set_layout |
Change the chart grid layout (single, 2x2, 2h, 3v, …). |
pane_set_symbol |
Set the symbol on a specific pane by index. |
| Tool | Purpose |
|---|---|
watchlist_get |
Get all watchlist symbols with last price, change, and change%. |
watchlist_add |
Add a symbol to the watchlist. |
watchlist_add_bulk |
Add multiple symbols at once. |
watchlist_remove |
Remove one or more symbols from the active watchlist. |
Low-level escape hatches for anything without a dedicated tool.
| Tool | Purpose |
|---|---|
ui_click |
Click a UI element by aria-label, data-name, text content, or class substring. |
ui_open_panel |
Open/close/toggle panels: pine-editor, strategy-tester, watchlist, alerts, trading. |
ui_fullscreen |
Toggle fullscreen mode. |
ui_keyboard |
Press keys or shortcuts (Enter, Escape, Alt+S, Ctrl+Z, …). |
ui_type_text |
Type text into the focused input/textarea. |
ui_hover |
Hover over a UI element by aria-label, data-name, or text. |
ui_scroll |
Scroll the chart or page up/down/left/right. |
ui_mouse_click |
Click at specific x,y coordinates on the TradingView window. |
ui_find_element |
Find elements by text, aria-label, or CSS selector and return their positions. |
ui_evaluate |
Execute JavaScript in the TradingView page context for advanced automation. |
Tool count and descriptions verified against src/tools/*.js at the time of writing. If the server has been updated since, run chart_get_state and check the server's own tool list for the current surface.
TradingView MCP Bridge · 84 tools · CDP bridge to TradingView Desktop · Community project, not affiliated with TradingView
Guides
Reference
Contribute
Repo