Skip to main content
Glama

country_overview

Retrieve a country's details, all its regions, and top cities in a single request using a UUID or name prefix.

Instructions

Get a country's details, all its regions, and its most populous cities in one call. Accepts either a country UUID or a name prefix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoCountry UUID (takes priority over name)
nameNoCountry name prefix to resolve (e.g. "Germany")
preferredLanguagesNoComma-separated BCP 47 language tags
citiesLimitNoNumber of top cities to include (default 10)

Implementation Reference

  • src/server.ts:248-279 (registration)
    Registration of the 'country_overview' tool via server.tool() with name, description, schema, and handler.
    server.tool(
      'country_overview',
      'Get a country\'s details, all its regions, and its most populous cities in one call. Accepts either a country UUID or a name prefix.',
      {
        id: z.string().optional().describe('Country UUID (takes priority over name)'),
        name: z.string().optional().describe('Country name prefix to resolve (e.g. "Germany")'),
        preferredLanguages: z.string().optional().describe('Comma-separated BCP 47 language tags'),
        citiesLimit: z.number().int().min(1).max(50).default(10).describe('Number of top cities to include (default 10)'),
      },
      async ({ id, name, preferredLanguages, citiesLimit }) => {
        let countryId = id;
        if (!countryId) {
          if (!name) {
            return { content: [{ type: 'text', text: 'Provide either id or name.' }] };
          }
          const matches = await client.countries.list({ name, limit: 1, preferredLanguages });
          if (!matches.length) {
            return { content: [{ type: 'text', text: `No country found matching "${name}".` }] };
          }
          countryId = matches[0].id;
        }
        const country = await client.countries.get(countryId);
        const topCities = await client.cities.search({
          countryCode: country.isoCode,
          sort: 'population_desc',
          limit: citiesLimit,
          preferredLanguages,
        });
        const result = { country, regions: country.regions, topCities };
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Input schema for country_overview: id (optional UUID), name (optional prefix), preferredLanguages (optional), citiesLimit (default 10, max 50).
    {
      id: z.string().optional().describe('Country UUID (takes priority over name)'),
      name: z.string().optional().describe('Country name prefix to resolve (e.g. "Germany")'),
      preferredLanguages: z.string().optional().describe('Comma-separated BCP 47 language tags'),
      citiesLimit: z.number().int().min(1).max(50).default(10).describe('Number of top cities to include (default 10)'),
    },
  • Handler function for country_overview: resolves country by id or name, fetches country details, regions, and top cities by population, returns JSON result.
    async ({ id, name, preferredLanguages, citiesLimit }) => {
      let countryId = id;
      if (!countryId) {
        if (!name) {
          return { content: [{ type: 'text', text: 'Provide either id or name.' }] };
        }
        const matches = await client.countries.list({ name, limit: 1, preferredLanguages });
        if (!matches.length) {
          return { content: [{ type: 'text', text: `No country found matching "${name}".` }] };
        }
        countryId = matches[0].id;
      }
      const country = await client.countries.get(countryId);
      const topCities = await client.cities.search({
        countryCode: country.isoCode,
        sort: 'population_desc',
        limit: citiesLimit,
        preferredLanguages,
      });
      const result = { country, regions: country.regions, topCities };
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    },
Behavior3/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It states what the tool returns (details, regions, cities) but omits any mention of read-only nature, potential latency, or behavior when both id and name are given (though schema covers priority). It adds minimal beyond the schema.

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

Conciseness5/5

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

The description is a single, well-crafted sentence that front-loads the core purpose and follows with identifier usage. Every word is necessary, and no extraneous information is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complexity warrants more detail: there are 4 parameters, no output schema, and this combines multiple data sources. The description does not clarify what 'details' encompasses or hint at the response structure. For a tool with no output schema, some expectation of returned fields would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description reinforces that id or name can be used for identification, but adds no extra meaning for preferredLanguages or citiesLimit beyond what the schema already provides.

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 that the tool retrieves a country's details, all its regions, and its most populous cities in a single call. This distinguishes it from siblings like get_country (probably only basic details) and get_country_regions (only regions), making its unique value obvious.

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 specifies that it accepts either a country UUID or a name prefix, offering flexible identification. While it says 'in one call' implying efficiency, it does not explicitly compare to alternatives like calling separate endpoints. Still, the context is clear enough for an agent to understand its aggregating 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/930m310n/geomelon-mcp'

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