Get trail geometry clipped to a box
get_route_segmentsGet route geometry clipped to a WGS84 bounding box as GeoJSON. Specify route IDs, bounding box, and activity type to retrieve trail segments for a map viewport.
Instructions
Get the on-map geometry of one or more routes, clipped to a WGS84 lon/lat bounding box, as GeoJSON (reprojected to lon/lat). Useful for drawing the part of a trail inside a map viewport. Geometry is summarised by default; set geometry_detail to 'full' for all coordinates.
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": {
"ids": "<ids>",
"min_lon": "<min_lon>",
"min_lat": "<min_lat>",
"max_lon": "<max_lon>",
"max_lat": "<max_lat>"
},
"name": "get_route_segments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | OSM relation ids whose geometry to return. | |
| min_lon | Yes | Western longitude of the clip box. | |
| min_lat | Yes | Southern latitude of the clip box. | |
| max_lon | Yes | Eastern longitude of the clip box. | |
| max_lat | Yes | Northern latitude of the clip box. | |
| geometry_detail | No | Geometry verbosity: 'none', 'summary' (default), or 'full'. | summary |
| flavour | No | Which activity map to query: hiking, cycling, mtb (mountain biking), riding (horse), skating (inline), or slopes (ski/winter). Defaults to hiking. | hiking |