Skip to main content
Glama

Search Countries

search_countries
Read-onlyIdempotent

Search for countries by name. Returns official name, capital, region, population, area, languages, currencies, flag emoji, and the country's land borders by name, so "which countries border Bolivia" is answerable directly.

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": "United States"
    },
    "name": "search_countries"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesCountry name to search for (partial matches are supported)

Output Schema

NameRequiredDescriptionDefault
resultsYesArray of countries matching the search query

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "results": {
      +      "description": "Array of countries matching the search query",
      +      "items": {
      +        "properties": {
      +          "area_km2": {
      +            "description": "Total area in square kilometers",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "capital": {
      +            "description": "Capital city or N/A if not available",
      +            "type": "string"
      +          },
      +          "codes": {
      +            "properties": {
      +              "alpha2": {
      +                "description": "ISO 3166-1 alpha-2 code",
      +                "type": "string"
      +              },
      +              "alpha3": {
      +                "description": "ISO 3166-1 alpha-3 code",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "alpha2",
      +              "alpha3"
      +            ],
      +            "type": "object"
      +          },
      +          "currencies": {
      +            "description": "Currencies used in the country",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "flag": {
      +            "description": "Flag emoji or empty string",
      +            "type": "string"
      +          },
      +          "languages": {
      +            "description": "Languages spoken in the country",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "name": {
      +            "description": "Common country name",
      +            "type": "string"
      +          },
      +          "official_name": {
      +            "description": "Official country name",
      +            "type": "string"
      +          },
      +          "population": {
      +            "description": "Total population",
      +            "type": "integer"
      +          },
      +          "region": {
      +            "description": "Geographic region",
      +            "type": "string"
      +          },
      +          "subregion": {
      +            "description": "Subregion name, empty if not available",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "official_name",
      +          "codes",
      +          "capital",
      +          "region",
      +          "subregion",
      +          "population",
      +          "area_km2",
      +          "languages",
      +          "currencies",
      +          "flag"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "query": "United States"
      +  },
      +  {
      +    "query": "New"
      +  }
      +]
  3. First observed

TDQS

A3.7/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 new context by enumerating what comes back, including land borders by name, which tells an agent the result is enriched enough to answer relational questions without a follow-up call.

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?

Two tightly written sentences with the core action front-loaded. The field enumeration in the second sentence is somewhat redundant with the output schema, but the border example justifies it by showing what the fields enable.

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 one parameter, full schema coverage, an output schema, and rich annotations, the description only needs to frame the action and payoff, which it does. Minor gaps remain around behavior when no match is found or when multiple partial matches return, but nothing blocking for a simple lookup tool.

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?

There is a single required parameter with 100% schema description coverage, including the note that partial matches are supported. The description adds only the confirmation that search is by country name, so the schema is doing the heavy lifting and the baseline of 3 applies.

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?

States a specific verb and resource ("Search for countries by name"), and the "by name" qualifier implicitly separates it from siblings like countries_by_currency, countries_by_region, and get_country_by_code. It does not explicitly name an alternative, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the phrase "by name" signals this is the name-based lookup path, and the border example hints at a use case. There is no explicit when-to-use/when-not statement or named alternative for code-based or attribute-based lookups, all of which are reachable through siblings.

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.