12306-mcp-plus
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
该服务主要用于帮助用户查询12306的车票信息、特定列车的经停站信息以及相关的车站信息。请仔细理解用户的意图,并按以下指引选择合适的接口:
原则:
必要时追问:如果用户信息不足以调用接口,请向用户追问缺失的信息。
尽量精确需求:尽量利用筛选功能筛选用户需要的车票信息,从而简短上下文长度。
请根据上述指引选择接口。
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get-current-dateA | 获取当前日期,以上海时区(Asia/Shanghai, UTC+8)为准,返回格式为 "yyyy-MM-dd"。主要用于解析用户提到的相对日期(如“明天”、“下周三”),提供准确的日期输入。 |
| get-stations-code-in-cityB | 通过中文城市名查询该城市 所有 火车站的名称及其对应的 |
| get-station-code-of-citysB | 通过中文城市名查询代表该城市的 |
| get-station-code-by-namesA | 通过具体的中文车站名查询其 |
| get-station-by-telecodeA | 通过车站的 |
| get-ticketsB | 查询12306余票信息。 |
| get-interline-ticketsB | 查询12306中转余票信息。尚且只支持查询前十条。 |
| get-train-route-stationsA | 查询特定列车车次在指定区间内的途径车站、到站时间、出发时间及停留时间等详细经停信息。当用户询问某趟具体列车的经停站时使用此接口。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| stations |
TDQS
Scored across 8 tools
The four station-lookup tools have overlapping intent: `get-stations-code-in-city` (all stations in a city) and `get-station-code-of-citys` (representative station_code for a city) sound nearly identical and an agent could easily pick the wrong one. Descriptions do differentiate them once read carefully, and `get-station-by-telecode` is explicitly marked as rare/debug, but the boundaries are not immediately clear from the names.
All tools use a consistent kebab-case `get-*` prefix with a noun phrase, which is predictable. Minor blemishes: inconsistent pluralization (`get-stations-code-in-city` vs `get-station-code-of-citys`) and the grammatically odd `citys`.
Eight tools is a well-scoped set for a 12306 ticket-query server, falling squarely in the healthy 3-15 range. Each tool maps to a distinct step in the workflow: date resolution, station resolution, ticket search, transfer search, and route lookup.
The core query workflow (resolve relative date → resolve city/station codes → query remaining tickets → check transfers → inspect train stops) is fully covered for a read-only booking-domain server. Minor gaps exist: no seat price/seat-type detail endpoint, no train-number/type lookup beyond route stations, and station resolution is redundantly covered by four tools while train metadata is thin; booking is presumably out of scope.