Skip to main content
Glama
16Coffee

Yahoo Finance MCP Server

by 16Coffee

get_crypto_quote_short

Retrieve a concise summary of cryptocurrency market data by specifying the symbol. Access real-time prices and essential details from Yahoo Finance for informed trading decisions.

Instructions

获取指定加密货币的简要行情。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • The handler function that implements the tool logic: fetches short crypto quote for a given symbol using the Financial Modeling Prep API, returns JSON string or error message.
    async def get_crypto_quote_short(symbol: str) -> 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/stable/quote-short" try: resp = requests.get(url, params={"symbol": symbol, "apikey": api_key}, timeout=10) resp.raise_for_status() data = resp.json() except Exception as e: return f"Error: getting short crypto quote for {symbol}: {e}" return json.dumps(data)
  • server.py:1142-1145 (registration)
    The @fmp_server.tool decorator that registers the get_crypto_quote_short tool with its name and description.
    @fmp_server.tool( name="get_crypto_quote_short", description="""获取指定加密货币的简要行情。""", )

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