Skip to main content
Glama

List World Bank Countries

worldbank_list_countries
Read-onlyIdempotent

List countries and regional aggregates with metadata: ISO codes, region, income level, lending type, capital, and coordinates. Filter by region code (e.g. EAS, SSF, NAC), income level (LIC, LMC, UMC, HIC), and lending type (IDX for IDA, IBD for IBRD, IDB for Blend); filters combine by AND. Aggregate entries are excluded by default, leaving individual countries only; set include_aggregates=true to also return region, income group, and world aggregate entities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPagination page number (1-based).
regionNoFilter by World Bank region code. A country's region.id is one of EAS (East Asia & Pacific), ECS (Europe & Central Asia), LCN (Latin America & Caribbean), MEA (Middle East, North Africa, Afghanistan & Pakistan), NAC (North America), SAS (South Asia), or SSF (Sub-Saharan Africa). Any other World Bank region or grouping code also filters, by membership: AFE (Africa Eastern and Southern), AFW (Africa Western and Central), ARB (Arab World), EUU (European Union), LDC (Least developed countries), and the rest of the codes the World Bank publishes for regions.
per_pageNoResults per page (default: server default, max: 300). One page holds at most 150 entries, which keeps a response within about 50 KB; a larger value is reduced to that cap and echoed as appliedFilters.perPage, and totalPages is counted at the reduced size, so page + 1 continues where a page ends; notice discloses the reduction whenever the result runs past one page.
income_levelNoFilter by income group code: LIC (Low income), LMC (Lower middle income), UMC (Upper middle income), HIC (High income).
lending_typeNoFilter by World Bank lending type code: IDX (IDA), IBD (IBRD), IDB (Blend — eligible for both), or LNX (Not classified). IDX, IBD, and IDB are also the codes worldbank_get_poverty takes for its lending groups; a country's lendingType field reports the name (IDA, IBRD, Blend, Not classified).
include_aggregatesNoWhen true, includes regional, income-group, and world aggregate entries alongside individual countries. Default false (individual countries only). No aggregate is returned under region or lending_type, whichever code is given, so this changes nothing when either is set.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoContext for an empty page — which filters matched nothing, or the page range that exists when the requested page is past the end — or for a page size reduced to the page cap.
countriesNoCountries (and optionally aggregates) matching the filters.
totalCountNoTotal matching entries before pagination (includes aggregates if include_aggregates=true).
totalPagesNoTotal number of pages.
currentPageNoPage number requested — past totalPages when the request ran off the end.
appliedFiltersNoThe effective listing parameters — which filters were in force and the page size served.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / per_page / description
      Previous value: -"Results per page (default: server default, max: 300)."New value: +"Results per page (default: server default, max: 300). One page holds at most 150 entries, which keeps a response within about 50 KB; a larger value is reduced to that cap and echoed as appliedFilters.perPage, and totalPages is counted at the reduced size, so page + 1 continues where a page ends; notice discloses the reduction whenever the result runs past one page."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "countries",
      -      "totalCount",
      -      "currentPage",
      -      "totalPages"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "countries",
      +      "appliedFilters",
      +      "totalCount",
      +      "currentPage",
      +      "totalPages"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / appliedFilters
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The effective listing parameters — which filters were in force and the page size served.",
      +  "properties": {
      +    "includeAggregates": {
      +      "description": "Whether aggregates were requested, including the default of false.",
      +      "type": "boolean"
      +    },
      +    "incomeLevel": {
      +      "description": "Income level code applied, omitted when none.",
      +      "type": "string"
      +    },
      +    "lendingType": {
      +      "description": "Lending type code applied, omitted when none.",
      +      "type": "string"
      +    },
      +    "page": {
      +      "description": "Page number requested.",
      +      "type": "number"
      +    },
      +    "perPage": {
      +      "description": "Results per page actually served — the requested size or server default, reduced to the page cap when larger. totalPages is counted at this size.",
      +      "type": "number"
      +    },
      +    "region": {
      +      "description": "Region code applied, omitted when none.",
      +      "type": "string"
      +    },
      +    "requestedPerPage": {
      +      "description": "Page size asked for, present only when it exceeded the page cap and perPage was reduced.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "includeAggregates",
      +    "page",
      +    "perPage"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Context for an empty page: which filters matched nothing, or the page range that exists when the requested page is past the end."New value: +"Context for an empty page — which filters matched nothing, or the page range that exists when the requested page is past the end — or for a page size reduced to the page cap."
  2. Changed4 schema fields changed
    • changedInput schema / properties / include_aggregates / description
      Previous value: -"When true, includes regional, income-group, and world aggregate entries alongside individual countries. Default false (individual countries only)."New value: +"When true, includes regional, income-group, and world aggregate entries alongside individual countries. Default false (individual countries only). No aggregate is returned under region or lending_type, whichever code is given, so this changes nothing when either is set."
    • addedInput schema / properties / lending_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "const": "",
      +      "type": "string"
      +    },
      +    {
      +      "description": "IDX (IDA), IBD (IBRD), IDB (Blend), or LNX (Not classified).",
      +      "enum": [
      +        "IBD",
      +        "IDB",
      +        "IDX",
      +        "LNX"
      +      ],
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Filter by World Bank lending type code: IDX (IDA), IBD (IBRD), IDB (Blend — eligible for both), or LNX (Not classified). IDX, IBD, and IDB are also the codes worldbank_get_poverty takes for its lending groups; a country's lendingType field reports the name (IDA, IBRD, Blend, Not classified)."
      +}
    • changedInput schema / properties / region / description
      Previous value: -"Filter by World Bank region code. Valid codes: EAS (East Asia & Pacific), ECS (Europe & Central Asia), LCN (Latin America & Caribbean), MEA (Middle East & North Africa), NAC (North America), SAS (South Asia), SSF (Sub-Saharan Africa)."New value: +"Filter by World Bank region code. A country's region.id is one of EAS (East Asia & Pacific), ECS (Europe & Central Asia), LCN (Latin America & Caribbean), MEA (Middle East, North Africa, Afghanistan & Pakistan), NAC (North America), SAS (South Asia), or SSF (Sub-Saharan Africa). Any other World Bank region or grouping code also filters, by membership: AFE (Africa Eastern and Southern), AFW (Africa Western and Central), ARB (Arab World), EUU (European Union), LDC (Least developed countries), and the rest of the codes the World Bank publishes for regions."
    • changedOutput schema / properties / countries / items / properties / lendingType / description
      Previous value: -"World Bank lending type classification."New value: +"World Bank lending type name: IDA, IBRD, Blend, or Not classified (lending_type filters by the codes IDX, IBD, IDB, LNX). Aggregates report Aggregates."
  3. Changed2 schema fields changed
    • changedOutput schema / properties / currentPage / description
      Previous value: -"Current page number."New value: +"Page number requested — past totalPages when the request ran off the end."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Context for an empty page: which filters matched nothing, or the page range that exists when the requested page is past the end.",
      +  "type": "string"
      +}
  4. 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": [
      +      "countries",
      +      "totalCount",
      +      "currentPage",
      +      "totalPages"
      +    ]
      +  },
      +  {
      +    "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: `invalid_filter`: An invalid region or income_level code was provided. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_filter"
      +          ],
      +          "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: -[
      -  "countries",
      -  "totalCount",
      -  "currentPage",
      -  "totalPages"
      -]
  5. Changed7 schema fields changed
    • addedOutput schema / properties / currentPage
      Added value: +{
      +  "description": "Current page number.",
      +  "type": "number"
      +}
    • removedOutput schema / properties / page
      Removed value: -{
      -  "description": "Current page number.",
      -  "type": "number"
      -}
    • removedOutput schema / properties / pages
      Removed value: -{
      -  "description": "Total number of pages.",
      -  "type": "number"
      -}
    • removedOutput schema / properties / total
      Removed value: -{
      -  "description": "Total matching entries before pagination (includes aggregates if include_aggregates=true).",
      -  "type": "number"
      -}
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Total matching entries before pagination (includes aggregates if include_aggregates=true).",
      +  "type": "number"
      +}
    • addedOutput schema / properties / totalPages
      Added value: +{
      +  "description": "Total number of pages.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "countries",
      -  "total",
      -  "page",
      -  "pages"
      -]New value: +[
      +  "countries",
      +  "totalCount",
      +  "currentPage",
      +  "totalPages"
      +]
  6. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so the safety profile is covered. The description adds valuable behavior: filters combine by AND, aggregates are excluded by default, and include_aggregates changes the result set. These are behaviors not in the annotations and are useful for correct invocation.

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, front-loaded with purpose, then filters, then the default behavior. No filler or repetition. Every sentence adds new information, and the structure is efficient.

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 listing tool with 6 optional parameters, the description explains filtering semantics, default behavior, and the effect of include_aggregates. Since an output schema is present, return values need not be described. The description covers all key behavioral aspects needed for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so the baseline is 3. The description adds the AND combination logic and the default exclusion of aggregates, which are not in the schema. It also clarifies the lending_type mapping to codes, though the schema already lists those. This extra context lifts it above baseline.

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 lists countries and regional aggregates with specific metadata fields (ISO codes, region, income level, etc.), and the verb 'List' distinguishes it from sibling tools like worldbank_get_country or worldbank_get_data. It is specific about what resource it returns and the scope.

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?

The description implies when to use it (to list countries vs. fetching a single country or data series) but does not explicitly name alternatives or state when not to use it. The guidance is implicit from the verb and resource, but there is no explicit routing to 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.