Skip to main content
Glama
IBM

chuk-mcp-geocoder

by IBM

geocode

Convert place names and addresses into geographic coordinates using OpenStreetMap data. This tool provides latitude/longitude positions, bounding boxes, and detailed address information for location-based applications.

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
queryYes
limitNo
countrycodesNo
languageNo
output_modeNojson
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and excels. It details the data source (OpenStreetMap/Nominatim), return format (coordinates, bounding boxes, address details), and critical behavioral traits like the retry workflow for no results, including specific steps and examples. It also mentions performance characteristics ('works best with simple, well-known place names') and error handling (automatic retries without user input).

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 well-structured and front-loaded with the core purpose, followed by parameter details and critical usage guidelines. Every sentence earns its place by providing essential information, such as the retry workflow which is crucial for effective tool use. It is slightly lengthy due to the detailed retry instructions, but this is justified by the complexity of the tool's behavior, keeping it focused and informative.

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 the tool's complexity (5 parameters, no annotations, no output schema), the description is highly complete. It covers purpose, parameters with examples, return values, data source, behavioral traits (like the retry workflow), and usage context. The absence of an output schema is mitigated by describing the return format ('List of matching places with coordinates, bbox, and address details'), ensuring the agent understands what to expect.

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?

The schema description coverage is 0%, so the description must fully compensate, which it does effectively. Each parameter (query, limit, countrycodes, language, output_mode) is documented with clear semantics, examples, and constraints (e.g., 'limit: Maximum results (1-50, default 5)'). This adds significant value beyond the bare schema, making the parameters understandable and actionable for an AI agent.

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: 'Forward geocode a place name to coordinates.' It specifies the verb ('geocode'), resource ('place name'), and distinguishes from siblings like 'reverse_geocode' (which does the opposite) and 'batch_geocode' (which handles multiple queries). The first sentence is direct and unambiguous.

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?

The description provides explicit guidance on when to use this tool versus alternatives through the 'CRITICAL — LLM retry workflow' section. It explains that Nominatim works best with simple place names and outlines a cascade for retrying with simpler terms, which implicitly guides usage over other tools like 'batch_geocode' for complex queries. The context of sibling tools (e.g., 'reverse_geocode' for coordinates to addresses) further clarifies its specific role.

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

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