Skip to main content
Glama
OpenStreetMap MCP

OpenStreetMap MCP

osm_get_bbox

Read-only

Download OpenStreetMap data inside a bounding box as complete, paged JSON, filtering by tags and element types to retrieve only the map features you need.

Instructions

Download the OSM data in a bounding box, filtered and paged so the result is always complete valid JSON. The API limits the area (see osm_capabilities, default 0.25 square degrees) and returns every node of every way that touches the box, so even a tiny box in a dense city can hold thousands of elements. Use tag_filters (for example ["railway=subway_entrance", "highway=elevator"]), types, tagged_only, inside_bbox_only and compact to get just what you need, and page with next_offset when it is not null. Unfiltered results are sorted as the API sends them (by type, then id), so tagged features can sit on later pages.

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": {
      "min_lon": "<min_lon>",
      "min_lat": "<min_lat>",
      "max_lon": "<max_lon>",
      "max_lat": "<max_lat>"
    },
    "name": "osm_get_bbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum elements per page; a page may be shorter to stay within the size cap
typesNoKeep only these element types
offsetNoStart at this element of the filtered list (use the previous next_offset)
compactNoReturn only type, id, lat, lon, tags, nodes and members (drops version, timestamp, changeset, uid, user)
max_latYes
max_lonYes
min_latYes
min_lonYes
tag_filtersNoKeep elements with ANY of these tags: "key" (any value) or "key=value"
tagged_onlyNoSkip elements without tags (for example the untagged nodes of ways)
inside_bbox_onlyNoDrop nodes outside the box; the API also returns far-away nodes of ways that merely touch it. Ways keep their full node id lists.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.2
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "description": "Return only type, id, lat, lon, tags, nodes and members (drops version, timestamp, changeset, uid, user)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / inside_bbox_only
      Added value: +{
      +  "default": false,
      +  "description": "Drop nodes outside the box; the API also returns far-away nodes of ways that merely touch it. Ways keep their full node id lists.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 200,
      +  "description": "Maximum elements per page; a page may be shorter to stay within the size cap",
      +  "maximum": 2000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Start at this element of the filtered list (use the previous next_offset)",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / tag_filters
      Added value: +{
      +  "description": "Keep elements with ANY of these tags: \"key\" (any value) or \"key=value\"",
      +  "items": {
      +    "maxLength": 300,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / tagged_only
      Added value: +{
      +  "default": false,
      +  "description": "Skip elements without tags (for example the untagged nodes of ways)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / types
      Added value: +{
      +  "description": "Keep only these element types",
      +  "items": {
      +    "enum": [
      +      "node",
      +      "way",
      +      "relation"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 3,
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond readOnlyHint/openWorldHint, it discloses substantive behavior an agent could not guess: the default 0.25 square-degree area cap, that every node of every way touching the box is returned (so tiny dense boxes still explode), that pages may be short due to a size cap, and that unfiltered results are ordered by type then id so tagged features may land on later pages.

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?

Three sentences, front-loaded with purpose, and each carries real information rather than restating the name or schema. The density is high but the sentences are long and run several ideas together, slightly hurting scannability.

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

Completeness4/5

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

For an 11-parameter read tool with no output schema, the description covers the critical unknowns: area limits, pagination contract via next_offset, and result ordering. It does not sketch the returned element shape or note whether any authentication is required, which are the remaining gaps.

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

Parameters4/5

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

Schema coverage is 64%, and the description compensates where it matters — tag_filters syntax with concrete examples, the ANY-of-matching rule, why inside_bbox_only exists (far-away way nodes), and paging via next_offset, which is not even in the input schema. It leaves limit/offset/compact mostly to their schema text, which is adequate but not additive.

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

Purpose5/5

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

The description opens with a specific verb+resource+scope: 'Download the OSM data in a bounding box, filtered and paged.' That is enough for an agent to separate this bulk area-download tool from id-based siblings like osm_get_element or note-based ones like osm_get_notes_in_bbox.

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?

It gives concrete usage direction: narrow with tag_filters/types/tagged_only/inside_bbox_only/compact, page with next_offset when non-null, and check osm_capabilities for the area limit. It does not name an explicit when-not-to-use case or an alternative tool for smaller single-element lookups, so it stops short of a 5.

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