Skip to main content
Glama

Geocode a place or address

geocode
Read-only

Convert a place name or address into geographic coordinates. Choose Nominatim for precise addresses or Photon for fuzzy place names to retrieve matching locations with latitude, longitude, and OSM identifier.

Instructions

Converts a place name or address into coordinates using OpenStreetMap. Returns matching places with lat/lon, a display label and the OSM id. Provider "nominatim" (default) is best for addresses; "photon" is typo-tolerant and better for fuzzy place names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results, default 3
queryYesPlace name or address
languageNoLanguage for place names (IETF code like "en" or "de"), default "en"
providerNoGeocoder to use, default nominatim
countrycodesNoRestrict to countries: comma-separated ISO 3166-1 alpha-2 codes, e.g. "de,lu" (Nominatim only)
Behavior4/5

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

Annotations provide readOnlyHint=true, which is consistent with the description's conversion operation. The description adds value by naming the external provider (OpenStreetMap), listing return fields, and explaining provider behavioral differences (address-specific vs typo-tolerant). It does not reveal rate limits or external dependency caveats, but overall transparency is strong.

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?

The description is exceptionally concise—two sentences with no filler. The first sentence defines purpose and outputs, the second provides key usage differentiation for providers. Every word earns its place, making it easy for an AI agent to quickly parse.

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 the lack of an output schema, the description adequately covers return fields and provider choice. However, it omits guidance for sibling tool differentiation and does not address edge cases (e.g., no results, error handling, rate limits). Still, for a geocoding tool with well-documented parameters, it covers most essential context.

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% with descriptions for all five parameters. The description adds meaningful context beyond the schema by explaining the provider parameter's behavioral implications (nominatim for addresses, photon for typos). This extra semantic guidance helps agents choose the right provider, raising the score above the baseline of 3.

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 clearly states the tool converts a place name or address into coordinates using OpenStreetMap and specifies the output fields (lat/lon, display label, OSM id). It distinguishes between two providers but does not explicitly differentiate from sibling tools like reverse_geocode, which performs the inverse operation.

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 description provides guidance on when to use each provider: nominatim for addresses, photon for fuzzy place names. However, it does not offer context on when to use this tool versus its siblings (e.g., reverse_geocode for coordinate-to-address conversion, or find_nearby_pois for proximity searches), leaving the agent to infer tool selection from names alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ni-c/osm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server