12306 MCP Server
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.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query-ticketsA | 官方12306余票/车次/座席/时刻一站式查询。输入出发站、到达站、日期,返回所有可购车次、时刻、历时、各席别余票等详细信息。支持中文名、三字码。 【智能筛选指南】返回结果通常包含出发/到达城市的所有相关车站(如北京/北京西/北京南)。请根据用户输入语境灵活处理:
|
| query-ticket-priceA | 查询火车票价信息。输入出发站、到达站、日期,返回各车次的票价详情。支持指定车次号过滤。 【智能筛选指南】返回结果通常包含出发/到达城市的所有相关车站(如北京/北京西/北京南)。请根据用户输入语境灵活处理:
|
| search-stationsA | 智能车站搜索。支持中文名、拼音、简拼、三字码(Code)。可用于模糊搜索(如“北京”),也可用于精确获取车站代码(如输入“BJP”返回北京站信息)。 |
| query-transferA | 官方中转换乘方案查询。输入出发站、到达站、日期,可选中转站/无座/学生票,自动分页抓取全部中转方案。 |
| get-train-route-stationsA | 列车经停站全表查询。支持输入车次号或官方编号,返回所有经停站、到发时刻、停留时间。 |
| get-train-no-by-train-codeB | 车次号转官方唯一编号(train_no),支持三字码/全名。常用于经停站查询前置转换。 |
| get-current-timeC | 获取当前日期和时间信息,支持相对日期计算。返回当前日期、时间,以及常用的相对日期。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose with no overlap: get-current-time provides time/date info, get-train-no-by-train-code converts train codes, get-train-route-stations shows station stops, query-ticket-price gives pricing, query-tickets shows availability, query-transfer finds connections, and search-stations locates stations. The descriptions clearly differentiate their functions.
All tools follow a consistent verb_noun or verb-noun-noun pattern using snake_case (e.g., get-current-time, query-ticket-price, search-stations). There are no deviations in naming style, making the set predictable and readable.
With 7 tools, this server is well-scoped for a 12306 train service domain. Each tool serves a specific, non-redundant function, covering core operations like time lookup, code conversion, station search, route details, pricing, ticket availability, and transfers, which is appropriate for this use case.
The tool set provides comprehensive coverage for querying train information, including time, routes, prices, tickets, transfers, and stations. Minor gaps might include operations like booking tickets or managing user accounts, but these are likely outside the server's intended query-focused scope, and agents can work effectively with the provided tools.