Find Routes Between Stops
find_routes_betweenLists the routes from one place to another: which stop to board, where to get off, the direction's destination, stops in between, and the walk at each end — best first, walking counted. Each end is a stop ID (from_stop_id) or coordinates (from_lat + from_lng), e.g. an address the user gave; a point covers every stop within a 600 m walk of it. options are direct routes. transfer_options have exactly one interchange (never more): ride legs[0], walk transfer_walk_meters (within a 300 m stop cluster, 0 when it is the same stop) to legs[1].board_stop, ride legs[1]. They are listed when there is no direct route or when they beat the best direct one. Every option carries schedule: by the timetable, when to leave, when each leg boards and alights, when you arrive, and total_minutes door to door. Plan for now by default, or pass depart_at or arrive_by ("HH:MM" Lviv time today, or ISO 8601). When planning for now, options also carry next_departures: the live next departures of the first leg from its boarding stop, so no separate get_stop_realtime call is needed. map_stops holds the best trip's stops in riding order, each with a role (board, transfer — or transfer_alight + transfer_board when the interchange is a walk — and alight). Use when the user asks how to get from A to B, which bus/tram goes from one place to another, how long it takes, or when to leave to be somewhere on time. A stop end covers every stop within a 300 m walk of it, since a line's two directions often stop on opposite sides of a street under different names; board_stop says where to actually wait. Routes the city has suspended, and stops a detour skips, are left out. walk_meters is set when the two ends are within a 300 m walk of each other: no ride is searched then, so tell the user to walk. Otherwise both lists empty means the trip needs two or more transfers. Get stop IDs with search_stops or get_stops_around_location.
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": "find_routes_between"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_lat | No | Decimal latitude of the destination, WGS84 (e.g. 49.842 for central Lviv). | |
| to_lng | No | Decimal longitude of the destination, WGS84 (e.g. 24.031 for central Lviv). | |
| from_lat | No | Decimal latitude of the start point, WGS84 (e.g. 49.842 for central Lviv). | |
| from_lng | No | Decimal longitude of the start point, WGS84 (e.g. 24.031 for central Lviv). | |
| arrive_by | No | Arrive by this time: "HH:MM" Lviv time today, or ISO 8601. Not together with `depart_at`. | |
| depart_at | No | Leave at this time: "HH:MM" Lviv time today, or ISO 8601. Default now. Not together with `arrive_by`. | |
| to_stop_id | No | Stop ID where the trip ends. Give this or `to_lat` + `to_lng`. | |
| from_stop_id | No | Stop ID where the trip starts. Give this or `from_lat` + `from_lng`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| view | Yes | ||
| ui_blocks | Yes |