Skip to main content
Glama
pbajkovic-hub

tv-cdp-mcp

tv_get_bars

Read-only

Read OHLCV bars from the active TradingView chart, returning up to 500 most-recent bars with availability info and symbol resolution status.

Instructions

Read OHLCV bars of the active chart straight from the loaded series (newest last). Read-only. Returns at most 500 bars; TradingView only holds what has been scrolled into memory, so available tells you how many bars the chart currently has. Also reports whether the symbol failed to resolve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNohow many most-recent bars to return; default 100, max 500
layoutNochart layout id or index; default active
expect_layoutNolayout id the tab is expected to show right now; the call refuses if it differs (a tab keeps its target id when the user opens another layout in it)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, it adds meaningful behavioral detail: a 500-bar cap, that TradingView only stores scrolled-in-memory bars, the `available` field indicates the true bar count, and failure to resolve the symbol is reported. This is exactly the sort of context an agent needs to interpret results correctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core action. The 'Read-only' sentence adds minor redundancy, but the rest directly informs agent behavior (limit, memory blocking, error flag). No fluff.

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

Completeness4/5

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

Given there is no output schema, the description covers the main return semantics (OHLCV bars, ordering, max count), a status field (`available`), and a possible error condition (symbol failed to resolve). This is strong context for a tool of this simplicity, though it could spell out the exact response structure.

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?

The schema already provides full descriptions for all three parameters (count, layout, expect_layout) with 100% coverage. The description does not add any new meaning to these parameters beyond what the schema gives, so it stays at the baseline for full schema coverage.

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 the exact operation — reading OHLCV bars of the active chart from the loaded series — with the additional detail 'newest last'. This clearly distinguishes it from sibling getters like tv_get_chart_state or tv_get_study_values, which target different data.

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?

It implies the tool is for reading raw OHLCV data of the chart, but it does not explicitly compare it with alternatives such as tv_export_data or tv_get_study_values. The memory limitation is stated, but the description stops short of telling an agent 'use this instead of X when you need only current in-memory bars.'

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