Skip to main content
Glama

data_get_ohlcv

Retrieve historical OHLCV bars from the active chart to compute models or inspect price action; use summary mode for bounds and closed-only filtering to avoid unconfirmed candles.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of bars to retrieve (max 500, default 100)
summaryNoReturn summary stats (high, low, open, close, avg volume, range) instead of all bars — much smaller output
closedOnlyNoExclude the active, currently-forming candle so only confirmed historical bars are returned
expectedTfNoAssert that the returned data matches this timeframe, throwing an error if chart has not switched
expectedSymbolNoAssert that the returned data matches this symbol, throwing an error if chart has not switched

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it declares SIDE EFFECTS: None (read-only) and LIMITATIONS: Maximum 500 bars per request, and explains the closedOnly option's intent (avoiding unconfirmed candle hallucinations). It omits auth/permission requirements and any error or latency behavior, keeping it just below full transparency.

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?

Front-loaded with the core purpose, then cleanly partitioned into WHEN TO USE, SIDE EFFECTS, and LIMITATIONS blocks. Every sentence earns its place and scanning for a specific fact is trivial.

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?

For a 5-parameter, no-annotation, no-output-schema tool, the description covers the essential behavior: read-only nature, the 500-bar cap, and the two behavioral flags. The assertion parameters (expectedTf/expectedSymbol) and the default count live only in the schema, which is acceptable since they are well-documented there, leaving only minor gaps.

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 the schema already documents count, summary, closedOnly, expectedTf, and expectedSymbol. The description restates the summary and closedOnly semantics (and adds a rationale for each) but supplies no syntax or format detail beyond what the schema already provides, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Get historical OHLCV bar data from active chart") plus the scope (active chart), which comfortably distinguishes it from image-based siblings like chart_get_snapshot. However, it does not explicitly name or route against close neighbors such as chart_get_multi_timeframe or data_get_trades, so the differentiation is implicit rather than stated.

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?

Provides an explicit WHEN TO USE clause (computing quantitative models or inspecting raw price action) and a conditional (use summary:true when only high/low/close bounds are needed to conserve context). It gives clear context but never states when NOT to use it or names an alternative tool, so it stops short of full routing guidance.

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