# get-tickets

查询12306余票信息。

Agent View of the PolicyLayer registry record for `get-tickets`. HTML page: https://policylayer.com/tools/deniselewis200081-rail/get-tickets

## Facts

- Tool: `get-tickets`
- Server: 12306 Ticket Search Server (`DeniseLewis200081/rail`) — https://policylayer.com/tools/deniselewis200081-rail.md
- Homepage: https://github.com/DeniseLewis200081/rail
- Risk category: Read (Low risk)
- Registry record: grade A, identity unverified
- Server rate-limited: no
- Parameters: 7
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `date` | string | no | 查询日期，格式为 "yyyy-MM-dd"。如果用户提供的是相对日期（如“明天”），请务必先调用 `get-current-date` 接口获取当前日期，并计算出目标日期。 |
| `sortFlag` | string | no | 排序方式，默认为空，即不排序。仅支持单一标识。可选标志：[startTime(出发时间从早到晚), arriveTime(抵达时间从早到晚), duration(历时从短到长)] |
| `toStation` | string | no | 到达地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码，严禁直接使用中文地名。 |
| `limitedNum` | number | no | 返回的余票数量限制，默认为0，即不限制。 |
| `fromStation` | string | no | 出发地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码，严禁直接使用中文地名。 |
| `sortReverse` | boolean | no | 是否逆向排序结果，默认为false。仅在设置了sortFlag时生效。 |
| `trainFilterFlags` | string | no | 车次筛选条件，默认为空，即不筛选。支持多个标志同时筛选。例如用户说“高铁票”，则应使用 "G"。可选标志：[G(高铁/城际),D(动车),Z(直达特快),T(特快),K(快速),O(其他),F(复兴号),S(智能动车组)] |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get-tickets",
    "arguments": {}
  }
}
```

## 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 own 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."

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches 12306 Ticket Search Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "get-tickets": {}
  }
}
```

## Other tools on 12306 Ticket Search Server (7)

- `get-current-date` — Read — https://policylayer.com/tools/deniselewis200081-rail/get-current-date.md
- `get-interline-tickets` — Read — https://policylayer.com/tools/deniselewis200081-rail/get-interline-tickets.md
- `get-station-by-telecode` — Read — https://policylayer.com/tools/deniselewis200081-rail/get-station-by-telecode.md
- `get-station-code-by-names` — Read — https://policylayer.com/tools/deniselewis200081-rail/get-station-code-by-names.md
- `get-station-code-of-citys` — Read — https://policylayer.com/tools/deniselewis200081-rail/get-station-code-of-citys.md
- `get-stations-code-in-city` — Read — https://policylayer.com/tools/deniselewis200081-rail/get-stations-code-in-city.md
- `get-train-route-stations` — Read — https://policylayer.com/tools/deniselewis200081-rail/get-train-route-stations.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=deniselewis200081-rail · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/deniselewis200081-rail
