Skip to main content
Glama

Get World Bank Country

worldbank_get_country
Read-onlyIdempotent

Fetch metadata for one country or aggregate entity: ISO codes, region, income level, lending type, capital, and coordinates. Accepts an ISO2 code (US, DE), an ISO3 code (USA, DEU), or a World Bank aggregate code (EAS, HIC, WLD); "all" and lists of codes are rejected. Use worldbank_list_countries to browse valid codes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
country_codeYesOne country code. Accepts ISO2 (US), ISO3 (USA), or aggregate code (EAS, HIC, WLD) — not "all" or a list of codes. Use worldbank_list_countries to browse valid codes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoCountry or aggregate ID.
iso2NoISO2 country code.
nameNoCountry or aggregate name.
errorNoPresent when the call failed. Absent on success.
regionNoWorld Bank region this country belongs to.
latitudeNoCapital latitude (empty for aggregates).
longitudeNoCapital longitude (empty for aggregates).
capitalCityNoCapital city name (empty for aggregates).
incomeLevelNoWorld Bank income classification.
isAggregateNoTrue when this entry is a regional or income-group aggregate.
lendingTypeNoWorld Bank lending type classification.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / country_code / description
      Previous value: -"Country code. Accepts ISO2 (US), ISO3 (USA), or aggregate code (EAS, HIC, WLD). Use worldbank_list_countries to browse valid codes."New value: +"One country code. Accepts ISO2 (US), ISO3 (USA), or aggregate code (EAS, HIC, WLD) — not \"all\" or a list of codes. Use worldbank_list_countries to browse valid codes."
    • removedInput schema / properties / country_code / minLength
      Removed value: -1
    • addedInput schema / properties / country_code / pattern
      Added value: +"^[A-Za-z0-9]{2,3}$"
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `country_not_found`: The country code does not exist in the World Bank API. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `country_not_found`: The country code does not exist in the World Bank API. `multiple_countries`: The code is \"all\", or another selector the World Bank resolves to more than one country. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "country_not_found"
      -]New value: +[
      +  "country_not_found",
      +  "multiple_countries"
      +]
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "id",
      +      "iso2",
      +      "name",
      +      "region",
      +      "incomeLevel",
      +      "lendingType",
      +      "capitalCity",
      +      "longitude",
      +      "latitude",
      +      "isAggregate"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `country_not_found`: The country code does not exist in the World Bank API. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "country_not_found"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "id",
      -  "iso2",
      -  "name",
      -  "region",
      -  "incomeLevel",
      -  "lendingType",
      -  "capitalCity",
      -  "longitude",
      -  "latitude",
      -  "isAggregate"
      -]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/openWorldHint, so the safety profile is covered. The description adds real behavioral context beyond that: which code shapes succeed and that 'all' or list inputs are rejected, which is a rejection/validation trait not captured by the annotations. It stops short of noting error behavior or rate limits.

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?

Two tight sentences: the first gives purpose and returned fields, the second gives input formats, the rejection rule, and the alternative. Front-loaded with zero filler, and the sibling pointer is placed last where it belongs.

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?

An output schema exists, so return values need not be explained, and the single parameter plus its format constraints are fully specified. Nothing an agent needs to call this correctly is missing.

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 100% and the description's parameter guidance (ISO2/ISO3/aggregate, no 'all', no lists) essentially restates the schema's own description for country_code, adding no new syntax or format detail. Baseline 3 is the correct ceiling when the schema does the heavy lifting.

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?

Opens with a specific verb+resource ('Fetch metadata for one country or aggregate entity') and enumerates exactly which metadata fields come back (ISO codes, region, income level, lending type, capital, coordinates). It also names the sibling tool (worldbank_list_countries) so the agent can distinguish it from the browse/list tools.

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

Usage Guidelines5/5

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

States the accepted input forms (ISO2, ISO3, aggregate codes) and explicitly rules out invalid ones ('all' and lists of codes are rejected), then routes browsing to worldbank_list_countries. That is an explicit when-to-use and when-not-to-use with a named alternative.

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.