This record as markdown: /tools/deniselewis200081-rail/get-tickets.md
What get-tickets does on 12306 Ticket Search Server
AI agents call get-tickets to retrieve information from 12306 Ticket Search Server without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | — | 查询日期,格式为 "yyyy-MM-dd"。如果用户提供的是相对日期(如“明天”),请务必先调用 `get-current-date` 接口获取当前日期,并计算出目标日期。 |
sortFlag | string | — | 排序方式,默认为空,即不排序。仅支持单一标识。可选标志:[startTime(出发时间从早到晚), arriveTime(抵达时间从早到晚), duration(历时从短到长)] |
toStation | string | — | 到达地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。 |
limitedNum | number | — | 返回的余票数量限制,默认为0,即不限制。 |
fromStation | string | — | 出发地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。 |
sortReverse | boolean | — | 是否逆向排序结果,默认为false。仅在设置了sortFlag时生效。 |
trainFilterFlags | string | — | 车次筛选条件,默认为空,即不筛选。支持多个标志同时筛选。例如用户说“高铁票”,则应使用 "G"。可选标志:[G(高铁/城际),D(动车),Z(直达特快),T(特快),K(快速),O(其他),F(复兴号),S(智能动车组)] |
Parameters from the server's own tool schema.
Why get-tickets is rated Low
The tool performs a simple data retrieval operation—querying train ticket availability from the 12306 system. It has no side effects, does not modify data, and does not execute code or trigger financial transactions. This is a straightforward Read category tool with low severity due to the benign nature of accessing public ticket information.
From the tool's definition Tool name is 'get-tickets' and description states '查询12306余票信息' (query 12306 ticket availability information). This is a read-only query operation that retrieves ticket information without modifying, deleting, or executing external operations.
Attacks that exploit this kind of access
The rule that runs get-tickets safely
PolicyLayer is an MCP gateway: it sits between your AI agents and 12306 Ticket Search Server, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For get-tickets, this is the rule to start with:
get-tickets is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect 12306 Ticket Search Server, apply this rule, and every get-tickets call is checked against it from then on.
Questions about get-tickets
查询12306余票信息。. It is categorised as a Read tool in the 12306 Ticket Search Server MCP Server, which means it retrieves data without modifying state.
get-tickets accepts 7 parameters: date, sortFlag, toStation, limitedNum, fromStation, sortReverse, trainFilterFlags. The full parameter table on this page comes from the server's own tool schema.
Register the 12306 Ticket Search Server MCP server in PolicyLayer and add a rule for get-tickets: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches 12306 Ticket Search Server. Nothing to install.
get-tickets is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get-tickets rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for get-tickets. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
get-tickets is provided by the 12306 Ticket Search Server MCP server (DeniseLewis200081/rail). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on 12306 Ticket Search Server, and thousands of servers like it.
This server
Across the catalogue