Skip to main content
Glama
drfccv

12306 MCP Server

by drfccv

query-tickets

Search for available train tickets in China by entering departure station, arrival station, and travel date to view schedules, seat availability, and journey details.

Instructions

官方12306余票/车次/座席/时刻一站式查询。输入出发站、到达站、日期,返回所有可购车次、时刻、历时、各席别余票等详细信息。支持中文名、三字码。

【智能筛选指南】返回结果通常包含出发/到达城市的所有相关车站(如北京/北京西/北京南)。请根据用户输入语境灵活处理:

  1. 用户仅输入城市名(如'九江'):请展示所有相关站点的车次,不要过滤。

  2. 用户指定具体车站(如'九江站'):优先展示匹配车站的车次,但若其他同城车站有更优方案(如时间更短、有票),也应作为补充选项提供。 请避免机械地仅通过字符串匹配过滤车次,以免遗漏用户可能感兴趣的出行方案。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_stationYes出发车站名称
to_stationYes到达车站名称
train_dateYes出发日期,格式:YYYY-MM-DD
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it returns '所有可购车次、时刻、历时、各席别余票等详细信息' (all purchasable train numbers, schedules, durations, seat availability details), supports Chinese names and three-letter codes, and explains how results are filtered based on station specificity. However, it doesn't mention rate limits, authentication needs, or error handling, leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a detailed usage guide. Every sentence earns its place by adding critical context, though it could be slightly more concise by integrating the filtering guidelines more tightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters with full schema coverage, no annotations, and no output schema, the description does well by explaining the return format ('返回所有可购车次、时刻、历时、各席别余票等详细信息') and usage nuances. However, it lacks details on output structure (e.g., pagination, error responses), which would be helpful since there's no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds significant value by explaining parameter semantics beyond the schema: it clarifies that inputs can be '中文名、三字码' (Chinese names, three-letter codes) and provides context on how station names are interpreted (city vs. specific station), which isn't in the schema. This elevates the score above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '官方12306余票/车次/座席/时刻一站式查询' (official 12306 ticket availability/train numbers/seats/schedule one-stop query). It specifies the exact resource (train tickets) and verb (query), and distinguishes it from siblings like query-ticket-price (price only) and query-transfer (transfer options).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool vs. alternatives through the '智能筛选指南' (intelligent filtering guide). It details how to handle different input scenarios (city names vs. specific stations) and advises against mechanical filtering, which implicitly suggests this is the primary tool for comprehensive train schedule and availability queries rather than more specialized siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/drfccv/mcp-server-12306'

If you have feedback or need assistance with the MCP directory API, please join our Discord server