Skip to main content
Glama

Get Ohlcv

get_ohlcv
Read-onlyIdempotent

Fetch raw OHLCV candlestick bars for a symbol and interval to inspect recent price action or run your own calculations.

Instructions

Fetches raw OHLCV (Open, High, Low, Close, Volume) candlestick bars for a symbol. Use when you need the price series itself — to eyeball recent action or do your own maths.

This is the cheapest of the three price tools and the only one that returns bars. For indicators and a reading of them use get_market_analysis; for whether the daily, hourly and 15-minute pictures agree use get_multi_timeframe.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "get_ohlcv"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoNumber of bars to return (default 20).
symbolYesThe stock symbol (e.g. AAPL, KBANK).
intervalNoBar interval (D, M1, M5, M15, M30, H1, W).D

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.1
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "type": "object",
      -  "x-fastmcp-wrap-result": true
      -}New value: +null
  2. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so safety is covered. The description adds genuine behavioral context beyond them: it is the cheapest of the three price tools and is the only one returning raw bars rather than derived indicators. It does not cover response size limits for 'count' or error behavior for an invalid symbol, which keeps it short of a 5.

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?

Three short blocks, front-loaded with the capability, then the use case, then sibling routing. No sentence is redundant; even the parenthetical expansion of OHLCV pays for itself by defining the return shape.

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 three-parameter read tool with no output schema, the description tells the agent what comes back (raw bars) and steers it to the right sibling, which is the critical gap to close. Missing only minor operational detail such as count limits and invalid-symbol handling.

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 coverage is 100%, and each of the three parameters (symbol, count, interval) is documented in the schema itself. The description adds no syntax, default, or interval-format detail beyond that, so the baseline 3 is appropriate.

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 ('Fetches raw OHLCV candlestick bars for a symbol') and immediately disambiguates it from the two sibling price tools by noting it is 'the only one that returns bars'. An agent can distinguish it from get_market_analysis and get_multi_timeframe without inspecting any schema.

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

Usage Guidelines5/5

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

It gives an explicit use condition ('when you need the price series itself — to eyeball recent action or do your own maths') and names both alternatives with the condition that selects each: indicators go to get_market_analysis, cross-timeframe agreement goes to get_multi_timeframe. Little is left to inference.

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