Skip to main content
Glama
drfccv

12306 MCP Server

by drfccv

get-train-no-by-train-code

Convert train codes (including three-letter codes or full names) to official train numbers for China railway queries. Use this tool before checking train schedules or stops.

Instructions

车次号转官方唯一编号(train_no),支持三字码/全名。常用于经停站查询前置转换。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
train_codeYes车次号
from_stationYes出发站
to_stationYes到达站
train_dateYes出发日期,格式:YYYY-MM-DD
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool supports conversion for three-character codes and full names, which adds some context beyond the schema. However, it lacks critical behavioral details such as error handling (e.g., what happens with invalid codes), response format, or any rate limits or authentication needs for a conversion tool.

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

Conciseness5/5

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

The description is highly concise and front-loaded, consisting of two sentences that efficiently convey the core purpose and usage context without any wasted words. Every sentence earns its place by adding value beyond the tool name.

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

Completeness2/5

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

Given the tool has 4 required parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., the structure of train_no), error conditions, or prerequisites for successful conversion. For a conversion tool with no structured output documentation, this leaves significant gaps for an AI agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all four parameters (train_code, from_station, to_station, train_date) with descriptions. The description adds marginal value by implying that train_code can be a three-character code or full name, but doesn't provide additional semantics like examples or constraints beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/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: converting train codes to official train numbers (train_no), specifying it supports both three-character codes and full names. It distinguishes this as a 'pre-conversion' step for station queries, which helps differentiate it from direct query tools. However, it doesn't explicitly contrast with all sibling tools like get-train-route-stations.

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

Usage Guidelines3/5

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

The description provides implied usage context by mentioning this is 'commonly used as a pre-conversion step for station stop queries,' which suggests when to use it (before querying stations). However, it doesn't explicitly state when NOT to use it or name specific alternatives among sibling tools like get-train-route-stations or query-tickets.

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