google-maps__compute_routes
Computes travel routes between an origin and a destination, optionally through intermediate stops. Returns the distance and duration for each route.
Input Requirements (CRITICAL):
originanddestination(objects - MANDATORY): Each must be provided using exactly one of:address(string, e.g.,'Eiffel Tower, Paris'). Named places, landmarks, and businesses are resolved directly, so do NOT callsearch_placesfirst just to geocode a waypoint. Include any city, reg
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": {
"origin": "<origin>",
"destination": "<destination>"
},
"name": "google-maps__compute_routes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | Required. Origin waypoint. | |
| travelMode | No | Optional. Specifies the mode of transportation. | |
| arrivalTime | No | Optional. Indicates that the route should be computed based on arrival time. Only one of this field or departureTime should be set. | |
| destination | Yes | Required. Destination waypoint. | |
| locationBias | No | Optional. A location to bias the search results toward, for example to disambiguate waypoint text queries. | |
| departureTime | No | Optional. Indicates that the route should be computed based on departure time. Only one of this field or arrivalTime should be set. | |
| includePolyline | No | Optional. Whether to include the encoded polyline in the response routes. Defaults to `false`. When set to `true`, `Route.encoded_polyline` is returned. | |
| routingPreference | No | Optional. Determines how traffic data is used to compute the route. `ROUTING_PREFERENCE_TRAFFIC_AWARE_OPTIMAL` is not supported when `travel_mode` is `WALK` or `BICYCLE`. For `TRANSIT`, it enables realtime transit data, such as delays and cancellations. | |
| intermediateWaypoints | No | Optional. Intermediate stops between the origin and destination to pass through in order. Up to 25 intermediate waypoints are supported. Specifying more than 10 intermediate waypoints will incur higher cost and higher latency. Intermediate waypoints are not supported when `travel_mode` is `TRANSIT`. | |
| computeAlternativeRoutes | No | Optional. Whether to compute alternative routes in addition to the recommended route. Defaults to false, in which case only the recommended route is returned. When set to true, up to all available routes are returned, though alternatives may not be available for every request. |