directions
A route between points in order ([lng, lat] each, 2 to 25: start, stops, end) by car, truck, bike or on foot, in the shape of Mapbox Directions v5: total distance in metres and time in seconds, each leg's main roads, turn-by-turn steps with written instructions, and the line as a polyline6. Times assume normal road speeds; there is no live traffic. Optional: alternative routes, roads to avoid (toll, motorway, ferry), the instructions' language, and each route's climb and descent. Covers Europe, North America (Canada, the US and Mexico), South America, Australia and Oceania; a point elsewhere answers no_route and counts nothing. Counts one lookup against the workspace's monthly searches, on every plan; past the plan it returns searches_exhausted and nothing is charged. Show the returned attribution with the route.
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": {
"points": "<points>"
},
"name": "directions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | Turn-by-turn steps with written instructions (default true). | |
| key_id | No | The map key (uuid from list_keys) to count the lookup against. Default: the workspace's first active secret key, else its first publishable one. | |
| points | Yes | The stops in order, each [lng, lat]: the start, any stops between, the end (2 to 25 points). | |
| exclude | No | Roads to leave out: any of toll, motorway, ferry. | |
| profile | No | driving (the default), driving-hgv (a truck), cycling or walking. | |
| language | No | The instructions' language, e.g. de or fr-FR; English where it is not available. | |
| elevation | No | Each route's climb, descent, lowest and highest point, in metres. | |
| alternatives | No | Up to two alternative routes after the best one (default false). |