Skip to main content
Glama
16Coffee

Yahoo Finance MCP Server

by 16Coffee

get_shares_float_info

Retrieve detailed float share data for a specific company or a list of all companies using the Yahoo Finance MCP Server. Specify parameters to filter results by symbol, page, or limit for precise financial insights.

Instructions

获取流通股数据或全部公司流通股列表。

参数说明: info_type: str single 或 all symbol: str 查询单个公司时必填 page: int 列表分页,默认 0 limit: int 返回数量,默认 1000

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
info_typeYes
limitNo
pageNo
symbolNo

Implementation Reference

  • The tool handler for 'get_shares_float_info'. This decorated async function retrieves shares float data (circulating shares) from the Financial Modeling Prep API. Supports 'single' mode for a specific symbol or 'all' mode with pagination. Includes input validation, API key check, and error handling.
    @fmp_server.tool(
        name="get_shares_float_info",
        description="""获取流通股数据或全部公司流通股列表。
    
    参数说明:
        info_type: str
            single 或 all
        symbol: str
            查询单个公司时必填
        page: int
            列表分页,默认 0
        limit: int
            返回数量,默认 1000""",
    )
    async def get_shares_float_info(
        info_type: str,
        symbol: str = "",
        page: int = 0,
        limit: int = 1000,
    ) -> str:
        """获取流通股信息"""
    
        api_key = os.environ.get("FMP_API_KEY")
        if not api_key:
            return "Error: FMP_API_KEY environment variable not set."
    
        base = "https://financialmodelingprep.com/stable"
        endpoint_map = {
            "single": "shares-float",
            "all": "shares-float-all",
        }
        endpoint = endpoint_map.get(info_type.lower())
        if not endpoint:
            return "Error: invalid info type"
    
        params = {"apikey": api_key}
        if info_type == "single":
            if not symbol:
                return "Error: symbol is required for single type"
            params["symbol"] = symbol
        else:
            params.update({"page": page, "limit": limit})
    
        url = f"{base}/{endpoint}"
        try:
            resp = requests.get(url, params=params, timeout=10)
            resp.raise_for_status()
            data = resp.json()
        except Exception as e:
            return f"Error: getting shares float info {info_type}: {e}"
        return json.dumps(data)
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 describes what data is retrieved but doesn't mention rate limits, authentication needs, data freshness, error handling, or pagination behavior beyond basic parameter defaults. For a data retrieval tool with no annotation coverage, this leaves significant gaps in understanding how it behaves operationally.

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: the first sentence states the purpose, followed by a structured parameter section. Every sentence adds value, with no redundant information. It could be slightly more concise by integrating parameter details more seamlessly, but overall it's efficient.

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 complexity (4 parameters, no annotations, no output schema), the description is moderately complete. It covers the purpose and parameters well but lacks behavioral context (e.g., rate limits, data sources) and output details. For a data retrieval tool, this is adequate but leaves room for improvement in explaining what the returned data looks like or any usage constraints.

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%, so the description must compensate. It adds meaningful semantics for all parameters: 'info_type' specifies 'single' or 'all', 'symbol' is required for single queries, 'page' handles pagination with default 0, and 'limit' controls return count with default 1000. This clearly explains what each parameter does, though it could benefit from examples or constraints (e.g., valid symbol formats).

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 circulating share data or a list of all company circulating shares). It specifies the verb (get/retrieve) and resource (circulating shares), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_stock_info' or 'get_stock_actions', which might also provide share-related data, so it doesn't reach the highest 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. It doesn't mention any prerequisites, context for choosing between 'single' or 'all' info types, or how it relates to sibling tools like 'get_stock_info' or 'get_stock_grades'. Usage is implied through parameter descriptions but not explicitly stated.

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