Get boundary polygon
get_boundaryReturns one boundary as a GeoJSON Feature: its polygon at a chosen detail plus properties (name, kind, admin_level, parents, bbox, area_km2, population, wikidata). The polygon is OpenStreetMap's outline (territorial waters included), served from our own copy; only a boundary missing from it is fetched from OpenStreetMap the first time anyone asks. admin_level is null where we do not hold OpenStreetMap's level: choose by kind. Costs 1 unit; detail=low is also public without a key (for map previews). include=parents adds the full hierarchy, include=children the direct subdivisions. If the polygon is too big for one response, geometry is null and download_url points to the file.
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": {
"id": "<id>",
"include": "<include>"
},
"name": "get_boundary"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Boundary id: r<OSM relation id> (e.g. r62422 for Berlin) or w<way id>. Also accepts R62422, relation/62422, -62422, an openstreetmap.org URL, wikidata:Q64 or iso:US-CA. | |
| detail | No | Simplification relative to the boundary's size: low (~1,000 points across; the default without a key), medium (the default with a key, ~5,000), high (~25,000), full (unsimplified OSM). | |
| include | Yes | Comma-separated extras: parents, children. | |
| precision | No | Coordinate decimals (3–7). Defaults to what the detail level needs. |