12306 MCP Server
Server Quality Checklist
Latest release: v0.3.0
- Disambiguation5/5
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.
Naming Consistency5/5All 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.
Tool Count5/5With 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.
Completeness4/5The 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.
Average 3.7/5 across 7 of 7 tools scored. Lowest: 2.9/5.
See the Tool Scores section below for per-tool breakdowns.
- 4 of 5 community issues answered or closed in the last 6 months
- 7 commits in the last 12 weeks
- No stable releases found
- No critical vulnerability alerts
- No high-severity vulnerability alerts
- No code scanning findings
- CI status not available
This repository is licensed under MIT License.
This repository includes a README.md file.
No tool usage detected in the last 30 days. Usage tracking helps demonstrate server value.
Tip: use the "Try in Browser" feature on the server page to seed initial usage.
Add a glama.json file to provide metadata about your server.
If you are the author, simply .
If the server belongs to an organization, first add
glama.jsonto the root of your repository:{ "$schema": "https://glama.ai/mcp/schemas/server.json", "maintainers": [ "your-github-username" ] }Then . Browse examples.
Add related servers to improve discoverability.
How to sync the server with GitHub?
Servers are automatically synced at least once per day, but you can also sync manually at any time to instantly update the server profile.
To manually sync the server, click the "Sync Server" button in the MCP server admin interface.
How is the quality score calculated?
The overall quality score combines two components: Tool Definition Quality (70%) and Server Coherence (30%).
Tool Definition Quality measures how well each tool describes itself to AI agents. Every tool is scored 1–5 across six dimensions: Purpose Clarity (25%), Usage Guidelines (20%), Behavioral Transparency (20%), Parameter Semantics (15%), Conciseness & Structure (10%), and Contextual Completeness (10%). The server-level definition quality score is calculated as 60% mean TDQS + 40% minimum TDQS, so a single poorly described tool pulls the score down.
Server Coherence evaluates how well the tools work together as a set, scoring four dimensions equally: Disambiguation (can agents tell tools apart?), Naming Consistency, Tool Count Appropriateness, and Completeness (are there gaps in the tool surface?).
Tiers are derived from the overall score: A (≥3.5), B (≥3.0), C (≥2.0), D (≥1.0), F (<1.0). B and above is considered passing.
Tool Scores
- Behavior2/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool returns '当前日期、时间,以及常用的相对日期' (current date, time, and commonly used relative dates), which gives some output context. However, it lacks details on rate limits, error conditions, authentication needs, or whether the operation is read-only (implied but not stated). For a tool with zero annotation coverage, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness4/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded, stating the core purpose in the first clause. The second clause adds useful context about relative date calculation. There's no wasted language, though it could be slightly more structured (e.g., separating core functionality from additional features).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness3/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 optional parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and hints at output content, but lacks details on return format, error handling, or examples. Without annotations or output schema, more completeness would be beneficial, especially for behavioral aspects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no specific parameter semantics beyond what the input schema provides. The schema has 100% description coverage with clear explanations for both parameters ('timezone' and 'format'), including defaults. The description's mention of '相对日期计算' (relative date calculation) might relate to parameters but doesn't clarify how. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose4/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '获取当前日期和时间信息' (get current date and time information). It specifies the verb ('获取') and resource ('当前日期和时间信息'), and mentions additional functionality ('支持相对日期计算' - supports relative date calculation). However, it doesn't explicitly differentiate from sibling tools, which are all train-related, making the distinction obvious but not stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines2/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, constraints, or scenarios where this tool is preferred over other time/date tools (though none exist among the siblings). The phrase '支持相对日期计算' (supports relative date calculation) hints at a use case but doesn't provide explicit when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- 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/5Is 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/5Given 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/5Does 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/5Does 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/5Does 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.
- 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. It describes the query behavior and return data, but lacks details on permissions, rate limits, error handling, or data freshness. For a read operation with no annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded and concise with two sentences that efficiently convey purpose, inputs, and outputs. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness3/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and 100% schema coverage, the description adequately covers the query purpose but lacks behavioral context and output details. It is minimally viable but incomplete for a tool with four required parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does 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. The description adds minimal value by mentioning '车次号或官方编号' which aligns with train_no, but does not provide additional context beyond what the schema specifies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('查询', '返回') and resources ('列车经停站全表', '所有经停站、到发时刻、停留时间'). It distinguishes itself from siblings by focusing on route station details rather than time, pricing, tickets, transfers, or station searches.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines3/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by specifying inputs ('车次号或官方编号') and outputs, but does not explicitly state when to use this tool versus alternatives like query-tickets or query-transfer. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior3/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the search functionality and input types, but lacks details about response format, error handling, performance characteristics, or any limitations beyond the query examples. The description doesn't contradict any annotations (none exist), but could provide more complete behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences: the first establishes the core functionality and supported input types, the second provides concrete usage examples. Every element serves a purpose with no wasted words, making it easy to parse while conveying essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness3/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with no annotations and no output schema, the description provides adequate but incomplete context. It covers the purpose and usage well, but lacks information about what the search returns (station details, codes, locations?), how results are ordered, or any limitations beyond the parameter constraints. Given the tool's relative simplicity and good schema coverage, this is minimally adequate but could be more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already fully documents both parameters. The description mentions the types of queries supported (Chinese name, pinyin, abbreviation, code) which aligns with the schema's description of the query parameter, but doesn't add significant semantic value beyond what the structured schema provides. The baseline of 3 is appropriate given the comprehensive schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose4/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as '智能车站搜索' (intelligent station search) and specifies the types of inputs it supports (Chinese name, pinyin, abbreviation, three-letter code). It distinguishes itself from siblings by focusing on station search rather than train or ticket operations. However, it doesn't explicitly contrast with specific sibling tools like 'get-train-route-stations' which might also involve station data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines4/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context with examples for both fuzzy search (e.g., '北京') and exact code lookup (e.g., 'BJP'), helping users understand when to apply different query strategies. It implicitly suggests this tool is for station information retrieval, but doesn't explicitly state when to use alternatives like 'query-tickets' or 'get-train-route-stations' for related but different purposes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior3/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It usefully describes that the tool '自动分页抓取全部中转方案' (automatically paginates and fetches all transfer solutions), which adds important behavioral context about pagination and completeness. However, it doesn't mention potential limitations like rate limits, authentication requirements, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise - a single sentence that front-loads the core purpose and efficiently lists key parameters and behavioral characteristics. Every word earns its place with no redundancy or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness3/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a query tool with 6 parameters, 100% schema coverage, but no annotations and no output schema, the description provides adequate but minimal context. It covers the core purpose and key behavioral trait (automatic pagination), but doesn't address what the output looks like, potential error cases, or system limitations that would be helpful for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the input schema already documents all 6 parameters thoroughly. The description adds minimal value beyond the schema - it mentions the three required parameters (出发站, 到达站, 日期) and the optional filters (中转站/无座/学生票), but doesn't provide additional semantic context about parameter interactions or usage nuances.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('查询' - query, '抓取' - fetch) and resources ('中转换乘方案' - transfer solutions). It distinguishes itself from sibling tools like 'query-tickets' (direct tickets) and 'query-ticket-price' (price queries) by focusing specifically on transfer/connection solutions between stations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines4/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: when users need transfer solutions between stations with optional filters. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools (e.g., use 'query-tickets' for direct tickets without transfers).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior4/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses important behavioral traits: the tool returns fare details for all relevant stations when given a city name, prioritizes matching stations when specified but includes alternatives with better options, and warns against overly strict filtering. However, it doesn't mention rate limits, authentication needs, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness4/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear purpose statement followed by detailed usage guidelines. Every sentence adds value, though the guidelines section is somewhat lengthy. It's front-loaded with the core functionality, making it easy to understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness4/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 parameters, no annotations, and no output schema, the description does a good job explaining the tool's behavior and usage. It covers input interpretation, filtering logic, and result handling. However, it doesn't describe the output format (what '票价详情' includes) or potential error cases, leaving some gaps for a tool with this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters4/5Does 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 meaningful context beyond the schema: it explains how 'from_station' and 'to_station' parameters should be interpreted (city vs. station names), mentions the optional 'train_code' filtering capability, and implies how results are structured. This provides valuable semantic guidance not captured in the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '查询火车票价信息' (query train ticket price information) with specific inputs (departure station, arrival station, date) and outputs (fare details for each train). It distinguishes from siblings like 'query-tickets' (likely broader ticket search) and 'query-transfer' (transfer options) by focusing specifically on pricing details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines5/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidelines in the '智能筛选指南' section, detailing when to use different filtering approaches based on user input (city name vs. specific station). It also mentions supporting train code filtering, which helps differentiate from other tools like 'query-tickets' that might not have this feature.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- 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/5Is 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/5Given 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/5Does 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/5Does 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/5Does 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.
GitHub Badge
Glama performs regular codebase and documentation scans to:
- Confirm that the MCP server is working as expected.
- Confirm that there are no obvious security issues.
- Evaluate tool definition quality.
Our badge communicates server capabilities, safety, and installation instructions.
Card Badge
Copy to your README.md:
Score Badge
Copy to your README.md:
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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