get_replacement_traffic
Retrieve buses, coaches, or taxis replacing cancelled Swedish trains, with train numbers, status, accessibility, stops, times, delays, and traveller notes; filter by station, train, or date.
Instructions
Get replacement traffic (ersättningstrafik) for Swedish trains: the buses, coaches or taxis that run instead of cancelled trains, with the replaced train numbers, vehicle type, status (planned, ordered, confirmed, running, finished, canceled), wheelchair access, toilet, and every stop with stop description (where to board), planned/expected/actual times, delay in minutes and traveller notes. Filter by station (name or signature; the stop there is returned as atStation), by replaced train number, and/or by the replaced train's departure date; otherwise trips from minutesBack before now to hoursAhead after now. Operators report this voluntarily, so not every replacement is listed: use get_train_announcements to see which trains are cancelled and get_train_messages for the disruption behind them. Returns an error result (isError: true) if TRAFIKVERKET_API_KEY is missing/invalid or the Trafikverket API is unreachable. Coverage: Sweden only (Trafikverket data).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_replacement_traffic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Departure date (YYYY-MM-DD) of the replaced train. When set, the whole day is searched and minutesBack/hoursAhead are ignored | |
| limit | No | Maximum number of trips to return (1-50) | |
| station | No | Only trips stopping at this station: name (e.g. "Lund C", "Malmö") or location signature (e.g. "Lu") | |
| hoursAhead | No | Include trips departing up to this many hours after now (0.5-48, default 12) | |
| minutesBack | No | Include trips still running or departing up to this many minutes before now (0-240, default 30) | |
| trainNumber | No | Only trips replacing this advertised train number, e.g. "1043" |