Skip to main content
Glama

Get Country By Code

get_country_by_code
Read-onlyIdempotent

Get country details by ISO code (e.g., "US" for United States or "FRA" for France). Returns capital, population, languages, currencies, area, and region.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesISO 3166-1 alpha-2 or alpha-3 country code

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagYesFlag emoji or empty string
nameYesCommon country name
codesYes
regionYesGeographic region
capitalYesCapital city or N/A if not available
area_km2YesTotal area in square kilometers
languagesYesLanguages spoken in the country
subregionYesSubregion name, empty if not available
currenciesYesCurrencies used in the country
populationYesTotal population
official_nameYesOfficial country name

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "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"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "code": "US"
      +  },
      +  {
      +    "code": "FRA"
      +  }
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the list of returned fields (capital, population, etc.), which is useful behavioral context but not particularly novel beyond what the output schema likely provides. It doesn't disclose additional traits such as rate limits or error behavior, but given the read-only nature, 3 is appropriate.

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 long, front-loaded with the action verb 'Get' and the resource 'country details', followed by illustrative examples and a concise list of returned fields. Every sentence earns its place with no redundancy or unnecessary fluff.

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 simple single-parameter read-only tool with full schema coverage, annotations, and an output schema, the description is complete. It states the purpose, gives examples, and lists return fields, covering all necessary contextual information without needing further elaboration.

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 description coverage is 100%, meaning the parameter 'code' is fully documented as 'ISO 3166-1 alpha-2 or alpha-3 country code'. The description only adds examples, which reinforce but do not add new meaning. Therefore, the baseline score of 3 applies.

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 the tool gets country details by ISO code, with examples. It distinguishes itself from sibling tools like countries_by_currency or search_countries by specifying the lookup key (ISO code) and the specific data fields returned, making its purpose unambiguous.

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 clearly indicates that this tool is appropriate when you have an ISO country code, providing examples. It does not explicitly mention alternatives or when not to use it, but the context is clear enough for an agent to infer it should be used over name-based search when a code is available. Lacks explicit exclusions or alternative tool references.

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.

TDQS

B3.4/5.0
Disambiguation2/5

The tool set is a mix of country lookups and many unrelated Pipeworx tools (e.g., prediction markets, memory, subscriptions). While the country-specific tools are distinct, the overall set is a hodgepodge, making it difficult for an agent to determine which tools are relevant to a given task.

Naming Consistency2/5

Naming conventions are mixed: some use verb_noun (search_countries), some noun_verb (countries_by_currency), some single verbs (forget, recall), and some phrases (ai_visibility_check, ask_pipeworx). No consistent pattern is followed.

Tool Count1/5

35 tools is excessive for a server named 'countries'. Only about 6-7 tools are actually related to countries; the rest are unrelated (Pipeworx services, prediction markets, etc.), creating an extreme mismatch between the server name and its content.

Completeness2/5

For the country domain, the tool set includes search and lookups by code/currency/language/region but lacks basic CRUD, comparisons, maps, or sorting. Additionally, the presence of many unrelated tools dilutes completeness for the stated purpose.