Skip to main content
Glama

Geocode a place name

geocode_place

Convert a place name into geographic coordinates for use in route searches or mapping applications.

Instructions

Convert a place name (city, region, landmark, mountain pass, etc.) into geographic coordinates using OpenStreetMap's Nominatim geocoder. Returns candidate matches with lat/lon and a bounding box. Use this when you have a place name and need coordinates — for example before calling find_routes_in_bbox. To find trails near a place in one step, prefer find_routes_near_place instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesPlace name to look up, e.g. 'Zermatt', 'Lake District', 'Stok La'.
limitNoMaximum number of candidate matches to return (1-10).
languageNoPreferred language for place names (BCP-47 code, e.g. 'en', 'de').en
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses that it uses Nominatim, returns candidate matches with lat/lon and bounding box. Does not mention rate limits, delays, or error handling, but overall adequately describes behavior for a geocoding tool.

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?

Two sentences; first sentence defines purpose and process, second provides usage guidance and alternative. Front-loaded and no unnecessary words.

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 no output schema and no annotations, description covers purpose, usage, and output format. Lacks error handling details or external service dependencies, but is sufficiently complete for a typical geocoding tool.

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 baseline is 3. Description adds context for the query parameter by listing examples of place types, which enriches the schema meaning. Does not add beyond schema for limit or language, but the additional context warrants a 4.

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 clearly states the tool's purpose: converting a place name into geographic coordinates using Nominatim. It specifies types of places (city, region, landmark, mountain pass) and distinguishes itself from sibling tools, particularly find_routes_near_place.

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

Usage Guidelines5/5

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

Explicitly tells when to use the tool ('when you have a place name and need coordinates') and provides a before-use scenario ('before calling find_routes_in_bbox'). Also gives an alternative recommendation for a one-step operation ('prefer find_routes_near_place instead').

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/chiraggahujaa/trails-mcp'

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