Skip to main content
Glama
chrishayuk

chuk-mcp-geocoder

by chrishayuk

geocode

Convert place names or addresses to geographic coordinates using OpenStreetMap data. Returns location details including latitude, longitude, and bounding box.

Instructions

Forward geocode a place name to coordinates.

    Searches the OpenStreetMap/Nominatim database for places matching
    the query and returns coordinates, bounding boxes, and address details.

    Args:
        query: Place name or address to search for (e.g. "Boulder, Colorado")
        limit: Maximum results (1-50, default 5)
        countrycodes: Comma-separated ISO 3166-1 country codes to filter (e.g. "us,gb")
        language: Preferred response language (e.g. "en", "de", "fr")
        output_mode: "json" (default) or "text"

    Returns:
        List of matching places with coordinates, bbox, and address details

    CRITICAL — LLM retry workflow when no results are found:
        Nominatim works best with simple, well-known place names. Specific
        or compound names (e.g. "Strood Causeway, Mersea Island, UK") often
        return nothing.

        If the query returns no results, you MUST retry automatically — do
        NOT ask the user. Follow this cascade:

        1. Remove qualifiers and landmarks — keep only the core place name.
           "Strood Causeway, Mersea Island, UK" → "Mersea Island, UK"
           "Portland Harbor, Maine" → "Portland, Maine"
        2. Simplify further — drop region/country qualifiers.
           "Mersea Island, UK" → "Mersea Island"
           "Portland, Maine" → "Portland"
        3. Use countrycodes to narrow broad queries (e.g. countrycodes="gb").
        4. If the place is near a well-known location, geocode that instead
           and report the approximate area.
        5. Try alternative or official names — "The Strood" instead of
           "Strood Causeway", etc.

        Always retry at least twice with progressively simpler terms before
        telling the user the location could not be found.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
languageNo
output_modeNojson
countrycodesNo
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses key behaviors: searching Nominatim, returning coordinates/bbox/address, and the automatic retry cascade. Rate limits or authentication are not mentioned, but overall transparency is good.

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 description is fairly long but well-structured with clear sections (description, Args, Returns, CRITICAL). The retry workflow is essential and justified. Could trim some redundancy, but overall efficient.

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?

Given no output schema, the description explains return values. Covers all 5 parameters, required and optional, and includes error handling guidance. Complete for a geocoding tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description must add meaning. The Args section explains all 5 parameters with defaults, examples, and constraints (e.g., limit 1-50, countrycodes format), significantly enriching the schema.

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 it performs forward geocoding ('Forward geocode a place name to coordinates') using OpenStreetMap/Nominatim, which distinguishes it from siblings like reverse_geocode, batch_geocode, and others.

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 description provides a detailed retry workflow for handling no results, guiding the agent on when to simplify queries and when to avoid asking the user. However, it does not explicitly compare to sibling tools or state when to use alternatives.

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/chrishayuk/chuk-mcp-geocoder'

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