Skip to main content
Glama
marckwei

MCP Yahoo Finance

by marckwei

get_earning_dates

Retrieve upcoming and historical earnings announcement dates for stocks using Yahoo Finance data to track corporate reporting schedules.

Instructions

Get earning dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock symbol in Yahoo Finance format.
limitNomax amount of upcoming and recent earnings dates to return. Default value 12 should return next 4 quarters and last 8 quarters. Increase if more history is needed.

Implementation Reference

  • The core handler function 'get_earning_dates' in the YahooFinance class. It retrieves earnings dates for the given stock symbol using yfinance's Ticker.get_earnings_dates and formats the result as JSON.
    def get_earning_dates(self, symbol: str, limit: int = 12) -> str:
        """Get earning dates.
    
    
        Args:
            symbol (str): Stock symbol in Yahoo Finance format.
            limit (int): max amount of upcoming and recent earnings dates to return. Default value 12 should return next 4 quarters and last 8 quarters. Increase if more history is needed.
        """
    
        stock = Ticker(ticker=symbol, session=self.session)
        earning_dates = stock.get_earnings_dates(limit=limit)
    
        if isinstance(earning_dates, pd.DataFrame):
            earning_dates.index = earning_dates.index.date.astype(str)  # type: ignore
            return f"{earning_dates.to_json(indent=2)}"
        return f"{earning_dates}"
  • Registration of all tools including 'get_earning_dates' via generate_tool calls in the list_tools decorator handler.
    @server.list_tools()
    async def list_tools() -> list[Tool]:
        return [            
            generate_tool(yf.cmd_run),
            generate_tool(yf.get_recommendations),
            generate_tool(yf.get_news),
            generate_tool(yf.get_current_stock_price),
            generate_tool(yf.get_stock_price_by_date),
            generate_tool(yf.get_stock_price_date_range),
            generate_tool(yf.get_historical_stock_prices),
            generate_tool(yf.get_dividends),
            generate_tool(yf.get_income_statement),
            generate_tool(yf.get_cashflow),
            generate_tool(yf.get_earning_dates),
        ]
  • Dispatch logic in the call_tool handler that matches the tool name and invokes the corresponding YahooFinance method.
    case "get_earning_dates":
        price = yf.get_earning_dates(**args)
        return [TextContent(type="text", text=price)]
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. However, it offers no information about traits such as whether this is a read-only operation, potential rate limits, authentication needs, error handling, or what the return format looks like (e.g., structured data vs. raw text). This leaves critical behavioral aspects unspecified.

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

Conciseness2/5

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

While concise with only three words, the description is under-specified rather than efficiently structured. It fails to front-load essential information and doesn't earn its place by adding value beyond the tool name, making it ineffective despite its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (financial data retrieval with two parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'earning dates' entail (e.g., past vs. future dates, format), how results are returned, or any dependencies, leaving significant gaps for the agent to infer.

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?

The schema description coverage is 100%, with clear descriptions for both parameters ('symbol' and 'limit'), so the schema does the heavy lifting. The description adds no additional meaning beyond what's in the schema, such as explaining parameter interactions or constraints, but the baseline score of 3 is appropriate given the high schema coverage.

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

Purpose2/5

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

The description 'Get earning dates' is a tautology that essentially restates the tool name without adding meaningful context. It specifies the resource ('earning dates') but lacks a clear verb beyond 'get' and doesn't distinguish this tool from its siblings like 'get_dividends' or 'get_historical_stock_prices' in terms of what specific financial data it retrieves.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, context for usage, or comparisons to sibling tools (e.g., when to fetch earning dates instead of dividends or news), leaving the agent with no usage instructions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marckwei/no-use-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server