Plan journey
plan_journeyPlan journeys between two station IDs with departure/arrival times, transport filters, transfer limits, bike and step-free options. Use returned references to get later or earlier connections.
Instructions
Plan journeys between two stops/stations given as ids (use find_stations first). Returns up to results journeys, each a list of legs (walking or a vehicle) with times, line, platform and a tripId for get_trip (legs list no intermediate stops). For later or earlier journeys, call again with the same arguments, but with departure/arrival replaced by laterThan/earlierThan set to the returned laterRef/earlierRef. No ticket or price data. Times are ISO 8601 in each station's local time with its UTC offset; stops carry their IANA tz (none = German time). Delays in seconds (positive = late). Planned values equal to realtime ones and empty fields are omitted. Results: JSON, then "Hints:" (situational advice; attribution, credit once).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from": "<from>",
"to": "<to>"
},
"name": "plan_journey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Destination: Stop/station id from find_stations - not a name. | |
| via | No | Stop(s) the journey must pass through, in order: one id or a list of 2. Stop/station id from find_stations - not a name. For more, plan each section. | |
| bike | No | Only journeys on which every vehicle is confirmed to carry bikes; legs then show `bikesAllowed: true` (default false). Vehicles without bike data are left out (coverage is patchy, e.g. many regional and long-distance trains), so a missing connection does not mean bikes are not allowed. | |
| from | Yes | Origin: Stop/station id from find_stations - not a name. | |
| arrival | No | Arrive at or before this time, ISO 8601 with UTC offset, local to the destination. Use the UTC offset valid at the station's location on that date (Germany: +01:00 in winter, +02:00 in summer). | |
| results | No | Maximum number of journeys (1-10, default 5). | |
| products | No | Only journeys using these kinds of transport (default: all). Ids: `nationalExpress` (high-speed trains: ICE, TGV, Eurostar), `national` (other long-distance trains: IC/EC, FlixTrain, night trains), `regional` (regional trains: RE, RB, IRE), `suburban` (S-Bahn, RER), `subway` (U-Bahn, metro), `tram`, `bus` (local buses), `coach` (long-distance buses, e.g. FlixBus), `ferry`, `taxi` (on-demand services). For the Deutschlandticket (or other local/regional-transport tickets) pass ["regional", "suburban", "subway", "tram", "bus", "ferry"] (an approximation). Rail replacement buses are `bus` (often under the train's line name): a filter without `bus` drops them. | |
| departure | No | Depart at or after this time, ISO 8601 with UTC offset (e.g. 2026-11-14T08:00+01:00), local to the origin; default now. Use the UTC offset valid at the station's location on that date (Germany: +01:00 in winter, +02:00 in summer). | |
| laterThan | No | `laterRef` of a previous result: the next later journeys. | |
| wheelchair | No | Step-free routing of the walking parts (transfers, first/last mile; default false). Vehicles are not filtered: legs show `wheelchairAccessible: true` where the data confirms it. | |
| earlierThan | No | `earlierRef` of a previous result: earlier journeys. | |
| maxTransfers | No | Maximum number of changes between vehicles (0 = direct only; default unlimited). | |
| viaMinimumStay | No | Minimum stay at `via` in minutes, one value per via stop or one for all (requires `via`; default 0 = passing through is enough). | |
| minTransferTime | No | Minimum minutes per change, e.g. 10 for luggage or reduced mobility (default: the station's own transfer time). |