Skip to main content
Glama
Yahoo Finance MCP Server

Yahoo Finance MCP Server

yfinance_search_stocks

Read-only

Search stocks by company name or ticker symbol and verify ticker validity before use. Returns ticker, company name, exchange, and security type in JSON or Markdown.

Instructions

Search for stocks by company name or ticker symbol to verify ticker validity.

Args: query: Search query (company name or ticker symbol) response_format: Output format - 'json' or 'markdown' (default: 'markdown')

Returns: Formatted string containing search results with: - Whether stock was found - Ticker symbol - Company name - Exchange - Security type

Example: yfinance_search_stocks("AAPL", "json") yfinance_search_stocks("Apple", "markdown")

Note: yfinance has limited search capabilities. This tool validates if a ticker exists.

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": {
      "query": "<query>"
    },
    "name": "yfinance_search_stocks"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
response_formatNomarkdown

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 safety and external-network behavior are covered. The description adds genuine context beyond that — the caveat that 'yfinance has limited search capabilities' and that results indicate 'whether stock was found' — but says nothing about result caps, rate limits, or fuzzy-match behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The Args/Returns/Example block format is readable and the examples are concrete, but the Returns field list largely duplicates the existing output schema, and the most important caveat ('limited search capabilities') is buried in a trailing note instead of being front-loaded.

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?

With annotations covering the read-only profile, an output schema covering return values, and both parameters documented in prose, an agent has nearly everything needed to invoke this correctly. Only minor operational details (match behavior, result limits) are absent.

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 0%, so the description carries the full burden, and it does document both parameters: query as 'company name or ticker symbol' and response_format as 'json' or 'markdown' with its default. It adds real meaning over bare schema types, though it gives no guidance on which format to prefer or how matching is performed.

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 gives a specific verb and resource ('Search for stocks by company name or ticker symbol') plus a stated goal ('to verify ticker validity'), which clearly separates it from the sibling getters that assume a known ticker. It does not name any sibling explicitly, which is the only thing keeping it from 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 Guidelines4/5

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

The stated intent to 'verify ticker validity' and the closing note that 'this tool validates if a ticker exists' tell an agent this is a lookup/pre-flight step before calling the data-fetching siblings. There are no explicit exclusions or named alternatives, so guidance is clear but not exhaustive.

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