Elevation Tool
elevation_toolGet ground elevation for places or routes to return heights, total climb and descent, high and low points, and an elevation profile for assessing how high or hilly a location or trail is.
Instructions
Gets ground elevation from Mapbox terrain data. Give it places (points) for the height above sea level of each, or a line (path, or route_ref from a directions_tool or map_matching_tool result) for total climb and descent, the highest and lowest points, and an elevation profile. Use it for questions like "how high is this town?", "how hilly is this bike route?", "how much climbing is on this trail run?" or, for a recorded GPS trace matched with map_matching_tool, "how much did I climb?". Elevations are of the ground (bare earth), not buildings or bridges. Long paths are read at a coarser resolution (see resolution_m in the result), which can undercount small hills.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "elevation_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | A line (hike, ride, run) as ordered coordinates, for climb, descent and an elevation profile along it. For a route from directions_tool or a GPS trace matched with map_matching_tool, pass route_ref instead. | |
| points | No | Up to 25 places to get the ground elevation of, e.g. a summit, a town or a campsite. | |
| route_ref | No | The structuredContent.mapboxRender.ref from a directions_tool result (a planned route) or a map_matching_tool result (a recorded run, ride or hike), passed unchanged. The tool fetches the full line itself, so you never need to copy route geometry. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| zoom | Yes | Tile zoom used; lower on long paths | |
| points | No | ||
| source | Yes | Tileset the elevations were read from | |
| mapboxRender | No | ||
| resolution_m | Yes | Ground size of one elevation pixel at that zoom |