Skip to main content
Glama

Get boundary polygon

get_boundary
Read-onlyIdempotent

Returns 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

NameRequiredDescriptionDefault
idYesBoundary 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.
detailNoSimplification 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).
includeYesComma-separated extras: parents, children.
precisionNoCoordinate decimals (3–7). Defaults to what the detail level needs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/openWorld/idempotent annotations by disclosing provenance (own OSM copy, first-request fallback fetch from OSM), cost of 1 unit, key requirements per detail level, and the large-polygon behavior where geometry is null and download_url carries the payload. These are exactly the operational facts an agent needs and cannot get from the annotation set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Return shape is front-loaded, then properties, provenance, selection advice, cost, and the size fallback, with no filler sentences. The provenance sentence is dense and slightly overlong, which is the only reason it is not a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description covers the return contract in full: Feature structure, the property list, and the geometry-null plus download_url fallback for oversized polygons. For a 4-parameter read tool this leaves nothing an agent needs unresolved.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description does add real meaning for include (parents gives full hierarchy, children the direct subdivisions) and for detail selection when admin_level is null. It says nothing extra about id or precision beyond the schema, so the added value is partial rather than substantial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Returns one boundary as a GeoJSON Feature') and enumerates exactly what comes back: polygon plus named properties. It never names a sibling such as export_boundary, so the agent must infer the difference between fetching one boundary and exporting it, which keeps this short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real selection guidance inside the tool: choose detail by kind when admin_level is null, use include=parents/children depending on hierarchy needs, and detail=low is public without a key for previews. It offers no explicit when-not or named alternative tool, so it stops short of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources