Skip to main content
Glama
16Coffee

Yahoo Finance MCP Server

by 16Coffee

get_executive_info

Retrieve detailed executive information or compensation data for companies using Yahoo Finance data. Input a company symbol and specify the type of data needed, such as executive profiles, compensation details, or benchmarks, to access precise insights.

Instructions

获取公司高管信息或薪酬数据。

参数说明: info_type: str executives、compensation 或 benchmark symbol: str 当类型为 executives 或 compensation 时必填

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
info_typeYes
symbolNo

Implementation Reference

  • The main handler function implementing the 'get_executive_info' tool. It retrieves company executive information, compensation, or benchmark data from the Financial Modeling Prep API based on the provided info_type and optional symbol.
    async def get_executive_info(info_type: str, symbol: str = "") -> 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 = { "executives": "key-executives", "compensation": "governance-executive-compensation", "benchmark": "executive-compensation-benchmark", } endpoint = endpoint_map.get(info_type.lower()) if not endpoint: return "Error: invalid info type" params = {"apikey": api_key} if info_type in ["executives", "compensation"]: if not symbol: return "Error: symbol is required for this info type" params["symbol"] = symbol 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 executive info {info_type} for {symbol}: {e}" return json.dumps(data)
  • server.py:446-455 (registration)
    The @fmp_server.tool decorator that registers the get_executive_info function as an MCP tool with the specified name and description, including parameter details.
    @fmp_server.tool( name="get_executive_info", description="""获取公司高管信息或薪酬数据。 参数说明: info_type: str executives、compensation 或 benchmark symbol: str 当类型为 executives 或 compensation 时必填""", )

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