Skip to main content
Glama
narumiruna

Yahoo Finance MCP Server

yfinance_get_price_history

Read-onlyIdempotent

Retrieve historical stock price data with configurable period and interval. Optionally generate candlestick, VWAP, or volume profile charts.

Instructions

Fetch historical price data and optionally generate technical analysis charts.

When chart_type is None, returns Markdown table with columns:
- Date: Trading date (index)
- Open: Opening price
- High: Highest price
- Low: Lowest price
- Close: Closing price
- Volume: Trading volume
- Dividends: Dividend payments (if any)
- Stock Splits: Split events (if any)

When chart_type is specified, returns a chart image:
- 'price_volume': Candlestick chart with volume bars
- 'vwap': Price with Volume Weighted Average Price overlay
- 'volume_profile': Volume distribution by price level

Set prepost=True to include pre-market and post-market data when available.

Note: Not all period/interval combinations are valid. Minute intervals (1m, 5m, etc.)
only work with short periods (1d, 5d).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol (e.g., 'AAPL', 'GOOGL', 'MSFT')
periodNoTime range: '1d'/'5d' (days), '1mo'/'3mo'/'6mo' (months), '1y'/'2y'/'5y'/'10y' (years), 'ytd' (year-to-date), 'max' (all available data)1mo
intervalNoData granularity: '1m'/'5m'/'15m'/'30m' (minutes), '1h' (hour), '1d'/'5d' (days), '1wk' (week), '1mo'/'3mo' (months). Short intervals require short periods (e.g., '1m' interval only works with '1d'/'5d' period)1d
chart_typeNoOptional visualization: 'price_volume' (candlestick chart with volume bars), 'vwap' (Volume Weighted Average Price overlay), 'volume_profile' (volume distribution by price level). Omit for tabular data
prepostNoInclude pre-market and post-market data when available

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations (readOnlyHint=true, destructiveHint=false) are supported. The description adds detail about output formats: Markdown table with specific columns or chart images depending on chart_type. It also notes validity constraints for intervals, going beyond structured fields.

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?

The description is well-structured: first sentence as command, then bullet points for table columns, chart options, prepost note, and validity warning. Every sentence adds value; no fluff.

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?

The description covers the main output cases (table vs. chart) and common constraints. It lacks details on error handling for invalid combinations, but given the presence of annotations and output schema, it is reasonably complete.

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 coverage is 100%, so baseline is 3. The description adds value by summarizing chart_type options and warning about interval/period compatibility, which is not fully covered in schema descriptions. However, most parameter meaning is already in 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 clearly states 'Fetch historical price data and optionally generate technical analysis charts.' It specifies the resource (historical price data) and the optional chart generation. This distinguishes it from sibling tools that focus on financials, holders, news, etc.

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?

The description provides explicit guidance on chart_type options and warns about valid period/interval combinations. It also explains prepost behavior. However, it does not explicitly mention when to use this tool versus alternatives among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/narumiruna/yfinance-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server