Skip to main content
Glama

12306-mcp

get-interline-tickets

Retrieve interline ticket availability on 12306 for specified dates and stations, filtering results by train type, sorting options, and optional middle station codes. Limited to top 10 results.

Instructions

查询12306中转余票信息。尚且只支持查询前十条。

Input Schema

NameRequiredDescriptionDefault
dateYes查询日期,格式为 "yyyy-MM-dd"。如果用户提供的是相对日期(如“明天”),请务必先调用 `get-current-date` 接口获取当前日期,并计算出目标日期。
fromStationYes出发地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。
limitedNumNo返回的中转余票数量限制,默认为10。
middleStationNo中转地的 `station_code` ,可选。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。
showWZNo是否显示无座车,默认不显示无座车。
sortFlagNo排序方式,默认为空,即不排序。仅支持单一标识。可选标志:[startTime(出发时间从早到晚), arriveTime(抵达时间从早到晚), duration(历时从短到长)]
sortReverseNo是否逆向排序结果,默认为false。仅在设置了sortFlag时生效。
toStationYes出发地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。
trainFilterFlagsNo车次筛选条件,默认为空。从以下标志中选取多个条件组合[G(高铁/城际),D(动车),Z(直达特快),T(特快),K(快速),O(其他),F(复兴号),S(智能动车组)]

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "date": { "description": "查询日期,格式为 \"yyyy-MM-dd\"。如果用户提供的是相对日期(如“明天”),请务必先调用 `get-current-date` 接口获取当前日期,并计算出目标日期。", "maxLength": 10, "minLength": 10, "type": "string" }, "fromStation": { "description": "出发地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。", "type": "string" }, "limitedNum": { "default": 10, "description": "返回的中转余票数量限制,默认为10。", "minimum": 1, "type": "number" }, "middleStation": { "default": "", "description": "中转地的 `station_code` ,可选。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。", "type": "string" }, "showWZ": { "default": false, "description": "是否显示无座车,默认不显示无座车。", "type": "boolean" }, "sortFlag": { "default": "", "description": "排序方式,默认为空,即不排序。仅支持单一标识。可选标志:[startTime(出发时间从早到晚), arriveTime(抵达时间从早到晚), duration(历时从短到长)]", "type": "string" }, "sortReverse": { "default": false, "description": "是否逆向排序结果,默认为false。仅在设置了sortFlag时生效。", "type": "boolean" }, "toStation": { "description": "出发地的 `station_code` 。必须是通过 `get-station-code-by-names` 或 `get-station-code-of-citys` 接口查询得到的编码,严禁直接使用中文地名。", "type": "string" }, "trainFilterFlags": { "default": "", "description": "车次筛选条件,默认为空。从以下标志中选取多个条件组合[G(高铁/城际),D(动车),Z(直达特快),T(特快),K(快速),O(其他),F(复兴号),S(智能动车组)]", "maxLength": 8, "pattern": "^[GDZTKOFS]*$", "type": "string" } }, "required": [ "date", "fromStation", "toStation" ], "type": "object" }

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/Joooook/12306-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server