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.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "Tokyo"
    },
    "name": "search_geonames"
  }
}

Input 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

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, non-destructive behavior, so the bar is lower. The description still adds coverage scope (worldwide) and clarifies which field carries the administrative division, which is the tool's key behavioral trait. It does not mention rate limits or what happens with ambiguous multi-country matches.

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 and clear, but the parenthetical list of administrative divisions is long and repeated twice, with two long country enumerations that restate the same point. It is informative but noticeably padded.

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?

An output schema exists, yet the description still usefully names the key return fields, and it covers scope and the sibling split. Missing only edge-case behavior such as ambiguous matches or result ordering, which limits it to a 4.

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 the baseline is 3, but the description goes further by pairing query with the country filter in worked examples and by showing that admin_region is the resolution target. It adds no guidance on limit or _apiKey, so it does not reach full marks.

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 states a specific verb and resource (search places by name) and enumerates the returned fields: admin region, country, coordinates, population, feature type. It explicitly contrasts with get_nearby, so an agent can separate the two without opening the schema.

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?

It names the alternative (get_nearby) with the exact condition that selects it: finding places near a known location. The example question templates ("what state is <city> in") also tell the agent which user intents map here.

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.