Skip to main content
Glama

overpass.ch

Run an Overpass query

overpass_query
Read-onlyIdempotent

Runs an Overpass QL query on the full OpenStreetMap planet at overpass.ch (minutely updates) and returns the matching nodes, ways and relations with their tags. Start the query with a settings line such as [out:json][timeout:25]; JSON is used when the query does not set [out:]. [timeout:N] stops the query after N s: at most 120 s through this tool, and the plan may allow less. Patterns:

  • Box (south,west,north,east): nwr"amenity"="cafe"; out center;

  • Radius in metres around lat,lon: nwr"amenity"="pharmacy"; out center;

  • In a place: overpass_area_id from geocode, then area(id:3600051701)->.a; nwr"tourism"="hotel"; out center;

  • By name (exact, local language): area["name"="Wien"]["admin_level"="4"]->.a;

  • Count: out count; Tags only: out tags; At most 50: out center 50; Lines with coordinates: out geom; (large)

  • Regex, any case: ["name"~"^Bahnhof",i]

  • By id: node(3470507586); out; way(id:1,2,3); out tags;

  • The map at a past date (Medium and Large plans): [date:"2015-01-01T00:00:00Z"] in the settings line. The answer starts with counts and the date of the data, then one JSON object per element and line, up to max_chars characters. When it is cut, call again with offset, or narrow the query. Each call counts as one request of the plan, a cut one too. Data © OpenStreetMap contributors, ODbL.

Input Schema

NameRequiredDescriptionDefault
queryYesthe Overpass QL (or XML) query
offsetNothe element (or CSV row) to start at, for the next part of a cut answer
max_charsNomost characters of the answer to show; larger answers are cut, and offset shows the next part
add_elevationNoadd the height in metres to every point of a JSON answer; one elevation lookup per point

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive behaviour, and the description adds real operational context on top: per-call request accounting ('Each call counts as one request of the plan, a cut one too'), timeout capping at 120 s, truncation at max_chars with offset continuation, plan gating of the date filter, and attribution/licence terms. That is exactly the extra context annotations cannot carry.

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?

The core statement and return behaviour are front-loaded, and the pattern list is dense but each line encodes a distinct query idiom that is otherwise hard to infer. It is long, and a few patterns ('Lines with coordinates: out geom; (large)') are terser than the rest, but no sentence is filler.

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?

With no output schema, the description still explains the response shape ('starts with counts and the date of the data, then one JSON object per element and line'), pagination behaviour, and data provenance. For a free-form query tool of this complexity, an agent has everything needed to call it correctly and to react to a truncated answer.

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 100%, so the baseline is 3, but the description adds meaning beyond it by explaining how max_chars and offset interact ('The answer ... up to max_chars characters. When it is cut, call again with offset') and by tying [timeout:N] to a hard 120 s ceiling. add_elevation is left entirely to the schema, which keeps it from a 5.

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?

States a specific verb and resource ('Runs an Overpass QL query on the full OpenStreetMap planet at overpass.ch') plus what comes back ('nodes, ways and relations with their tags'). This clearly separates it from siblings like geocode, reverse_geocode and elevation, which do lookup-style work rather than arbitrary spatial queries.

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?

The patterns block gives concrete when-to-use-which-form guidance (box, around radius, area, name, count, tags, geom, regex, id) and notes plan restrictions for the date filter. It never explicitly routes to the sibling overpass_examples for query authoring, which is the one obvious gap.

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