Skip to main content
Glama
leoncuhk

MCP Yahoo Finance

by leoncuhk

get_earning_dates

Retrieve upcoming and historical earnings announcement dates for stocks to track corporate financial 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 MCP tool handler for 'get_earning_dates', registered via @mcp_instance.tool() decorator. It delegates execution to the YahooFinance class instance method.
    @mcp_instance.tool()
    def get_earning_dates(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.
        """
        return yf_instance.get_earning_dates(symbol, limit)
  • Core implementation of earnings dates retrieval in the YahooFinance class using yfinance library. Fetches data with Ticker.get_earnings_dates() and formats as JSON string.
    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}"
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. It doesn't indicate whether this is a read-only operation, whether it requires authentication, what format the dates are returned in, whether there are rate limits, or what happens with invalid symbols. The description provides zero behavioral context beyond the basic action.

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 technically concise with just three words, this is under-specification rather than effective conciseness. The description doesn't front-load important information and fails to provide the minimal necessary context for understanding the tool's purpose. Every word should earn its place, but here the words don't provide enough value to justify their inclusion.

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 that this is a financial data tool with 2 parameters, no annotations, and no output schema, the description is woefully incomplete. It doesn't explain what 'earning dates' means (earnings announcement dates, reporting dates, etc.), doesn't describe the return format, and provides no context about data sources or limitations. For a tool that presumably returns time-sensitive financial information, this level of documentation is inadequate.

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 description provides no parameter information, but the input schema has 100% description coverage with clear documentation for both 'symbol' (stock symbol format) and 'limit' (default behavior and usage guidance). Since schema_description_coverage is high (>80%), the baseline score of 3 is appropriate even though the description adds no value beyond what the schema already provides.

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 merely restates the tool name without adding meaningful context. It specifies the verb 'Get' and resource 'earning dates', but doesn't distinguish this tool from sibling tools like get_dividends or get_historical_stock_prices in terms of what specific financial data it retrieves. The description lacks specificity about what 'earning dates' actually means in this context.

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 absolutely no guidance about when to use this tool versus alternatives. There's no mention of use cases, prerequisites, or comparison to sibling tools like get_income_statement or get_cashflow that might provide related financial information. The agent receives no contextual help for tool selection decisions.

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/leoncuhk/mcp-yahoo-finance'

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