Skip to main content
Glama
pbajkovic-hub

tv-cdp-mcp

tv_export_data

Read-only

Export the active chart as a CSV/JSON table: OHLCV bars plus study values joined by bar time, with inline option. Works around TradingView Desktop's disabled export chart data.

Instructions

Read-only: export the active chart as one table - OHLCV bars plus the plotted values of every study (or the studies you name) joined on bar time - to a CSV (default) or JSON file under the export directory, or inline with write=false. TradingView Desktop refuses its own "Export chart data", so this composes the export from the loaded series: at most 500 bars and only what the chart has scrolled into memory. Studies without a data series (built-in Volume etc.) are listed under skipped. Column names are " | ". Returns symbol, resolution, bar count, first/last bar, the columns and the file path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNofile name override (extension added if missing); default <symbol>_<res>_<yyyymmdd-hhmm>.<ext>
countNomost-recent bars to export; default 500, max 500
writeNodefault true; false = no file, rows returned inline (max 500)
formatNofile format; default csv
layoutNowhich chart tab: layout id, target id or 0-based index (default: the painting tab)
out_dirNodirectory for the file; default <repo>/exports or TV_EXPORT_DIR (created if missing)
studiesNostudy ids or case-insensitive name parts to include; omit = every study on the chart; [] = bars only
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)
include_decorationNoalso export colorer / fill plots (packed colour ints); default false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint/destructiveHint annotations, the description discloses real behavioral traits: TradingView Desktop refuses its own export, the export is composed from loaded series, there is a 500-bar cap, studies without series are listed under `skipped`, and column names follow a specific pattern. No contradiction with annotations.

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 dense but every sentence earns its place: core action first, then limitations, skipped-study behavior, column naming, and return fields. It is long only because the tool has many behavioral nuances that matter for correct invocation.

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 no output schema, the description explicitly lists what is returned: symbol, resolution, bar count, first/last bar, columns, and file path. Combined with fully documented input schema parameters and edge-case disclosures, an agent has everything needed to call and interpret the tool.

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 coverage is 100%, so the baseline is 3, but the description adds integration context: write=false means inline rows, studies can be selected by name, count is capped at 500, and the export is joined on bar time. It does not restate each schema field but enriches how the parameters work together.

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 and resource: 'export the active chart as one table' with OHLCV bars plus study plots joined on bar time. This scope clearly differentiates it from sibling data-access tools like tv_get_bars and tv_get_study_values without needing to name them.

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?

It gives clear context: read-only, at most 500 bars, only what the chart has scrolled into memory, and how skipped studies behave. It does not explicitly name alternative tools or state when not to use it, but the caveats make the intended usage understandable.

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