Skip to main content
Glama
16Coffee

Yahoo Finance MCP Server

by 16Coffee

get_top_losers

Identify stocks with the largest daily price declines using the Yahoo Finance MCP Server's tool for tracking top market losers.

Instructions

获取今日跌幅最大的股票列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the logic for the 'get_top_losers' tool. It fetches the daily top losers from the Financial Modeling Prep API using the provided API key and returns the JSON data as a string.
    async def get_top_losers() -> str:
        """获取今日跌幅榜"""
    
        api_key = os.environ.get("FMP_API_KEY")
        if not api_key:
            return "Error: FMP_API_KEY environment variable not set."
    
        url = "https://financialmodelingprep.com/api/v3/stock_market/losers"
        try:
            resp = requests.get(url, params={"apikey": api_key}, timeout=10)
            resp.raise_for_status()
            data = resp.json()
        except Exception as e:
            return f"Error: getting top losers: {e}"
        return json.dumps(data)
  • server.py:705-708 (registration)
    The registration of the 'get_top_losers' tool using the FastMCP decorator, specifying the tool name and description.
    @fmp_server.tool(
        name="get_top_losers",
        description="""获取今日跌幅最大的股票列表。""",
    )
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 of behavioral disclosure. It states what the tool does but lacks details on permissions, rate limits, data freshness, or output format. For a tool with zero annotation coverage, this is a significant gap in transparency about how it behaves beyond the basic function.

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

Conciseness5/5

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

The description is a single, efficient sentence in Chinese that directly states the tool's purpose without any fluff. It's front-loaded with the core function and appropriately sized for a simple tool with no parameters.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally complete. It explains what the tool does but lacks details on output format, data sources, or error handling. For a tool that likely returns a list of stocks, more context on the return structure would be helpful, but it's adequate for basic understanding.

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?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline of 4 is applied for zero-parameter tools, as there's nothing to compensate for.

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: '获取今日跌幅最大的股票列表' (Get today's list of stocks with the largest declines). It specifies the verb ('获取' - get) and resource ('股票列表' - stock list) with a clear scope ('今日跌幅最大的' - today's largest declines). However, it doesn't explicitly distinguish from its sibling 'get_top_gainers', which is a closely related tool for top gainers rather than losers.

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. It doesn't mention sibling tools like 'get_top_gainers' for contrast, nor does it specify prerequisites, frequency, or contextual cues for invocation. The user must infer usage from the purpose alone.

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/16Coffee/finance-mcp'

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