MCP server for querying Chinese railway (12306) train ticket information
Single tool 'search_tickets' has a valid JSON Schema with three required parameters (date, from_city, to_city), each with type and description. However, the tool description is only 12 characters ('搜索火车票信息' = 'Search train ticket info'), falling well below the 20-character minimum and providing no context on when to use it, what it returns, or prerequisites. Parameter descriptions are minimal (e.g., '日期,格式为 YYYY-MM-DD' = 'Date, format YYYY-MM-DD') but present. No output schema is documented. Error handling in the code (McpError with ErrorData) exists but is not surfaced in tool metadata. The tool does one thing (search), naming is appropriate, but definition quality is severely hampered by inadequate descriptions and missing output documentation.
搜索火车票信息
Tool description is only 12 characters; must be 20 - 1024 chars with context on WHAT, WHEN, and WHAT IT RETURNS. Current description '搜索火车票信息' provides no guidance on when to call this vs. alternatives or what fields are returned.
No output schema documented. LLMs cannot plan downstream calls or extract required fields (e.g., train_no, price, seat availability) without knowing the response structure. The code returns a TicketSearchResult with 'content: List[Dict]', but this is not exposed in tool metadata.
Parameter descriptions are minimal and lack format/constraint details. 'from_city' and 'to_city' accept free-form strings with no guidance on whether to use city names (e.g., '北京'), station codes (e.g., 'BJS'), or both. No enum or validation hints provided.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 34 | 2026-07-28+ | v2 |
Date parameter requires YYYY-MM-DD format but no validation or error guidance if LLM passes invalid format. No mention of date range constraints (e.g., must be within 60 days) or whether past dates are allowed.
Error handling exists in code (McpError, ErrorData) but is not declared in tool metadata. LLMs have no visibility into what errors can occur, whether they are retryable, or what recovery steps are available.