Skip to main content
Glama
mathieubernardi

MCP TradingView Server

tv_get_historical_data

Get historical OHLCV market data for stocks, crypto, forex, and futures. Specify symbol, exchange, interval, and number of bars to analyze price trends or backtest strategies.

Instructions

Fetch historical OHLCV (Open, High, Low, Close, Volume) bars for any symbol from TradingView. Supports stocks, crypto, forex, futures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
n_barsNoNumber of bars to return
symbolYesTicker symbol, e.g. 'BTCUSDT', 'AAPL', 'EURUSD'
exchangeNoExchange name, e.g. 'EURONEXT' (PEA / Paris), 'NASDAQ', 'NYSE', 'BINANCE', 'FX'EURONEXT
intervalNoChart interval: 1, 3, 5, 15, 30, 45 (min) | 1H, 2H, 3H, 4H | 1D, 1W, 1M1D

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral disclosure burden. It names the output content (OHLCV bars) and the supported asset classes, but it does not mention bar ordering, exchange-selection caveats for non-EURONEXT symbols, adjustment behavior, or error handling. Some useful transparency exists, but important nuances are omitted.

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 two short sentences with no filler. The primary action is front-loaded, and the second sentence adds useful asset-class scope without bloating the definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and the schema documents all parameters, so an agent can invoke it. However, with no output schema and no annotations, the description leaves out useful invocation-relevant details such as whether exchange must match the symbol (the default is EURONEXT, which may not work for all symbols) and the ordering/shape of returned bars.

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%, so each parameter is already documented. The description adds broad domain context ('Supports stocks, crypto, forex, futures'), but it does not add parameter-specific meaning beyond what the schema provides. The baseline 3 applies.

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 uses a specific verb and resource: 'Fetch historical OHLCV bars for any symbol from TradingView.' This clearly distinguishes it from sibling tools like tv_get_quote, tv_get_indicators, and tv_screener, which serve different purposes (current quote, derived indicators, screening).

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 provides clear context: use this tool when historical OHLCV candle data is needed. It does not explicitly say 'use tv_get_quote for current prices' or 'use tv_get_indicators for computed values,' but the historical bar framing makes the intended use apparent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.