Skip to main content
Glama
coreyjwang

FinDataMCP

by coreyjwang

get_stock_price

Retrieve the current stock price for a specific ticker symbol using Yahoo Finance data integration. Input the stock ticker symbol to receive up-to-date pricing information.

Instructions

Get the current stock price using yfinance.

Args:
    symbol: Stock ticker (e.g. AAPL, TSLA, MSFT)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • The tool handler decorated with @mcp.tool(), which implements the get_stock_price logic using yfinance library. Includes input schema in docstring and type hints.
    @mcp.tool()
    async def get_stock_price(symbol: str) -> str:
        """Get the current stock price using yfinance.
    
        Args:
            symbol: Stock ticker (e.g. AAPL, TSLA, MSFT)
        """
        try:
            stock = yf.Ticker(symbol)
            info = stock.info
            price = info["currentPrice"]
            currency = info.get("currency", "USD")
            return f"{symbol.upper()} is trading at {price} {currency}."
        except Exception:
            return f"Could not retrieve stock price for {symbol}."
Behavior2/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. It mentions the data source (yfinance) but lacks critical behavioral details such as rate limits, error handling, freshness of data, or authentication requirements for a financial data tool.

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?

The description is appropriately sized and front-loaded with the core purpose, followed by parameter details. It avoids unnecessary fluff, though the formatting with 'Args:' could be slightly more polished.

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 no annotations, no output schema, and a single parameter, the description is incomplete. It lacks information on return values, error cases, and operational constraints, which are essential for effective tool use in an AI agent context.

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%, but the description compensates by explaining the 'symbol' parameter as 'Stock ticker' with examples (AAPL, TSLA, MSFT), adding meaningful context beyond the bare schema. However, it doesn't cover all potential nuances like format constraints.

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 clearly states the tool's purpose with a specific verb ('Get') and resource ('current stock price'), and mentions the data source ('using yfinance'). However, since there are no sibling tools, it cannot demonstrate differentiation from alternatives, preventing a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or limitations. It only states what the tool does without context for usage 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

Related 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/coreyjwang/FinDataMCP'

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