Skip to main content
Glama
yfinance-agent-mcp

yfinance-agent-mcp

by n-kostadinov

Get fundamentals

get_fundamentals
Read-only

Retrieve financial statements, valuation history, and key ratios for a single stock symbol, with concise or detailed line items across yearly, quarterly, or trailing periods.

Instructions

Financial statements, valuation history or key ratios for one symbol.

Statements come as one record per period, newest first. 'concise' keeps the key line items (revenue, net income, EPS, cash flow, debt...); 'detailed' returns every line.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "get_fundamentals"
  }
}

Input Schema

NameRequiredDescriptionDefault
freqNoStatement periods; 'trailing' = last twelve months (not balance).quarterly
symbolYesOne Yahoo Finance symbol, e.g. AAPL.
statementNoincome, balance (sheet), cashflow, valuation (history of market cap, P/E, EV/EBITDA...) or key_stats (margins, growth, debt, ownership).income
response_formatNo'concise' (default; up to 20,000 characters) or 'detailed' (up to 80,000).concise

Output Schema

NameRequiredDescriptionDefault
freqNoyearly, quarterly or trailing.
as_ofYesWhen this data was fetched from Yahoo Finance, in UTC.
sourceNoData source and the yfinance version.
symbolYes
periodsNoOne record per period, newest first; line items as snake_case keys.
warningsNoCaveats such as delayed quotes, symbols that failed, or trimmed results.
key_statsNo
statementYes
truncatedNoTrue when rows were left out to keep the response small.
next_offsetNoPass as `offset` to fetch the next rows, when the result is truncated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuine behavioral context beyond that: records are returned one per period, ordered newest first, and the two response formats trade line-item coverage against size limits.

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 short sentences, front-loaded with what is returned, followed by ordering and granularity details. Every sentence carries information the agent needs, with no filler.

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?

An output schema exists so return values need not be described, and the enum parameters are fully documented in the schema. The description covers resource scope, ordering, and response granularity, missing only explicit frequency semantics, which the schema already supplies.

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 the baseline is 3, but the description goes further by enumerating what 'concise' preserves (revenue, net income, EPS, cash flow, debt) versus 'detailed' returning every line. This gives the agent a concrete sense of the tradeoff rather than just the character caps.

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 the specific resource set — financial statements, valuation history, key ratios — and scopes it to one symbol, so an agent can distinguish this from quote or price-history tools. It does not explicitly contrast itself with siblings such as get_analyst_view or get_ticker_dataset, keeping it below a 5.

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?

There is no explicit guidance on when to choose this tool over alternatives, nor any exclusions or prerequisites. Usage is only implied by the 'one symbol' scope, leaving the agent to infer routing decisions from the enum values alone.

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