Skip to main content
Glama
yfinance-agent-mcp

yfinance-agent-mcp

by n-kostadinov

Get options

get_options
Read-only

Retrieve call and put option chains for a stock, including contracts near the current price, all expirations, pricing, volume, open interest, implied volatility, and in-the-money status.

Instructions

Calls and puts around the current price for one expiration, plus every expiry.

Each contract has last price, bid/ask, change %, volume, open interest, implied volatility and whether it is in the money.

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_options"
  }
}

Input Schema

NameRequiredDescriptionDefault
expiryNoExpiration date (YYYY-MM-DD); default the nearest.
symbolYesOne Yahoo Finance symbol, e.g. AAPL.
response_formatNo'concise' (default; up to 20,000 characters) or 'detailed' (up to 80,000).concise
strikes_each_sideNoStrikes to show below and above the price.

Output Schema

NameRequiredDescriptionDefault
putsYesStrikes around the price, ascending.
as_ofYesWhen this data was fetched from Yahoo Finance, in UTC.
callsYesStrikes around the price, ascending.
expiryYesExpiration date of the chain shown (YYYY-MM-DD).
sourceNoData source and the yfinance version.
symbolYes
warningsNoCaveats such as delayed quotes, symbols that failed, or trimmed results.
truncatedNoTrue when rows were left out to keep the response small.
expirationsYesEvery listed expiration, nearest first.
next_offsetNoPass as `offset` to fetch the next rows, when the result is truncated.
underlying_priceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety and external-data profile is covered. The description adds the notable behavior that strikes are centered 'around the current price,' but says nothing about data delay, empty results for non-optionable symbols, or pagination/truncation beyond the response_format char limits already in the schema.

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?

Two short sentences with no filler, and the scope statement leads. The field enumeration in sentence two is dense but useful; the only weakness is that the trailing 'plus every expiry' clause is compressed to the point of ambiguity.

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 the description need not explain return values, and the input schema fully documents all four parameters. With annotations covering read-only and open-world traits, the definition is nearly sufficient; only the 'plus every expiry' ambiguity and absent sibling routing leave minor gaps.

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 all four parameters are already documented in the schema; baseline is 3. The description's 'around the current price' loosely corroborates strikes_each_side and 'one expiration' corroborates expiry, but adds no syntax, default, or edge-case meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description conveys the resource (options chain: calls and puts for a symbol) and enumerates the returned fields, but never states a verb such as 'retrieves' or 'fetches'. The phrase 'plus every expiry' is ambiguous — it is unclear whether the tool returns all expiries, or merely the list of available expiries alongside one chain.

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 guidance on when to pick this over get_quotes, get_price_history, or get_live_quotes, and no stated prerequisites such as needing an options-enabled symbol. Usage is only inferable from the description of returned data.

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