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.

Input Schema

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

Output Schema

TableJSON 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

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds behavioral context by listing the exact return fields and the key capability of returning land borders by name, which is useful 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 two sentences with front-loaded purpose and a clear list of returned data. Every clause adds value, and there is no redundancy or padding.

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?

Given the low complexity (one parameter), existing output schema, and annotations, the description fully covers what the tool does, what it returns, and a concrete use case. No critical gaps remain.

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?

The schema already provides 100% coverage for the single 'query' parameter, including partial-match support. The description does not add new parameter-level meaning beyond restating 'by name,' so a baseline score of 3 is appropriate.

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 opens with a specific verb+resource: 'Search for countries by name,' and enumerates the exact fields returned, including official name, capital, population, and borders. This clearly distinguishes it from sibling tools like get_country_by_code or countries_by_region, and the border detail adds a unique differentiator.

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 implies usage context through the explicit example of answering 'which countries border Bolivia,' which signals a search-by-name scenario. However, it does not explicitly name alternative tools or state when not to use it, so it falls short of a 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.