Skip to main content
Glama

Engine Heart

train.query_train_tickets

查询中国大陆12306火车票余票信息。参数from_city出发城市/车站中文名,to_city到达城市/车站中文名,date出发日期格式YYYY-MM-DD;留空默认明天。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from_city": "<from_city>",
      "to_city": "<to_city>"
    },
    "name": "train.query_train_tickets"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNo出发日期,格式 YYYY-MM-DD;留空默认明天
to_cityYes到达城市或车站中文名,如 "北京"、"上海虹桥"
from_cityYes出发城市或车站中文名,如 "青岛"、"北京南"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. It adds the useful default-date behavior and the 12306/mainland-China data scope, but says nothing about whether the call is read-only, latency, rate limits, or what an empty result means. For a live external-data query with zero annotation coverage, that is a meaningful gap.

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?

One compact sentence with the purpose front-loaded and the parameters enumerated after it; nothing is wasted. It loses a point only because the parameter recap is largely redundant against a fully documented schema.

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

Completeness3/5

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

There is no output schema, so the description should indicate the shape of the response (train numbers, seat classes, remaining counts), and it does not. The essentials for making the call are present, but the agent cannot anticipate what it will receive or how to interpret an empty result.

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 baseline is 3. The description restates the same three parameters and the same YYYY-MM-DD format and tomorrow-default already declared in the schema, adding no new semantics such as accepted aliases or city-vs-station matching rules.

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 states a specific verb and resource: query remaining 12306 train tickets within mainland China, plus the two required inputs (from/to city). It is clearly distinguishable from data-only siblings such as train.search_station, but it never explicitly says it is not the station-lookup tool.

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?

Usage is implied by the ticket-availability framing and the note that an empty date defaults to tomorrow, which tells the agent the query can be made without a date. There is no explicit when-to-use versus when-not guidance and no named alternative for station-name resolution, so the agent must infer that boundary.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources