Skip to main content
Glama
Yahoo Finance MCP Server

Yahoo Finance MCP Server

yfinance_get_stock_recommendations

Read-only

Retrieve analyst recommendations and rating changes for a stock ticker, with configurable result limits and JSON or Markdown output.

Instructions

Get analyst recommendations and rating changes for a stock.

Args: ticker: Stock ticker symbol (e.g., 'AAPL', 'MSFT', 'GOOGL') limit: Maximum number of most recent recommendations to return (default: 20) response_format: Output format - 'json' or 'markdown' (default: 'markdown')

Returns: Formatted string containing analyst recommendations history including: - Date of recommendation - Firm name - Rating change (to grade, from grade) - Action taken

Example: yfinance_get_stock_recommendations("AAPL", "json") yfinance_get_stock_recommendations("AAPL", limit=10) # Only 10 most recent

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": {
      "ticker": "<ticker>"
    },
    "name": "yfinance_get_stock_recommendations"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
tickerYes
response_formatNomarkdown

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 profile is covered. The description adds useful behavior context — it enumerates the returned fields (date, firm, rating change, action) and documents defaults for limit and response_format. It says nothing about invalid-ticker behavior, empty result sets, or upstream rate limits, which are the remaining risks for an open-world read.

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?

Front-loaded with the purpose, then cleanly sectioned into Args, Returns, and Example. The example block is slightly redundant with the Args list, but it usefully demonstrates keyword usage for limit. No sentence is wasted in the core prose.

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?

The tool is simple (three params, one required) and an output schema exists, so the description does not need to fully specify return structure. Combined with annotations covering read-only/open-world semantics, this is essentially complete; only edge-case behavior (invalid ticker, no coverage) is unaddressed.

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 description coverage is 0%, so the description carries the full burden and largely meets it: ticker is explained with concrete symbol examples, limit is defined as 'maximum number of most recent recommendations' with its default of 20, and response_format's two enum values are restated with the default. This meaningfully exceeds the raw JSON schema, which contains only types, defaults, and an enum.

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 opens with a specific verb and resource: 'Get analyst recommendations and rating changes for a stock.' That is far more informative than the name alone, and the scope (single ticker, recommendation history) is unambiguous. It stops short of explicitly contrasting itself with siblings like yfinance_get_stock_info or yfinance_get_earnings_dates, so it earns a 4 rather than 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 Guidelines3/5

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

Usage is only implied by the examples and by the 'limit' semantics ('most recent recommendations'). There is no statement about when to reach for this tool versus the other per-ticker yfinance tools, and no exclusions or prerequisites. An agent can infer the use case, but nothing routes it explicitly.

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