get_arrivals
Retrieve live arrival times at Swiss transport stations to check upcoming departures and plan journeys using real-time public transit data.
Instructions
Get live arrivals at a Swiss transport station
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| station | Yes | Station name | |
| limit | No | Number of arrivals (default: 10) | |
| datetime | No | DateTime YYYY-MM-DDTHH:MM (default: now) |
Implementation Reference
- src/modules/transport.ts:229-241 (handler)Handler logic for the "get_arrivals" tool in transport.ts.
case "get_arrivals": { const url = buildUrl(`${BASE}/stationboard`, { station: args.station as string, limit: args.limit as number, datetime: args.datetime as string, type: "arrival", }); const data = await fetchJSON<{ station: Station; stationboard: BoardEntry[] }>(url); return JSON.stringify({ station: data.station?.name, arrivals: data.stationboard.map(slimBoardEntry), }); } - src/modules/transport.ts:159-170 (schema)Schema definition for the "get_arrivals" tool.
name: "get_arrivals", description: "Get live arrivals at a Swiss transport station", inputSchema: { type: "object", required: ["station"], properties: { station: { type: "string", description: "Station name" }, limit: { type: "number", description: "Number of arrivals (default: 10)" }, datetime: { type: "string", description: "DateTime YYYY-MM-DDTHH:MM (default: now)" }, }, }, },