Skip to main content
Glama

Get OHLC candles

get_ohlc

Retrieve recent OHLC candles for any symbol. Choose timeframe and bar count to get market data for analysis.

Instructions

Returns recent candles for a symbol. Long ranges are truncated to the most recent rows; the response states the total available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barsNoHow many of the most recent bars to use.
symbolYesInstrument symbol, for example XAUUSD. Case-insensitive.
timeframeNoBar size. Defaults to 1d.

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 transparency burden. It discloses a non-obvious behavioral trait: long ranges are truncated to the most recent rows, and the response states total available. It does not cover error cases or row ordering, but the key edge-case behavior is surfaced.

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?

Two sentences with no filler. The core purpose is front-loaded, followed by a concise behavioral caveat. Every word earns its place.

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 simple retrieval tool with no annotations or output schema, the description covers the main purpose, truncation behavior, and response-related note. It omits minor details like ordering and timestamp format, but standard OHLC data and the schema's parameter descriptions make this sufficient.

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 baseline is 3. The description adds contextual behavior about truncation that relates to the bars parameter but does not detail each parameter beyond the schema. The schema already documents symbol, bars, and timeframe adequately.

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 ('Returns recent candles for a symbol') and is clearly distinguished from siblings like list_symbols, backtest, indicator, and position_size by its unique data-retrieval role. An agent can determine what this tool does without needing to open the schema.

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?

The purpose statement implies when to use the tool (whenever recent OHLC candles are needed), but it provides no explicit exclusions or recommendations among alternatives. There is no mention of when not to use this tool or which sibling might be more appropriate.

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

Deploy Server

Other Tools