Skip to main content
Glama

Get stock price history

market_get_stock_price
Read-onlyIdempotent

Fetch current price and historical price data for stocks, indices, or exchange rates. Provides price, 52-week range, and a sampled historical table.

Instructions

Get the current price and price history for a ticker (any exchange: US tickers as-is, others with a Yahoo suffix like 'SAP.DE', 'MC.PA', 'SHOP.TO', '7203.T'), an index ('^GSPC', '^MXX') or an exchange rate ('EURUSD=X', 'MXN=X' for USD/MXN). Returns current price, 52-week range, return over the range, max drawdown, and a sampled price table (split/dividend-adjusted closes). Source: Yahoo Finance's public chart endpoint (unofficial; may occasionally be unavailable).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNoHistory range (default 1y).1y
symbolYesTicker, e.g. 'AAPL', 'BRK-B', 'SAP.DE'.
max_pointsNoRows in the price table (default 24, evenly sampled).
response_formatNoOutput format: 'markdown' (readable, default) or 'json' (structured).markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, the description warns that the data comes from Yahoo Finance's unofficial public endpoint and may occasionally be unavailable, which is important for agent error handling. It also discloses that closes are split/dividend-adjusted and that the price table is sampled.

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 purposeful sentences with no filler: purpose and input conventions lead, return summary follows, and the source caveat closes. The examples are dense but informative, not padding.

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?

Since there is no output schema, the description's enumeration of return fields (current price, 52-week range, return over the range, max drawdown, sampled price table) is essential and mostly sufficient. Exact output shapes and behavior for invalid symbols are not specified, but an agent can still call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 real value for the symbol parameter by explaining suffix conventions, index formats, exchange-rate symbols, and the USD/MXN meaning. The remaining parameters are already well described by the schema.

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 ('Get') and names both the resource and its full scope: current price and price history for tickers, indices, or exchange rates. The instrument taxonomy and examples make it clearly distinct from sibling tools like market_get_dividends or market_get_valuation.

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?

It provides clear eligibility rules: US tickers as-is, non-US tickers with Yahoo suffixes, indices with carets, and FX symbols with '=X'. It does not explicitly name sibling alternatives or exclusion conditions, but the intended use case is unmissable from the scope and examples.

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