Skip to main content
Glama

Get stock price history and technical indicators

get_stock_price_history
Read-onlyIdempotent

Retrieve bounded historical stock OHLCV bars as daily, weekly, or monthly data, with close-based returns, drawdowns, and optional SMA, EMA, RSI, and MACD to analyze price trends and volatility.

Instructions

Read bounded stored stock OHLCV history, ascending by trade date, as daily, weekly or monthly bars, with close-based price returns/drawdown and optional deterministic SMA, EMA, Wilder RSI and MACD. Useful for price trends, volatility context and technical analysis; use get_stock_metrics for a latest company snapshot. Up to 2600 recent daily source rows; dates filter that bounded window. Provider split/dividend adjustment is unknown: returns are not verified total returns. Missing OHLCV/indicator warm-up remains null; no synthetic sessions, intraday data or live quote claims. Read-only.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum most-recent DAILY source bars to load before date filtering and aggregation (hard cap 2600). Increase for indicator warm-up or longer history.
tickerYesBullrun stock ticker, e.g. AAPL, SAP, ABBN, 6324.T or 7203. Use the listing ticker returned by search_stocks. US/European examples: AAPL, BMW, NESN. Most Asian listings keep their exchange suffix (6324.T, 0700.HK); some use bare codes (005930). Native or suffixed forms resolve only when one listing matches; search by company name or ISIN if unsure.
endDateNoInclusive last trade date; the API still loads the most recent source bars before this filter.
intervalNoAggregate stored daily bars. Weekly buckets start Monday; monthly buckets use the calendar month. No intraday or live quotes.daily
rsiPeriodNoNumber of close-to-close changes for Wilder RSI. MACD uses fixed EMA periods 12/26 and signal 9.
startDateNoInclusive trade-date cutoff, applied after loading the latest source bars. Cannot page into history older than the source limit.
indicatorsNoOptional indicators computed on the selected interval's closes after date filtering. Insufficient warm-up yields null, never a fabricated value.
movingAveragePeriodNoObservation count for SMA and EMA, in the selected interval.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.9.0
    • removedInput schema / properties / endDate / $ref
      Removed value: -"#/properties/startDate"
    • addedInput schema / properties / endDate / type
      Added value: +"string"
    • changedInput schema / properties / ticker / description
      Previous value: -"Bullrun stock ticker, e.g. AAPL, SAP, ABBN, 6324.T or 7203. Bullrun tickers: US and most European listings use the plain local symbol (AAPL, BMW, NESN, ABBN); most Asian and Indian listings keep their exchange suffix (Tokyo 6324.T, Hong Kong 0700.HK, Shanghai 600519.SS, Shenzhen 000001.SZ, Taiwan 2330.TW, Korea 000100.KS, Singapore D05.SI, India RELIANCE.NS), but some Japanese and Korean large caps are plain codes (Toyota 7203, Samsung 005930). Either form is resolved automatically when exactly one listing matches; use search_stocks to find a ticker by company name or ISIN."New value: +"Bullrun stock ticker, e.g. AAPL, SAP, ABBN, 6324.T or 7203. Use the listing ticker returned by search_stocks. US/European examples: AAPL, BMW, NESN. Most Asian listings keep their exchange suffix (6324.T, 0700.HK); some use bare codes (005930). Native or suffixed forms resolve only when one listing matches; search by company name or ISIN if unsure."
  2. Changed1 schema field changedv0.8.1
    • changedInput schema / properties / ticker / description
      Previous value: -"Exact native Bullrun stock ticker, e.g. AAPL, SAP or ABBN; find it with search_stocks. Do not append Yahoo exchange suffixes."New value: +"Bullrun stock ticker, e.g. AAPL, SAP, ABBN, 6324.T or 7203. Bullrun tickers: US and most European listings use the plain local symbol (AAPL, BMW, NESN, ABBN); most Asian and Indian listings keep their exchange suffix (Tokyo 6324.T, Hong Kong 0700.HK, Shanghai 600519.SS, Shenzhen 000001.SZ, Taiwan 2330.TW, Korea 000100.KS, Singapore D05.SI, India RELIANCE.NS), but some Japanese and Korean large caps are plain codes (Toyota 7203, Samsung 005930). Either form is resolved automatically when exactly one listing matches; use search_stocks to find a ticker by company name or ISIN."
  3. Addedv0.7.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, but the description adds substantive context they cannot carry: the 2600-row bounded source window, that date filters apply only inside that window and cannot page older, that provider split/dividend adjustment is unknown so returns are not verified total returns, and that missing warm-up stays null with no synthetic sessions or intraday/live quotes. These are exactly the caveats an agent needs to avoid over-claiming results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability and its scope lead the description, followed by the routing hint and then the caveats, which is the right order. It is dense but nearly every clause carries information; the only mild bloat is the trailing 'Read-only.' which duplicates readOnlyHint and the compound 'no synthetic sessions, intraday data or live quote claims' phrasing.

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?

For an 8-parameter analytical tool with no output schema, the description covers scope, aggregation semantics, indicator warm-up/nulls, data-adjustment uncertainty, and hard window limits. An agent knows what it will get, what it will not get, and where the boundaries are before calling it.

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%, so every parameter including limit, startDate/endDate, interval, indicators, and the period knobs is already documented at the field level; that sets the baseline at 3. The description reinforces the important limit/date interaction ('dates filter that bounded window') and the determinism of indicators, but adds little parameter-level detail the schema does not already supply.

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?

States a specific verb and resource ('Read bounded stored stock OHLCV history') plus the exact shape of the output (ascending daily/weekly/monthly bars with returns, drawdown, and optional SMA/EMA/RSI/MACD). It explicitly names the sibling it is not ('use get_stock_metrics for a latest company snapshot'), so an agent can route between them without opening either schema.

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?

Gives a clear use context ('price trends, volatility context and technical analysis') and names one concrete alternative with the condition that selects it (latest snapshot → get_stock_metrics). It stops short of covering adjacent siblings like get_financial_history or get_etf_timeseries, and there is no explicit when-not guidance beyond the snapshot case.

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