Plan a journey
plan_journeyPlans bus and metro journeys between two places in one city network. Returns the first journey leaving at or after the departure time as numbered steps with boarding stops, changes, walking, times and fare, a link that opens it in PakBus, and up to two later departures on one line. When the first bus has live positions and the journey leaves within the hour, it also says when the next one reaches the boarding stop. Apps that show interactive views also get a map of the journey.
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": {
"city": "<city>",
"from": "<from>",
"to": "<to>"
},
"name": "plan_journey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | place_id of the destination, from find_places. | |
| city | Yes | City network from find_places or list_cities, such as Lahore, Attock or Rawalpindi. | |
| from | Yes | place_id of the start, from find_places. | |
| depart | No | Departure date and time in Pakistan local time, as YYYY-MM-DDTHH:MM. Leave out to leave now. Search again with a later time for later journeys. | |
| max_changes | No | Most changes between buses, 0 for direct journeys only. Defaults to 2. When none are found within the limit, journeys with up to 5 changes are returned. |