Skip to main content
Glama
anconina

yfinance-mcp-ts

by anconina

get_stock_history

Fetch historical OHLCV stock data by symbol and date range for price trend and technical analysis, with optional aggregation and return/volatility stats. Output text or JSON.

Instructions

Returns historical OHLCV data with auto-aggregation and stats. Use for price trends and technical analysis. Text default; set format=json for structured data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoEnd date in YYYY-MM-DD format
startNoStart date in YYYY-MM-DD format
formatNoOutput format (default: text)
periodNoTime period (default: 1y)
symbolsYesStock symbol(s), space-separated
intervalNoData interval (default: 1d)
max_rowsNoMax data rows to return (default: 52)
aggregateNoAggregation level (default: auto based on period)
include_statsNoInclude return%, volatility, max drawdown stats header (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.6

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It restates behaviors already in the schema (auto-aggregation, default text format) but does not disclose truncation behavior (max_rows defaults to 52, which materially clips long ranges), multi-symbol return semantics, rate limits, or error handling. Too thin for a 9-parameter data tool with zero annotation coverage.

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?

Three short sentences with the core capability front-loaded and no padding. The format sentence partially duplicates the schema default, which keeps it from being fully waste-free.

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?

For a 9-parameter tool with no output schema and enum-rich inputs, the description covers purpose, primary use case, and output format choice, but leaves out what multi-symbol requests return, how row truncation works, and whether start/end and period interact. Adequate but with real gaps an agent would hit when invoking 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 description coverage is 100%, so every parameter is already documented, and the description adds no syntax or format detail beyond echoing the default output format. Baseline 3 applies when the schema does the heavy lifting.

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?

The description names a specific verb and resource ('Returns historical OHLCV data') and adds scope details (auto-aggregation, stats), which clearly separates it from get_stock_price and get_stock_summary. It stops short of naming or contrasting any sibling explicitly, so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

'Use for price trends and technical analysis' gives an implied usage context, and the format hint steers output selection, but there is no when-not-to-use guidance and no reference to sibling tools like get_stock_price for spot quotes. The agent must infer the boundary itself.

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