Skip to main content
Glama
VaishnaviK23

Trading MCP Server

by VaishnaviK23

current_price

Fetch live stock prices from Yahoo Finance. Enter a stock symbol to get current market data for trading decisions.

Instructions

Fetch the live price of a stock symbol.

Args: symbol: Stock ticker symbol (e.g. AAPL, TSLA) - This should be a valid symbol supported by Yahoo Finance.

Returns: The current market price as a float, or -1.0 if the price could not be fetched.

Example: get_live_price("AAPL") -> 193.45

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The current_price tool is defined and registered using the @mcp.tool() decorator, and it calls the get_live_price helper function.
    @mcp.tool()
    def current_price(symbol: str) -> float:
        """Fetch the live price of a stock symbol.
    
        Args:
            symbol: Stock ticker symbol (e.g. AAPL, TSLA)
                - This should be a valid symbol supported by Yahoo Finance.
    
        Returns:
            The current market price as a float, or -1.0 if the price could not be fetched.
    
        Example:
            get_live_price("AAPL") -> 193.45
        """
        return get_live_price(symbol)
Behavior4/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. It successfully documents the error handling behavior (returns -1.0 on failure) and identifies the data source (Yahoo Finance). However, it omits rate limits, caching behavior, or whether the data is real-time versus delayed.

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 structured format (Args/Returns/Example) is efficient and front-loaded. Information density is high with minimal waste. Minor deduction for the example referencing 'get_live_price()' rather than the actual tool name 'current_price', which could cause momentary confusion.

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?

For a single-parameter read operation with an output schema present, the description is appropriately complete. It clarifies the error return value (-1.0) which is valuable context not necessarily visible in the output schema alone. Missing only operational details like rate limiting.

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?

Given 0% schema description coverage, the description effectively compensates by providing the parameter semantics inline: 'Stock ticker symbol (e.g. AAPL, TSLA)' with validation guidance ('valid symbol supported by Yahoo Finance'). The examples and constraints add meaningful context beyond the bare schema.

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

Purpose5/5

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

The description opens with a specific verb ('Fetch') and clear resource ('live price of a stock symbol'), precisely defining the tool's scope. It effectively distinguishes from siblings like 'portfolio' or 'trade_history' by focusing on real-time market data lookup rather than historical analysis or trading operations.

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?

While the implied usage is clear (use when needing current market prices), there is no explicit guidance on when to use this versus alternatives like 'portfolio' which might also contain price data, or when to prefer 'simulate_sell' for price checks. No prerequisites or rate limit warnings are mentioned.

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/VaishnaviK23/Trading-MCP-Server'

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