get_railway_events
Retrieve railway events from Trafikverket—including faults, failures, and disruptions—and filter by station, status, or operative event ID to inspect affected sections and event timing.
Instructions
Get railway events from Trafikverket: faults, failures and disruptions in the railway as registered in Trafikverket's event system (Basun), including ones that never became a public traffic message. Each event has an id, status (Swedish: "Ingen" = only cause-coded, "MöjligOperativHändelse", "BedömdEjOperativHändelse", "OperativHändelse"), reason code, start/end time, the affected sections (from/via/to and intermediate stations) and, when it has one, the id of the related operative event (the eventId returned by get_train_messages). Filter by station (name or signature), status or operative event id. Use get_train_messages for the public disruption text instead. fetchedAt is when this server got the response from Trafikverket; the result does not refresh afterwards, so call the tool again if fetchedAt is old. lastUpdated is when Trafikverket last changed the record: an old value does not necessarily mean stale data, and it does not confirm that the data is still current. 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_railway_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of events to return (1-100) | |
| status | No | Optional event status filter: "Ingen" (only cause-coded), "MöjligOperativHändelse" (possible operative event), "BedömdEjOperativHändelse" (assessed as not operative) or "OperativHändelse" (operative event) | |
| station | No | Optional station name (e.g. "Hässleholm C") or location signature (e.g. "Hm"); only events whose sections start, end, pass via or include this location are returned | |
| activeOnly | No | Only include events that have not ended yet (no end time, or an end time in the future; default true) | |
| operativeEventId | No | Optional id of an operative event (the eventId from get_train_messages) to list its railway events |