Matrix
matrix"Distance matrix between locations" / "all-to-all travel times" / "NxM routing grid" / "drive / walk / bike times between [list]", NxM distance and duration matrix between many points via OpenStreetMap routing. Use for traveling-salesman setup, multi-stop optimization, nearest-warehouse, fleet dispatch. Profile-aware (car / truck / bike / foot / wheelchair).
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": {
"metrics": [
"duration",
"distance"
],
"profile": "driving-car",
"locations": [
[
8.681495,
49.41461
],
[
8.687872,
49.420318
],
[
8.675444,
49.418892
]
]
},
"name": "matrix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metrics | No | ["duration","distance"] | |
| profile | No | ||
| sources | No | Which `locations` to route FROM, as 0-based indices into that array, e.g. [0] means the first location. NOT coordinates. Omit to use every location. | |
| locations | Yes | ||
| destinations | No | Which `locations` to route TO, as 0-based indices into that array, e.g. [1,2]. NOT coordinates. Omit to use every location. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sources | Yes | ||
| metadata | Yes | ||
| distances | No | Meters; only when metrics includes "distance" | |
| durations | No | Seconds, sources x destinations | |
| destinations | Yes |