基于Model Context Protocol (MCP) 的智能股票数据助手 - An intelligent stock data assistant based on Model Context Protocol (MCP) that provides financial data queries through Tushare API
Smart Financial MCP is a STDIO-only server with 4 tools for stock market data queries via Tushare API. Core issues: (1) Tool names lack clarity, 'check_token_status' is reasonable but 'get_stock_basic_info', 'search_stocks', 'get_index_daily_price' are generic and do not indicate what data structure is returned or which Tushare API endpoint they wrap. (2) Descriptions are present but inconsistent in quality. 'check_token_status' has a 37-character description (below the 50-char minimum for clarity). 'get_index_daily_price' has a verbose 800+ character description with example index codes and return fields, which wastes tokens and includes example values (a documented anti-pattern). (3) Input schemas are defined but lack rigor: parameters have type and description, but several are optional without defaults or explanation of what happens when omitted. 'ts_code' is required for most tools but marked as optional string in schema. (4) Output schema is completely undocumented, tools return formatted strings with no machine-parseable structure, forcing LLMs to parse unstructured text. (5) No error recovery guidance, errors like 'Token无效或已过期' and 'Query failed' give no next steps. (6) No pagination support despite returning potentially large result sets. (7) All responses are plain text, not structured objects, this violates the pattern:response-shaper pattern.
检查Tushare token状态
获取指数日线行情数据 参数: ts_code: 指数代码(必选,如:399300.SZ 沪深300, 000001.SH 上证指数) trade_date: 交易日期(YYYYMMDD格式,如:20240801) start_date: 开始日期(YYYYMMDD格式,如:20240701) end_date: 结束日期(YYYYMMDD格式,如:20240731) 返回数据: - 交易日期 - 开盘点位、最高点位、最低点位、收盘点位 - 昨日收盘点位、涨跌点、涨跌幅 - 成交量(手)、成交额(千元) 指数代码示例: - 399300.SZ: 沪深300 - 000001.SH: 上证指数 - 399001.SZ: 深证成指 - 399107.SZ: 深证A指 - 399006.SZ: 创业板指 - 000300.SH: 沪深300 - 000016.SH: 上证50 - 000905.SH: 中证500 示例: - 查询单个指数:ts_code="399300.SZ", start_date="20240701", end_date="20240731" - 查询单日数据:ts_code="399300.SZ", trade_date="20240801" - 查询最新数据:ts_code="399300.SZ"
获取股票基本信息 参数: ts_code: 股票代码(如:000001.SZ) name: 股票名称(如:平安银行)
搜索股票 参数: keyword: 关键词(可以是股票代码的一部分或股票名称的一部分)
No structured output schema, all tools return unstructured plain-text strings instead of JSON objects. LLMs must parse freeform text, which is error-prone, wastes tokens, and prevents downstream tool chaining.
Verbose descriptions with example values. 'get_index_daily_price' description is 800+ characters and includes literal example codes (399300.SZ, 000001.SH) that LLMs may reuse instead of adapting to context. Description should be 50-200 chars with constraints and enums, not examples.
Parameters marked optional but no defaults or handling documented. 'ts_code' and 'name' in get_stock_basic_info are both optional strings, what happens if both are omitted? If neither, the tool calls Tushare stock_basic() with empty filters, which likely returns the entire universe of stocks. This is inefficient and dangerous.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 43 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 0 | - | v1 |
No error recovery guidance. Errors like 'Token无效或已过期: [exception text]' and '查询失败: [exception text]' provide no actionable next step for the LLM. Should include: (1) error category (retryable/user-fixable/fatal), (2) suggested recovery action.
No pagination support. Tools like 'get_stock_basic_info' and 'search_stocks' can return large lists (thousands of stocks). No limit or offset parameters, no page_size, no total_count. Results are truncated with no way to fetch remaining data.
Generic tool name 'get_index_daily_price' does not convey that it returns daily OHLC data (open, high, low, close) plus volume and turnover. Names like 'get_stock_basic_info' are ambiguous, what 'basic info' is returned? Area, industry, list date? The description clarifies, but the name alone should signal intent.
check_token_status is READ_ONLY but description is 37 chars ('检查Tushare token状态'), below the 50-char minimum. Chinese descriptions may compress, but this is still too terse. Should explain: what is a 'token', when should the agent call this, and what does 'normal status' mean (vs 'expired' or 'invalid')?
No tool-chaining support. If an agent searches stocks and wants to get detailed info, the search result is a plain-text string like '000001.SZ - 平安银行', not a structured object with ts_code. The agent must re-parse this to extract the code, extra cognitive load and error surface.