Skip to main content
Glama

Overpass Query

overpass_query
Read-onlyIdempotent

Run a raw Overpass QL query against OpenStreetMap. Use for complex spatial queries the helper tools can't express. Example: [out:json][timeout:25]; area["name"="Berlin"][admin_level=4]->.a; node["amenity"="library"](area.a); out body;. Returns the raw Overpass JSON (elements array with node/way/relation).

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "qql": "[out:json][timeout:25]; area[\"name\"=\"Paris\"][admin_level=4]->.a; node[\"amenity\"=\"restaurant\"](area.a); out body;"
    },
    "name": "overpass_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
qqlYesFull Overpass QL query string. Start with `[out:json][timeout:<n>];` and end with `out body;` (or similar output statement).

Output Schema

NameRequiredDescriptionDefault
countYesNumber of elements returned
elementsYesArray of normalized OSM elements

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, open-world), so the bar is lower; the description still adds real value by disclosing the raw passthrough return shape (elements array of node/way/relation) and by showing that output options and timeouts are caller-controlled inside the query string. It omits operational concerns an agent would want, notably Overpass rate limits and behavior on malformed or timed-out queries.

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 the action and the routing rule, followed by a worked example. The inline query example is long but it is the highest-value part of the description for a QL-based tool, so it earns its space; minor redundancy with the schema examples is the only waste.

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?

Given a rich annotation set, full schema coverage, and an existing output schema, the description covers what remains: the raw-query contract, when to reach for it, and the return shape. The main gap is operational — no guidance on timeouts, rate limits, or invalid-query failures — which matters for a tool that dispatches arbitrary user-authored queries to a shared external service.

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?

With one parameter at 100% schema coverage, the schema already documents the required qql string including the `[out:json][timeout:<n>];` prefix and `out body;` terminator. The description's example mirrors the schema's own examples block, so it adds little meaning beyond what the structured fields provide. Baseline 3 applies.

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 ("Run a raw Overpass QL query against OpenStreetMap") and immediately frames the scope as raw/low-level, which distinguishes it from the higher-level geo siblings such as pois_near or places_in_bbox. An agent can tell exactly what class of work this tool does without opening the schema.

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 a clear selection rule: use this for "complex spatial queries the helper tools can't express," which implicitly routes simple radius/bbox lookups elsewhere. It lacks an explicit when-not or naming of the specific helper alternatives, so the agent must infer the boundary, but the intent is unambiguous.

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.