Skip to main content
Glama
Miha21222

tradingview-mcp

by Miha21222

tv_data_get_bars

Read-only

Fetch historical OHLCV bars for any symbol. Returns time, open, high, low, close, volume arrays, with cached repeat queries for quick access.

Instructions

Fetch historical OHLCV bars. Cached in Parquet; repeat queries are instant.

Providers: dukascopy (free, deep history to ~2000s, first fetch of a range is slow) and oanda (real broker mid prices, needs OANDA_API_KEY). Bars are UTC, returned as arrays [time_iso, open, high, low, close, volume]. The provider field in the result names the feed - feeds disagree; levels are feed-specific.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoISO date/datetime UTC. Default: now.
countNoMax bars returned (tail of range)
startNoISO date/datetime UTC, e.g. 2026-07-01. Default: computed back from `count`.
symbolYesAny alias: EURUSD, OANDA:EURUSD, EUR_USD, eurusd
providerNoauto | dukascopy | oanda. auto prefers OANDA when a key is configured.auto
timeframeNoM1, M5, M15, M30, H1, H4, D1 (aliases like 15m/1h accepted)M15

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations declare readOnlyHint and openWorldHint, and the description adds substantial context: Parquet caching makes repeat queries instant, first fetch can be slow, bars are UTC, output format is arrays, and feeds disagree with feed-specific levels. This goes beyond the annotation hints without contradicting them.

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 compact, with each sentence serving a purpose: main action, caching, providers, output format, and a caveat. It is front-loaded with the main verb and resource, and no filler.

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

Completeness5/5

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

With an output schema present, the description still covers key behavioral aspects: caching, provider specifics, timezone, output format, and feed disagreement. For a 6-parameter tool, this is complete enough for an agent to invoke correctly.

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

Parameters4/5

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

Schema covers 100% of parameters, so the baseline is 3. The description adds meaning to the provider parameter by explaining provider differences (dukascopy free/deep, oanda requires key), and clarifies the output format. This extra context justifies a 4.

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 states a specific verb ('Fetch') and resource ('historical OHLCV bars'), and the provider/output details clearly differentiate it from screening, TA, and search tools. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus siblings is provided. However, the description implies it is the go-to for historical bar data, and provider selection is covered. Since alternatives are not named, it only achieves implied usage.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Miha21222/tradingview-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server