HERE route matrix (origins × destinations)
here_route_matrixCalculates travel-time and distance matrices for many origins and destinations via HERE Matrix Routing, handles async submission, polling, and result retrieval, and resumes pending jobs by matrix ID.
Instructions
Calculate travel times (and distances when available) between many origins and destinations with HERE Matrix Routing v8. Handles the HERE async job flow internally: submits the matrix, polls the status URL, downloads the gzip result, and returns a 2D durations matrix in seconds. If the job is still running after waitSeconds it returns matrixId + status so you can call again with {"matrixId":"..."} to resume. Locations are "lat,lng" or addresses (UK focus auto-geocode). Origins and destinations are ordered as supplied and echoed in the response so rows/columns are unambiguous. VERIFIED CAVEAT: HERE Matrix v8 is car-based in practice. transportMode and the HGV "truck" profile are only sent when you explicitly ask for them; if HERE rejects them, retry without them. For per-route HGV restrictions use here_route (truck) instead. The request body is the minimal verified payload: origins, destinations and regionDefinition {type:"world"}. matrixAttributes is never sent (v8 rejects it).
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>"
},
"name": "here_route_matrix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truck | No | HGV profile. Only used when transportMode is "truck". | |
| origins | Yes | Origin points ("lat,lng" or addresses), 1-25. Row order is preserved. | |
| matrixId | No | Resume polling an async matrix started earlier (skips submission). | |
| routingMode | No | Optional HERE routingMode. | |
| waitSeconds | No | How long to wait for completion before returning a pending result (default 60 s). | |
| destinations | No | Destination points (1-25). Omit for a square origins×origins matrix. | |
| departureTime | No | Optional departure time (RFC 3339 with offset). Improves traffic accuracy but is not part of the minimal verified body. | |
| transportMode | No | Optional. Only sent when provided; HERE Matrix v8 is car-based in practice (see tool description). |