search_stations
Find Swiss public transport stations using name searches or coordinate-based location queries to access transport information.
Instructions
Search for Swiss public transport stations/stops by name or coordinates
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Station name to search for | |
| x | No | Longitude (WGS84) | |
| y | No | Latitude (WGS84) | |
| type | No | Filter: all, station, poi, address |
Implementation Reference
- src/modules/transport.ts:191-200 (handler)Handler logic for search_stations, which calls the transport API and formats the result.
case "search_stations": { const url = buildUrl(`${BASE}/locations`, { query: args.query as string, x: args.x as number, y: args.y as number, type: args.type as string, }); const data = await fetchJSON<{ stations: Station[] }>(url); return JSON.stringify(data.stations.map(slimStation)); } - src/modules/transport.ts:116-128 (schema)Schema definition for search_stations including input parameters.
{ name: "search_stations", description: "Search for Swiss public transport stations/stops by name or coordinates", inputSchema: { type: "object", properties: { query: { type: "string", description: "Station name to search for" }, x: { type: "number", description: "Longitude (WGS84)" }, y: { type: "number", description: "Latitude (WGS84)" }, type: { type: "string", description: "Filter: all, station, poi, address" }, }, }, },