Skip to main content
Glama

GeoNames country facts

geonames_get_countries
Read-onlyIdempotent

Get GeoNames country facts — ISO alpha-2, alpha-3, and numeric codes, FIPS code, geonameId, capital, population, area in km², continent, languages, currency, postal-code format, and mainland bounding box — for the countries named, a continent, or all 250. The geonameId anchors geonames_get_children (a country's first-level divisions) and geonames_get_hierarchy. The full table is fetched once a day (1 GeoNames credit) and cached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum entries to return, 1 to 250. Default 50.
offsetNoEntries to skip before the first one returned, for paging. Default 0.
continentNoKeep only countries on this continent: AF Africa, AN Antarctica, AS Asia, EU Europe, NA North America, OC Oceania, SA South America. Case-insensitive.
countriesNoCountries to return by ISO 3166-1 code: alpha-2 (US), alpha-3 (USA), or three-digit numeric (840), up to 50, as a list or a comma-separated string. Case-insensitive; UK is accepted for GB. Match country names with nameContains instead.
nameContainsNoKeep only countries whose English name contains every word of this text as a substring (niger also matches Nigeria), ignoring case, accents, and punctuation.
geonamesUsernameNoYour own GeoNames username, spent only when the country table is not already cached, so the call uses that account's credit instead of the server's. The account needs free web services enabled on its geonames.org account page.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe limit that was applied.
errorNoPresent when the call failed. Absent on success.
shownNoCountries returned on this page.
noticeNoGuidance when nothing matched, the offset is past the end, or more pages remain.
notFoundNoRequested codes that match no GeoNames country; empty when every code matched.
countriesNoCountries on this page, in GeoNames order (by alpha-2 code).
truncatedNoTrue when more countries remain past this page.
nextOffsetNoOffset of the next page; absent on the last page.
totalCountNoCountries matching the filters, before paging.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the read-only/idempotent/open-world profile, but the description adds real context the agent can't get elsewhere: the table is fetched once a day for 1 GeoNames credit and cached, and geonamesUsername spends that account's credit only on a cache miss. This informs cost and side-effect behavior beyond the annotations.

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?

Three sentences, front-loaded with the purpose, then the cross-tool anchoring, then the caching/cost note. The long first-sentence enumeration is dense but each field earns its place; no filler.

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?

For a zero-required-param, fully schema-documented, annotations-covered tool with an output schema, the description supplies everything an agent still needs: selection modes, the geonameId hand-off to sibling tools, and credit/caching behavior. Nothing essential is missing.

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 adds semantics beyond the schema: 'UK is accepted for GB', that name matching should use nameContains instead of countries, and that the geonamesUsername credit is consumed only when uncached.

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 (Get) and resource (GeoNames country facts) and enumerates the exact payload (ISO/FIPS codes, geonameId, capital, population, area, continent, languages, currency, postal format, bounding box). It also scopes it as 'countries named, a continent, or all 250', which an agent can immediately distinguish from sibling search/place tools.

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 states the three selection modes (named countries, a continent, or all 250) and routes the agent to geonames_get_children and geonames_get_hierarchy via the returned geonameId. It lacks an explicit when-not-to-use (e.g., prefer geonames_search_places for name lookups), so it stops short of 5.

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.