Skip to main content
Glama
barvhaim

YFinance MCP Server

by barvhaim

get_historical_data

Retrieve historical stock price data for any ticker symbol over a specified period and interval. Use past prices to analyze trends, backtest strategies, and inform investment decisions.

Instructions

Get historical stock price data.

Args: symbol: Stock ticker symbol (e.g., 'AAPL', 'GOOGL') period: Time period (1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max) interval: Data interval (1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo)

Returns: Dictionary containing historical price data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodNo1mo
symbolYes
intervalNo1d

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the accepted period and interval values and notes that a dictionary is returned, which is some behavioral context. However, it omits details like data source, whether prices are adjusted, or any error/rate-limit behavior, leaving notable gaps.

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 description is structured with Args and Returns sections, making it scannable. The enum lists are somewhat verbose but are justified because they substitute for missing schema descriptions. No filler or redundancy.

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?

Given the moderate complexity, the description covers parameters and return type, and an output schema exists. However, it lacks usage context, such as when to choose this over siblings or any caveats about historical data, making it minimally viable but not complete.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so fully by explaining symbol with ticker examples and enumerating all valid values for period and interval. This adds substantial meaning beyond the bare 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 opens with 'Get historical stock price data,' which is a specific verb+resource+scope. It clearly distinguishes itself from sibling tools like get_stock_info, get_dividends, and get_financials by focusing on historical price data rather than company info or corporate actions.

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?

No explicit when-to-use or when-not-to-use guidance is provided. The description does not mention alternatives (e.g., using get_multiple_quotes for current prices) or exclusions, leaving the agent to infer usage solely from the tool name and sibling list.

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/barvhaim/yfinance-mcp-server'

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