Skip to main content
Glama
12306-mcp-plus

12306-mcp-plus

by cxxonly918

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

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

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get-current-dateA

获取当前日期,以上海时区(Asia/Shanghai, UTC+8)为准,返回格式为 "yyyy-MM-dd"。主要用于解析用户提到的相对日期(如“明天”、“下周三”),提供准确的日期输入。

get-stations-code-in-cityB

通过中文城市名查询该城市 所有 火车站的名称及其对应的 station_code,结果是一个包含多个车站信息的列表。

get-station-code-of-citysB

通过中文城市名查询代表该城市的 station_code。

get-station-code-by-namesA

通过具体的中文车站名查询其 station_code 和车站名。

get-station-by-telecodeA

通过车站的 station_telecode 查询车站的详细信息,包括名称、拼音、所属城市等。此接口主要用于在已知 telecode 的情况下获取更完整的车站数据,或用于特殊查询及调试目的。一般用户对话流程中较少直接触发。

get-ticketsB

查询12306余票信息。

get-interline-ticketsB

查询12306中转余票信息。尚且只支持查询前十条。

get-train-route-stationsA

查询特定列车车次在指定区间内的途径车站、到站时间、出发时间及停留时间等详细经停信息。当用户询问某趟具体列车的经停站时使用此接口。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
stations

TDQS

A3.6/5.0

Scored across 8 tools

Disambiguation3/5

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.

Naming Consistency4/5

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`.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues