Skip to main content
Glama

Price history (OHLCV)

get_price_history
Read-onlyIdempotent

Get daily OHLCV price history for a ticker: open/high/low/close/volume. Use period_days to control how far back (default 365, max 3650).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barsNohow many recent sessions to return when no window is given (default 20, max 120)
tickerYesTicker symbol, e.g. 'SPY', 'GDX', 'AAPL'
to_dateNoend of the window to quote, YYYY-MM-DD
from_dateNostart of the window to quote, YYYY-MM-DD
period_daysNoNumber of days of history (default 365, max 3650)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerNo
currentNo
date_rangeNo
total_barsNo
instrument_idNo
recent_pricesNo
period_return_pctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedOutput schema / properties / current / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / date_range / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / instrument_id / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / period_return_pct / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
    • changedOutput schema / properties / recent_prices / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / ticker / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / total_bars / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
  2. Changed4 schema fields changed
    • addedInput schema / properties / bars
      Added value: +{
      +  "description": "how many recent sessions to return when no window is given (default 20, max 120)",
      +  "type": "integer"
      +}
    • addedInput schema / properties / from_date
      Added value: +{
      +  "description": "start of the window to quote, YYYY-MM-DD",
      +  "type": "string"
      +}
    • addedInput schema / properties / to_date
      Added value: +{
      +  "description": "end of the window to quote, YYYY-MM-DD",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "current": {
      +      "type": "object"
      +    },
      +    "date_range": {
      +      "type": "object"
      +    },
      +    "instrument_id": {
      +      "type": "string"
      +    },
      +    "period_return_pct": {
      +      "type": "number"
      +    },
      +    "recent_prices": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "ticker": {
      +      "type": "string"
      +    },
      +    "total_bars": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds default/max limits on the history window but says nothing about throttling, data availability, or gaps in the series. With annotations carrying the safety burden, this is adequate but thin.

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 tight sentences, front-loaded with the resource and scope, with the acronym expanded inline. Nothing is wasted.

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

Completeness3/5

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

Return values are covered by the output schema and safety by annotations, so the description need not repeat those. However, four overlapping window parameters (bars, from_date, to_date, period_days) coexist with no explanation of which takes precedence, leaving a real ambiguity the description could have resolved.

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 ticker, bars, dates, and period_days. The description only restates period_days' default and max ('default 365, max 3650'), duplicating the schema, and never clarifies precedence between period_days, bars, and the from/to date pair.

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 daily OHLCV price history for a ticker') and spells out the OHLCV components, which cleanly separates it from siblings like get_technical_indicators or get_instrument_info. It does not name an alternative explicitly, but the resource is unambiguous.

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

Usage Guidelines2/5

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

The description gives no when-to-use context and does not route the agent to or away from any sibling. The only guidance is a default/max on period_days, which is a parameter detail rather than a usage condition.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources