Maps Compute Route Matrix
maps_compute_route_matrixComputes travel duration and distance for every origin–destination pair (up to 25) by driving, walking, or cycling, returning matrix elements for route planning and comparisons.
Instructions
Duration and distance for every origin x destination pair, at most 25 pairs; each pair is one Google request (Routes API computeRouteMatrix element shape): {travelMode, elements: [{originIndex, destinationIndex, status, condition, distanceMeters, duration, staticDuration, localizedValues}]}. Identical origin and destination cost nothing.
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": {
"origins": "<origins>",
"destinations": "<destinations>"
},
"name": "maps_compute_route_matrix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origins | Yes | ||
| travelMode | No | DRIVE (default), WALK or BICYCLE | DRIVE |
| destinations | Yes | ||
| departureTime | No | Local wall-clock time at the stop, e.g. 2026-10-22T08:30 (no offset) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||