Skip to main content
Glama
OpenStreetMap MCP

OpenStreetMap MCP

osm_get_elements

Read-only

Retrieve multiple current OpenStreetMap elements of one type in a single request by supplying their IDs, reducing repeated calls when reading map data.

Instructions

Read several elements of one type in a single call (current versions).

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": {
      "type": "<type>",
      "ids": "<ids>"
    },
    "name": "osm_get_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYes
typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already cover safety (readOnlyHint) and scope (openWorldHint), so the description's job is to add context, which it does: 'current versions' tells the agent snapshot data is returned rather than history, and 'one type' discloses that a homogeneous type is required across all IDs. It omits behavior for missing or deleted IDs and the 725-ID cap, the latter being recoverable from the schema.

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

Conciseness5/5

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

A single sentence with no filler, and the defining constraints (batch, single type, current versions) are front-loaded. Nothing could be trimmed without losing meaning.

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 a two-parameter read tool with annotations and no output schema, the description covers the essential semantics: batched reads, homogeneous types, and current-version scope. Only edge-case behavior (nonexistent IDs, partial results) is left unstated, which is a minor gap.

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 description coverage is 0%, so the description carries the burden here. 'of one type' usefully clarifies the relationship between the type and ids parameters (a single type applies to every ID in the batch), but nothing is said about ID validity, ordering, or what happens when an ID does not exist. Partial compensation, not full.

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?

The description states a specific verb (read) and resource (elements) with explicit batch and scope qualifiers: 'several elements of one type in a single call (current versions)'. That wording implicitly separates it from the singular osm_get_element and from osm_element_history, though neither sibling is named.

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

Usage Guidelines3/5

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

The phrase 'in a single call' implies this is the batch alternative to repeated single-element fetches, and 'one type' warns that mixed node/way/relation queries need multiple calls. It stops short of explicitly naming osm_get_element or osm_element_history as the alternatives, so the routing is implied rather than stated.

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