Skip to main content
Glama

search_countries

Find country information by searching with partial names. Returns paginated results for geographic data lookup.

Instructions

Search countries by name (e.g. "arg" finds Argentina). Returns paginated matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query (partial name match)
pageNo
limitNo

Implementation Reference

  • The 'search_countries' tool implementation, including schema definition and request handler that calls the geo search API.
    server.tool(
      'search_countries',
      'Search countries by name (e.g. "arg" finds Argentina). Returns paginated matches.',
      {
        q: z.string().min(1).describe('Search query (partial name match)'),
        page: z.number().int().positive().optional(),
        limit: z.number().int().min(1).max(100).optional(),
      },
      async ({ q, page, limit }) => {
        const params = new URLSearchParams({ q });
        if (page) params.set('page', String(page));
        if (limit) params.set('limit', String(limit));
        const data = await apiGet(`/v1/api/geo/countries/search?${params}`);
        return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Returns paginated matches' which is useful, but doesn't cover other important aspects like rate limits, authentication requirements, error conditions, or what happens with empty/no results. For a search tool with zero annotation coverage, this leaves significant gaps.

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 perfectly concise with two sentences that each earn their place: the first explains the core functionality with an example, the second explains the return behavior. No wasted words, and the most important information is front-loaded.

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?

For a search tool with 3 parameters, no annotations, and no output schema, the description provides basic but incomplete context. It covers the search functionality and pagination at a high level but lacks details about return format, error handling, and parameter usage. This is minimally adequate but has clear gaps.

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 description coverage is only 33% (only the 'q' parameter has a description). The description adds that searches use 'partial name match' and provides an example, which helps clarify the 'q' parameter. However, it doesn't explain the semantics of 'page' and 'limit' parameters beyond mentioning 'paginated matches' generally. The description provides some value but doesn't fully compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search countries by name' with a specific verb ('Search') and resource ('countries'), plus an example ('arg' finds Argentina). However, it doesn't explicitly differentiate from sibling tools like 'list_countries' or 'global_search', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'list_countries' (which might list all countries without search) or 'global_search' (which might search across multiple entity types). The description mentions pagination but doesn't specify when to use pagination parameters.

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/APOGEOAPI/apogeoapi-mcp'

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