Maps Distance Matrix
maps_distance_matrix"Travel time matrix between [N] origins and [M] destinations" / "drive-time grid via Google Maps" / "transit times between addresses", NxM distance and duration matrix between many points via Google Maps. Modes: driving, walking, bicycling, transit. Use for delivery routing, multi-stop optimization, transit-heavy planning.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"_apiKey": "your-google_maps-api-key",
"origins": "New York|Los Angeles",
"destinations": "Chicago|Houston"
},
"name": "maps_distance_matrix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Travel mode: driving, walking, bicycling, transit | |
| _apiKey | Yes | Google Maps API key | |
| origins | Yes | Pipe-separated origins (e.g., "New York|Boston") | |
| destinations | Yes | Pipe-separated destinations (e.g., "Philadelphia|Washington DC") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Distance/duration for each origin-destination pair | |
| status | No | Status of the distance matrix request | |
| origin_addresses | No | Geocoded origin addresses | |
| destination_addresses | No | Geocoded destination addresses |