TradingView MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DEBUG_TV_MCP | No | Debug flag for the TradingView MCP server. Set to "false" in the canonical MCP client configuration. | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tv_health_checkA | Verify CDP connection liveness to TradingView Desktop and return active chart state. WHEN TO USE: Call at session start or when diagnosing connectivity failures before attempting chart commands. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires TradingView Desktop running with remote debugging enabled on port 9222. |
| tv_discoverA | Inspect and discover available TradingView internal API paths, chart widgets, and exposed methods in the active window context. WHEN TO USE: Call when debugging Charting API availability or probing supported internal features. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires an active, loaded chart page. |
| tv_ui_stateA | Get real-time UI state of TradingView window: detects open/closed bottom panels, visible dialogs, active tabs, and enabled control buttons. WHEN TO USE: Call before interacting with UI panels (Pine Editor, Strategy Tester) to ensure target DOM elements are present. SIDE EFFECTS: None (Read-only). LIMITATIONS: Assumes standard desktop window hierarchy. |
| tv_launchA | Launch TradingView Desktop with Chrome DevTools Protocol (remote debugging) enabled on target port. Auto-detects executable path across Windows, macOS, and Linux. WHEN TO USE: Call automatically when tv_health_check fails due to TradingView not running. SIDE EFFECTS: EXTERNAL_SIDE_EFFECT (Spawns desktop application process, optionally terminates existing instances). LIMITATIONS: Requires TradingView Desktop to be installed on the local system. |
| chart_get_stateA | Get current chart state including active symbol, timeframe resolution, chart rendering type, and list of attached indicator study entities with their IDs. WHEN TO USE: Call to inspect the current chart configuration or retrieve indicator entity IDs prior to calling chart_manage_indicator or indicator_set_inputs. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires an active chart window. |
| chart_set_symbolA | Change the active chart symbol and wait for market data feed confirmation. WHEN TO USE: Call to navigate the chart to a new financial instrument before performing analysis or running strategies. SIDE EFFECTS: STATE_MUTATING (Alters active chart ticker, increments state generation, invalidates generational cache). LIMITATIONS: Requires valid TradingView ticker format (e.g., "BTCUSD", "AAPL", "ES1!", "NYMEX:CL1!"). |
| chart_set_timeframeA | Change the chart timeframe/resolution and reactively wait for candle feed resolution. WHEN TO USE: Call when switching resolutions for multi-timeframe analysis (e.g., switching from 1D to 15m). SIDE EFFECTS: STATE_MUTATING (Alters chart resolution, increments state generation, invalidates generational cache). LIMITATIONS: Supported formats include standard minutes ("1", "5", "15", "60", "240") and calendar periods ("D", "W", "M"). |
| chart_set_typeA | Change chart candle rendering type (Bars, Candles, Line, Area, Renko, HeikinAshi, etc.). WHEN TO USE: Call when specific analysis requires alternate bar representations (e.g., Heikin Ashi for trend smoothing). SIDE EFFECTS: STATE_MUTATING (Modifies chart canvas display mode). LIMITATIONS: Accepts chart type name or numeric index. |
| chart_manage_indicatorA | Add or remove a built-in or public indicator/study on the active chart. WHEN TO USE: Call to attach technical studies (e.g., "Relative Strength Index", "Bollinger Bands") or remove studies using their entity_id from chart_get_state. SIDE EFFECTS: STATE_MUTATING (Modifies chart study collection). LIMITATIONS: Must use full official TradingView indicator names (e.g., "Relative Strength Index", not "RSI"). |
| chart_get_visible_rangeA | Get visible date range (unix timestamps in seconds) and bar index boundaries currently displayed on the viewport. WHEN TO USE: Call before capturing screenshots or inspecting what portion of the historical timeline is in user view. SIDE EFFECTS: None (Read-only). LIMITATIONS: Depends on active screen width and zoom level. |
| chart_set_visible_rangeA | Zoom and pan the chart canvas to display a specific date range between two unix timestamps. WHEN TO USE: Call when focusing chart context on a specific historical event or earnings release. SIDE EFFECTS: STATE_MUTATING (Alters chart viewport zoom/pan). LIMITATIONS: Timestamps must be unix seconds within historical data range. |
| chart_scroll_to_dateA | Jump the chart viewport to center on a specific historical calendar date or timestamp. WHEN TO USE: Call to navigate directly to a past macroeconomic release, news event, or breakout bar. SIDE EFFECTS: STATE_MUTATING (Scrolls chart canvas). LIMITATIONS: Historical data for the specified date must be available. |
| symbol_infoA | Get comprehensive instrument metadata for the active symbol (ticker name, exchange, instrument type, tick size, currency, market hours). WHEN TO USE: Call when determining tick precision, pip calculation rules, or exchange session times. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires an active instrument loaded on chart. |
| symbol_searchA | Search TradingView database for symbols, exchanges, and financial instruments matching a keyword query. WHEN TO USE: Call to resolve ambiguous ticker names or locate the exact exchange ticker (e.g. searching "crude oil" or "ES"). SIDE EFFECTS: None (Read-only). LIMITATIONS: Relies on TradingView symbol search backend. |
| chart_get_snapshotA | Get authoritative atomic snapshot of chart state (symbol, resolution, lastBarTime, barCount, generation ID). WHEN TO USE: Call to verify state freshness or obtain atomic synchronization metadata without pulling full bar series. SIDE EFFECTS: None (Read-only). LIMITATIONS: Lightweight snapshot only. |
| chart_get_multi_timeframeA | Perform atomic sequential multi-timeframe scan across multiple resolutions (e.g., D, 240, 60, 15, 5) without race conditions. WHEN TO USE: Call when needing raw OHLCV bars across several timeframes in a single coordinated operation. SIDE EFFECTS: None (Read-only - safely preserves original chart state). LIMITATIONS: Changes resolution sequentially, restoring original state upon completion. |
| pine_get_sourceA | Get current Pine Script source code from the active TradingView Monaco editor model. WHEN TO USE: Call before refactoring, fixing errors, or saving an existing Pine script. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires Pine Editor bottom dock panel to be open. |
| pine_set_sourceA | Inject Pine Script source code directly into the active Monaco editor model. WHEN TO USE: Call when deploying new Pine Script code, applying bug fixes, or loading templates. SIDE EFFECTS: STATE_MUTATING (Replaces entire Monaco editor text buffer). LIMITATIONS: Requires Pine Editor panel to be open. |
| pine_compileA | Trigger compilation ("Add to Chart" or "Save & Update") for the script currently in the Pine Editor. WHEN TO USE: Call after setting source code to apply the indicator or strategy to the chart canvas. SIDE EFFECTS: STATE_MUTATING (Attaches or updates study/strategy on chart canvas). LIMITATIONS: Pine Editor must be open with code loaded. |
| pine_get_errorsA | Retrieve compiler error messages, line numbers, and syntax markers from Monaco editor model. WHEN TO USE: Call immediately after compilation if errors occur to pinpoint line numbers and syntax issues. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires Pine Editor to be open. |
| pine_saveA | Save the current Pine Script to user library via keyboard shortcut (Ctrl+S / Cmd+S). WHEN TO USE: Call when persisting edits to a saved script in TradingView cloud storage. SIDE EFFECTS: STATE_MUTATING (Saves script changes to user account). LIMITATIONS: Requires Pine Editor to be active. |
| pine_get_consoleA | Read runtime logs and compiler messages from the Pine Editor console window (e.g., log.info(), log.error(), log.warning()). WHEN TO USE: Call when debugging Pine Script runtime behavior or inspecting custom log outputs. SIDE EFFECTS: None (Read-only). LIMITATIONS: Console output must be enabled in the script. |
| pine_smart_compileA | Execute atomic developer compilation loop: detects appropriate compile button, triggers build, polls for Monaco markers, and reports compile status. WHEN TO USE: Preferred tool for compiling Pine Script code directly into the active chart. SIDE EFFECTS: STATE_MUTATING (Modifies chart study state). LIMITATIONS: Requires Pine Editor panel to be open. |
| pine_newA | Create a new blank Pine Script draft in the editor from a standard template (indicator, strategy, or library). WHEN TO USE: Call when starting a new script from scratch rather than modifying existing code. SIDE EFFECTS: STATE_MUTATING (Clears current editor and loads starter template). LIMITATIONS: Unsaved changes in active editor will be overwritten. |
| pine_openA | Open a saved Pine Script from user library by name. WHEN TO USE: Call to load a specific user script into the Pine Editor. SIDE EFFECTS: STATE_MUTATING (Loads chosen script into editor). LIMITATIONS: Script name must match a script in user library. |
| pine_list_scriptsA | List all user-saved Pine Scripts in TradingView personal library. WHEN TO USE: Call to inspect available saved scripts before opening one with pine_open. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires user to be logged in to TradingView. |
| pine_analyzeA | Run offline static analysis on Pine Script source code: detects array out-of-bounds, unguarded array.get/first/last, invalid loop ranges, lookahead bias, and deprecated syntax. WHEN TO USE: Call before compiling code to verify correctness without needing a live TradingView connection. SIDE EFFECTS: None (Read-only offline parser). LIMITATIONS: Static AST parsing only; does not execute runtime logic. |
| pine_checkA | Compile Pine Script via TradingView remote compiler API without touching the UI. Returns compilation errors and warnings. WHEN TO USE: Call for headless validation of Pine Script code before opening editor or chart. SIDE EFFECTS: EXTERNAL_SIDE_EFFECT (Sends code to TradingView cloud compiler endpoint). LIMITATIONS: Requires active internet connection to reach TradingView servers. |
| data_get_ohlcvA | Get historical OHLCV bar data from active chart. Supports compact statistical summary mode (summary: true) for context efficiency, and closed-only filtering (closedOnly: true) to avoid unconfirmed candle hallucinations. WHEN TO USE: Call when computing quantitative models or inspecting raw price action. Use summary: true when only high/low/close bounds are needed to conserve token context. SIDE EFFECTS: None (Read-only). LIMITATIONS: Maximum 500 bars per request. |
| data_get_indicatorA | Get internal study parameters, input values, and configuration of a specific indicator entity by ID. WHEN TO USE: Call to inspect active parameters (e.g., RSI length or MA source) for an indicator found in chart_get_state. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires valid entity ID. |
| data_get_strategy_resultsA | Extract performance metrics from the TradingView Strategy Tester panel (Net Profit, Profit Factor, Win Rate, Max Drawdown, Total Trades, Sharpe Ratio). WHEN TO USE: Call after compiling a Pine Script strategy to evaluate quantitative backtest results. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires a strategy script to be actively running on the chart with Strategy Tester panel populated. |
| data_get_tradesA | Extract individual trade execution log from Strategy Tester (entry/exit times, prices, contracts, P&L). WHEN TO USE: Call when conducting granular trade-by-trade review or streak analysis of a backtested Pine strategy. SIDE EFFECTS: None (Read-only). LIMITATIONS: Strategy Tester bottom panel must have trade list populated. |
| data_get_equityA | Extract equity curve data points from Strategy Tester. WHEN TO USE: Call when analyzing equity drawdowns, run-ups, or plotting performance trajectory over backtest span. SIDE EFFECTS: None (Read-only). LIMITATIONS: Strategy Tester must be active on chart. |
| quote_getA | Get real-time market quote snapshot for a ticker (last price, day open/high/low/close, change %, volume). WHEN TO USE: Call for quick price checks without loading historical bar series. SIDE EFFECTS: None (Read-only). LIMITATIONS: Uses current chart ticker if symbol omitted. |
| depth_getA | Extract order book / Depth of Market (DOM) bid/ask levels from the DOM panel. WHEN TO USE: Call when analyzing order book liquidity or bid-ask imbalance. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires DOM panel to be open in TradingView. |
| data_get_pine_linesA | Read horizontal price levels drawn programmatically by Pine Script indicators (line.new). Returns deduplicated, sorted price levels per study. WHEN TO USE: Call when an indicator draws support/resistance or session levels via line.new. Use study_filter to target specific scripts. SIDE EFFECTS: None (Read-only). LIMITATIONS: Only reads lines drawn by active Pine studies. |
| data_get_pine_labelsA | Read text annotations and labels drawn by Pine Script indicators (label.new) paired with price coordinates. WHEN TO USE: Call when an indicator displays bias markers, order block tags, or targets via label.new. SIDE EFFECTS: None (Read-only). LIMITATIONS: Only reads labels currently existing in chart memory. |
| data_get_pine_tablesA | Read table matrices drawn by Pine Script indicators (table.new) as structured rows of text. WHEN TO USE: Call when an indicator outputs dashboard summaries, session statistics, or multi-timeframe matrices in a table. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires study drawing table.new to be attached. |
| data_get_pine_boxesA | Read bounding boxes and zones drawn by Pine Script indicators (box.new) as deduplicated {high, low} price ranges. WHEN TO USE: Call when an indicator plots order blocks, fair value gaps, or consolidation boxes via box.new. SIDE EFFECTS: None (Read-only). LIMITATIONS: Only reads box primitives generated by active studies. |
| data_get_study_valuesA | Extract real-time numerical values of all visible indicators from the chart Data Window (RSI, MACD, EMAs, custom plot() outputs). WHEN TO USE: Call when reading current indicator values directly from TradingView without recomputing in Node.js. SIDE EFFECTS: None (Read-only). LIMITATIONS: Indicators must be visible on chart. |
| capture_screenshotA | Capture lossless PNG screenshot of TradingView window and save locally to disk (regions: "full", "chart", "strategy_tester"). Returns local filesystem path to prevent token exhaustion from raw base64. WHEN TO USE: Call when visual verification of chart patterns, drawings, or UI layout is requested by the user. SIDE EFFECTS: EXTERNAL_SIDE_EFFECT (Writes PNG image file to local screenshots directory). LIMITATIONS: Requires TradingView window to be rendered on screen. |
| draw_shapeA | Create and render a graphical drawing primitive on the chart (horizontal_line, vertical_line, trend_line, rectangle, text, ray). WHEN TO USE: Call when annotating key support/resistance levels, chart patterns, breakout zones, or trade entry/target targets visually. SIDE EFFECTS: STATE_MUTATING (Adds drawing primitive to chart canvas). LIMITATIONS: Requires point coordinates in unix timestamp and price values. |
| draw_listA | List all user drawing shapes and annotations currently active on the chart with entity IDs, types, and coordinates. WHEN TO USE: Call before modifying or deleting drawings to locate specific drawing IDs. SIDE EFFECTS: None (Read-only). LIMITATIONS: Only reports user drawings, not Pine script drawings. |
| draw_clearA | Remove all user drawing shapes and annotations from the active chart canvas. WHEN TO USE: Call when resetting or cleaning the chart canvas before drawing a fresh analysis template. SIDE EFFECTS: STATE_MUTATING (Deletes all user drawings on canvas). LIMITATIONS: Irreversible removal of canvas drawings. |
| draw_remove_oneA | Delete a specific drawing shape from the chart canvas by its entity ID. WHEN TO USE: Call when removing an invalid or obsolete level while preserving other drawings. SIDE EFFECTS: STATE_MUTATING (Deletes targeted drawing shape). LIMITATIONS: Requires entity ID obtained from draw_list. |
| draw_get_propertiesA | Get styling properties, line colors, line width, and coordinate points of an existing drawing shape by entity ID. WHEN TO USE: Call when inspecting or confirming coordinates of an annotated price level. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires entity ID from draw_list. |
| alert_createA | Open the TradingView alert configuration dialog and create a server-side price alert. WHEN TO USE: Call when setting conditional triggers on price levels (crossing, greater_than, less_than). SIDE EFFECTS: STATE_MUTATING (Creates an active alert in user account). LIMITATIONS: Requires market symbol to be active. |
| alert_listA | List all active and triggered alerts from the TradingView alerts panel. WHEN TO USE: Call to inspect currently active alert triggers or verify created alerts. SIDE EFFECTS: None (Read-only). LIMITATIONS: Reads alerts visible in alerts dock. |
| alert_deleteA | Delete active alerts from TradingView alerts list. WHEN TO USE: Call when removing triggered, obsolete, or batch alerts. SIDE EFFECTS: STATE_MUTATING (Deletes alerts from user account). LIMITATIONS: Pass delete_all: true to clear all alerts. |
| batch_runA | Execute a sequential analytical action across an array of symbols and timeframes (actions: "screenshot", "get_ohlcv", "get_strategy_results"). WHEN TO USE: Call when running automated screening, batch chart captures, or cross-asset data collection. SIDE EFFECTS: STATE_MUTATING (Sequentially navigates chart symbols/timeframes; action may write screenshot files). LIMITATIONS: Runs sequentially with configurable inter-iteration delay. |
| replay_startA | Enter TradingView Bar Replay mode at a specified historical date or first available bar. WHEN TO USE: Call when initiating historical simulated forward-testing or practicing trade executions bar by bar. SIDE EFFECTS: STATE_MUTATING (Switches chart into Replay mode, rewinds visible price action). LIMITATIONS: Requires market symbol with historical data at chosen date. |
| replay_stepA | Advance replay forward by exactly one candle bar. WHEN TO USE: Call during manual forward simulation to reveal subsequent market price action step by step. SIDE EFFECTS: STATE_MUTATING (Advances replay state by one bar). LIMITATIONS: Requires Replay mode to be active. |
| replay_autoplayA | Toggle automatic bar playback in replay mode with configurable speed. WHEN TO USE: Call when letting historical playback run continuously at set speed. SIDE EFFECTS: STATE_MUTATING (Starts or pauses replay autoplay). LIMITATIONS: Requires Replay mode to be active. |
| replay_stopA | Exit Replay mode and restore the live real-time chart data feed. WHEN TO USE: Call when finishing simulation practice to return chart to current live market conditions. SIDE EFFECTS: STATE_MUTATING (Exits replay mode and jumps to live feed). LIMITATIONS: Closes any active replay session. |
| replay_tradeA | Execute a simulated trade action in replay mode (buy, sell, or close position). WHEN TO USE: Call when taking practice trades against historical bar replay data. SIDE EFFECTS: STATE_MUTATING (Updates simulated paper trading position in replay). LIMITATIONS: Requires Replay mode to be active. |
| replay_statusA | Get current status of Bar Replay mode (active, current replay timestamp, position). WHEN TO USE: Call to check whether chart is currently in replay mode and what timestamp is displaying. SIDE EFFECTS: None (Read-only). LIMITATIONS: None. |
| indicator_set_inputsA | Programmatically override input values of an indicator entity (e.g., length, source, period, multiplier). WHEN TO USE: Call when fine-tuning parameters of an attached study without deleting and re-adding it. SIDE EFFECTS: STATE_MUTATING (Alters indicator configuration on chart). LIMITATIONS: Requires study entity ID and valid JSON inputs map. |
| indicator_toggle_visibilityA | Show or hide an indicator/study plot on the chart canvas. WHEN TO USE: Call when decluttering the chart view before visual analysis or screenshot capture. SIDE EFFECTS: STATE_MUTATING (Toggles indicator visibility). LIMITATIONS: Requires study entity ID from chart_get_state. |
| watchlist_getA | Get all financial symbols from current TradingView watchlist with real-time last price, absolute price change, and percentage change. WHEN TO USE: Call when scanning market watchlists or monitoring asset universe for opportunities. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires watchlist to have symbols loaded. |
| watchlist_addA | Add a financial instrument/ticker to the active TradingView watchlist. WHEN TO USE: Call when tracking a newly discovered symbol for continued monitoring. SIDE EFFECTS: STATE_MUTATING (Adds symbol to user watchlist). LIMITATIONS: Symbol must be valid on TradingView. |
| ui_clickA | Click a TradingView DOM element matching selector strategy (aria-label, data-name, text, class-contains). WHEN TO USE: Call when interacting with custom buttons, dropdowns, or navigation elements not covered by high-level tools. SIDE EFFECTS: STATE_MUTATING (Dispatches click event to DOM element). LIMITATIONS: Target element must be present in DOM. |
| ui_open_panelA | Open, close, or toggle bottom dock panels in TradingView window (pine-editor, strategy-tester, watchlist, alerts, trading). WHEN TO USE: Call before interacting with Pine Editor or Strategy Tester to ensure panel visibility. SIDE EFFECTS: STATE_MUTATING (Alters bottom panel visibility state). LIMITATIONS: Supported panels: pine-editor, strategy-tester, watchlist, alerts, trading. |
| ui_fullscreenA | Toggle TradingView window chart fullscreen mode. WHEN TO USE: Call when expanding chart canvas for clean screenshot captures or presentation view. SIDE EFFECTS: STATE_MUTATING (Toggles fullscreen mode). LIMITATIONS: None. |
| layout_listA | List all saved chart layouts in user profile with layout names and IDs. WHEN TO USE: Call before switching layouts to discover valid layout names. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires user profile to have saved layouts. |
| layout_switchA | Switch active chart workspace to another saved layout by name or ID. WHEN TO USE: Call when transitioning between specialized analytical layouts (e.g. crypto vs macro). SIDE EFFECTS: STATE_MUTATING (Loads different layout, reloads charts and indicators). LIMITATIONS: Layout name or ID must exist in user account. |
| ui_keyboardA | Dispatch native keyboard key press or key combination (e.g., Enter, Escape, Alt+S, Ctrl+Z) via CDP Input domain. WHEN TO USE: Call when triggering application keyboard shortcuts or dismissing modals. SIDE EFFECTS: STATE_MUTATING (Dispatches keystroke events to focused window element). LIMITATIONS: Requires appropriate window focus. |
| ui_type_textA | Type text characters directly into currently focused input or textarea element via CDP Input domain. WHEN TO USE: Call when filling out search fields, alert parameters, or text inputs. SIDE EFFECTS: STATE_MUTATING (Inserts text into focused DOM field). LIMITATIONS: Target element must be actively focused. |
| ui_hoverA | Dispatch mouse move event to hover over a UI element matching selector strategy. WHEN TO USE: Call to trigger tooltips, dropdown menus, or interactive hover states. SIDE EFFECTS: STATE_MUTATING (Dispatches mouse move events). LIMITATIONS: Element must be rendered in DOM. |
| ui_scrollA | Dispatch mouse wheel scroll events across chart canvas or page in specified direction. WHEN TO USE: Call when scrolling through long lists, logs, or panning canvas. SIDE EFFECTS: STATE_MUTATING (Dispatches wheel events). LIMITATIONS: Default amount is 300px. |
| ui_mouse_clickA | Dispatch mouse click event at exact pixel coordinates (x, y) on the window canvas. WHEN TO USE: Call when clicking a non-DOM canvas target or specific pixel coordinate. SIDE EFFECTS: STATE_MUTATING (Dispatches mouse click at coordinate). LIMITATIONS: Coordinates must be within viewport bounds. |
| ui_find_elementA | Locate a UI element by text, aria-label, or CSS selector and return its bounding box coordinates and visibility. WHEN TO USE: Call to verify element existence and obtain coordinates before clicking or hovering. SIDE EFFECTS: None (Read-only DOM query). LIMITATIONS: Scans active DOM tree. |
| ui_evaluateA | Evaluate arbitrary JavaScript expression directly in the TradingView page context. WHEN TO USE: Call for specialized low-level browser automation or retrieving unexposed DOM properties. SIDE EFFECTS: STATE_MUTATING (Arbitrary JavaScript execution in page context). LIMITATIONS: Advanced tool; expressions run within page sandbox. |
| pane_listA | List all chart panes in the current split-view workspace with their active symbols, resolutions, and focus state. WHEN TO USE: Call before manipulating multi-chart layouts to discover pane indices. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires multi-chart layout active to list multiple panes. |
| pane_set_layoutA | Change the chart grid layout grid (e.g., single "s", "2h", "2v", "4" quad grid). WHEN TO USE: Call when configuring multi-chart views for correlated assets or multi-timeframe monitoring. SIDE EFFECTS: STATE_MUTATING (Alters window grid division and creates/destroys chart panes). LIMITATIONS: Layout codes: s, 2h, 2v, 2-1, 1-2, 3h, 3v, 4, 6, 8. |
| pane_focusA | Switch active user focus to a specific chart pane by index (0-based). WHEN TO USE: Call before executing chart operations targeted at a secondary pane in a multi-chart layout. SIDE EFFECTS: STATE_MUTATING (Changes active chart focus). LIMITATIONS: Index must be valid within pane_list. |
| pane_set_symbolA | Set financial ticker symbol directly on a specific pane index without changing active focus. WHEN TO USE: Call when populating multi-pane grids with correlated tickers (e.g. BTCUSD on pane 0, ETHUSD on pane 1). SIDE EFFECTS: STATE_MUTATING (Changes symbol on target pane). LIMITATIONS: Target pane index must exist. |
| tab_listA | List all open TradingView desktop application tabs with index, title, and active focus status. WHEN TO USE: Call before managing application tabs to locate specific tab indices. SIDE EFFECTS: None (Read-only). LIMITATIONS: Operates across TradingView Desktop tabs. |
| tab_newA | Open a new chart tab in TradingView Desktop window. WHEN TO USE: Call when opening a fresh chart workspace without disrupting the current tab. SIDE EFFECTS: STATE_MUTATING (Creates new desktop window tab). LIMITATIONS: TradingView Desktop must support multi-tab mode. |
| tab_closeA | Close the currently active chart tab in TradingView Desktop. WHEN TO USE: Call when finished with a temporary workspace tab to release system memory. SIDE EFFECTS: STATE_MUTATING (Closes active tab). LIMITATIONS: Will not close window if only one tab remains. |
| tab_switchA | Switch active desktop window focus to a target tab by index (0-based). WHEN TO USE: Call when toggling between multiple open chart tabs. SIDE EFFECTS: STATE_MUTATING (Changes active tab focus). LIMITATIONS: Index must be valid within tab_list. |
| morning_briefA | Scan user watchlist, read indicator values across symbols, and extract structured market data for a pre-market or daily briefing according to rules.json. WHEN TO USE: Call at the start of a trading day to synthesize cross-asset market bias and momentum. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires rules.json in workspace or specified via rules_path. |
| session_saveA | Save generated session brief markdown or analysis summary to local session archive (~/.tradingview-mcp/sessions/YYYY-MM-DD.json). WHEN TO USE: Call after completing a morning briefing or daily market analysis to archive observations for future reference. SIDE EFFECTS: EXTERNAL_SIDE_EFFECT (Writes session JSON file to local disk). LIMITATIONS: None. |
| session_getA | Retrieve archived session briefing from local session history. Returns today's brief if available, otherwise previous session. WHEN TO USE: Call when reviewing past daily biases or comparing today's price action against previous morning briefings. SIDE EFFECTS: None (Read-only filesystem read). LIMITATIONS: Requires previously saved session file. |
| chart_get_state_diagnosticsA | Get authoritative diagnostic state of chart, generation ID, CDP connection status, and task queue depths. WHEN TO USE: Call whenever diagnosing connection liveness, queue backpressure, or verifying generation freshness. NO SIDE EFFECTS. |
| market_get_contextA | Get comprehensive, multi-dimensional market context (trend, regime, key indicators, volume, market structure, and zones) in a single deterministic call. WHEN TO USE: Call when orienting yourself on a ticker/timeframe before planning actions or answering user analysis queries. LIMITATIONS: Requires price bars loaded on chart. NO SIDE EFFECTS. |
| market_detect_structureA | Detect deterministic market structure: Swing Highs/Lows, HH/HL/LH/LL classifications, Break of Structure (BOS), Change of Character (CHoCH), and Equilibrium/Range bounds. WHEN TO USE: Call when evaluating trend continuity or structural breakouts. NO SIDE EFFECTS. |
| market_detect_zonesA | Detect objective horizontal support & resistance zones and price consolidation clusters with touch counts and test recency. WHEN TO USE: Call when locating key price levels for take-profit, stop-loss, or reaction areas. NO SIDE EFFECTS. |
| market_compare_timeframesA | Compare market regime, trend direction, momentum (RSI), and volume consensus across multiple timeframes (e.g., 1D, 4H, 1H, 15m, 5m). WHEN TO USE: Call when performing multi-timeframe top-down analysis to identify timeframe alignment or conflicts. NO SIDE EFFECTS. |
| market_get_recent_changesA | Detect structural shifts, new swings, volume spikes, and divergences that occurred since a given timestamp or generation. WHEN TO USE: Call when periodically polling or checking what changed on the chart since your last analysis turn, saving LLM token bandwidth. NO SIDE EFFECTS. |
| market_get_smart_volumeA | Analyze institutional-style market activity proxy (RVOL, robust z-score, Wyckoffian effort vs result, absorption, initiative moves, exhaustion, sweeps, and accumulation/distribution). WHEN TO USE: Call when evaluating volume anomalies, liquidity sweeps, or market participation conviction. NO SIDE EFFECTS. LIMITATIONS: On CFD/Forex feeds (like OANDA:XAUUSD), volume reflects tick activity rather than centralized transaction contracts; activity is inferred/heuristic. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 90 tools
Many tools are distinct, but with 90 tools there is notable overlap: multiple state/diagnostic tools (chart_get_state, chart_get_snapshot, chart_get_state_diagnostics, tv_health_check), multiple compile tools (pine_compile, pine_smart_compile, pine_check), and multiple click tools (ui_click, ui_mouse_click). Descriptions with WHEN TO USE help mitigate but ambiguity remains.
Consistent snake_case with prefix_verb_noun pattern across all domains (chart_, pine_, data_, draw_, etc.). Minor variations like get_ vs set_ but consistent within prefixes.
90 tools is excessive for a single MCP server, far beyond the typical 3-15 range. While the domain is complex, many low-level UI automation tools could be consolidated, making the set unwieldy for an agent.
Covers chart manipulation, data extraction, Pine Script editing, drawings, alerts, replay, panes, tabs, layouts, watchlists, session archiving, and market analysis. No obvious gaps in lifecycle coverage for a TradingView automation server.