Skip to main content
Glama
fastmcp-me

chuk-mcp-geocoder

by fastmcp-me

geocode

Find coordinates for any place name or address using OpenStreetMap data. Returns latitude, longitude, bounding box, and address details.

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?

With no annotations, the description carries full burden. It discloses use of Nominatim, retry behavior, and notes that simple names work best. Does not explicitly mention read-only nature or authentication, but provides adequate behavioral context.

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?

Well-structured with sections for description, args, returns, and a detailed 'CRITICAL' section. The retry workflow is verbose but valuable. Could be more concise, but front-loads purpose.

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 5 parameters, no output schema, and no annotations, the description is comprehensive. Covers all parameters, return format, and provides a critical retry strategy for edge cases.

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%, but the description explains all 5 parameters: query (with example), limit (range/default), countrycodes (ISO codes), language (example), output_mode (options). Adds significant meaning beyond 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 'Forward geocode a place name to coordinates' and specifies the database (OpenStreetMap/Nominatim). It distinguishes from siblings like reverse_geocode by focusing on forward geocoding.

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?

Includes a detailed retry workflow for when no results are found, guiding the LLM on how to handle failures. Does not explicitly state when not to use or compare with alternatives, but provides clear context.

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

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