stock_indicators_a
Retrieve key financial indicators for A-share stocks in China's Shanghai and Shenzhen markets to analyze company performance and make informed investment decisions.
Instructions
获取中国A股市场(上证、深证)的股票财务报告关键指标
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | 股票代码 |
Implementation Reference
- mcp_aktools/__init__.py:177-182 (handler)The handler function that implements the core logic of the 'stock_indicators_a' tool. It fetches financial abstract data for A-share stocks using akshare's stock_financial_abstract_ths, caches it, and returns the last 15 key indicators.def stock_indicators_a( symbol: str = field_symbol, ): dfs = ak_cache(ak.stock_financial_abstract_ths, symbol=symbol) keys = dfs.to_csv(index=False, float_format="%.3f").strip().split("\n") return "\n".join([keys[0], *keys[-15:]])
- mcp_aktools/__init__.py:173-176 (registration)The FastMCP decorator that registers the 'stock_indicators_a' tool with its title and description.@mcp.tool( title="A股关键指标", description="获取中国A股市场(上证、深证)的股票财务报告关键指标", )
- mcp_aktools/__init__.py:20-20 (schema)Pydantic Field defining the input schema for the 'symbol' parameter, used in the stock_indicators_a tool and others.field_symbol = Field(description="股票代码")