Skip to main content
Glama

Search Geonames

search_geonames
Read-onlyIdempotent

Search for places (cities, towns, landmarks, regions) by name and get which STATE / PROVINCE / COUNTY / PREFECTURE / administrative division (German Bundesland, UK county, Canadian province, Japanese prefecture, Indian/Australian/Mexican state, etc.) they are in, plus country, coordinates, population, and feature type. Answers "what state is in", "which US/German/Australian state is in", "what province/county/prefecture/region is in" — the admin_region field is the state/province/county/prefecture (e.g. search_geonames("Naperville", "US") → Illinois; ("Heidelberg", "DE") → Baden-Württemberg; ("Leeds", "GB") → England; ("Osaka", "JP") → Osaka). Worldwide coverage. Example: search_geonames("Paris", "FR"). Use get_nearby to find places near a known location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results (default: 10, max: 100)
queryYesPlace name to search for (e.g., "Tokyo", "Grand Canyon")
_apiKeyYesGeoNames username
countryNoISO 3166-1 alpha-2 country code to filter (e.g., "US", "JP")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query string
totalYesTotal results count from API
placesYes
countryYesISO 3166-1 alpha-2 country code filter applied
returnedYesNumber of results in this response

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "_apiKey": "your-geonames-api-key",
      -    "query": "Tokyo"
      -  },
      -  {
      -    "_apiKey": "your-geonames-api-key",
      -    "country": "US",
      -    "limit": 5,
      -    "query": "Grand Canyon"
      -  }
      -]New value: +[
      +  {
      +    "query": "Tokyo"
      +  },
      +  {
      +    "country": "US",
      +    "limit": 5,
      +    "query": "Grand Canyon"
      +  }
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, open-world and non-destructive, so the safety profile is covered. The description adds genuinely useful context: worldwide coverage and the fact that admin_region is the state/province/county/prefecture field, plus worked examples showing the country filter shape. It does not cover result ordering or limit behavior, but that is minor against the rich annotations and output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded correctly, but the description is padded: the state/province/county list and the example-answer pairs are repeated in multiple forms, making it longer than the task requires. Every sentence is on-topic, yet several could be merged without loss.

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?

With an output schema present the description need not explain return values, and it voluntarily describes the key field anyway. It fully covers when to use it, the alternative sibling, and the country-filter pattern; only minor operational details (pagination, result ordering) are absent, which is acceptable given the structured fields.

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 description coverage is 100%, so the baseline is 3. The description goes beyond the schema by showing how the country code and query combine in practice (search_geonames("Naperville", "US") → Illinois) and by defining the semantics of what comes back, which helps the agent form correct calls rather than just read field labels.

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?

States a specific verb and resource (search for places by name) and enumerates the meaningful return fields (admin_region, country, coordinates, population, feature type), so the agent understands this is a geocoding-to-administrative-region lookup, not a generic place search. It explicitly distinguishes itself from the sibling get_nearby by naming it.

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?

Gives concrete trigger questions ('what state is <city> in', 'which province is <place> in') and routes proximity queries to get_nearby by name. The alternative and the condition that selects it are stated, leaving nothing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.