# `worldbank__worldbank_get_country`

**Get World Bank Country**

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.

- Server: [World Bank](https://gateway.mcpharbor.dev/docs/servers/worldbank) (`dev.mcpharbor.gateway/worldbank`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/worldbank`
- Upstream tool: exposed by the provider; called through this gateway as `worldbank__worldbank_get_country`
- Provider terms: <https://data.worldbank.org/summary-terms-of-use> (verified 2026-09-19)
- Upstream API documentation: <https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation>
- Rate limit: 500 requests per minute
- Attribution required: "The World Bank: Dataset name: Data source (if known)"; same acknowledgment must be passed to sub-licensees

## Parameters

- `country_code` (string, required): 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.

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: worldbank__worldbank_get_country
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "country_code": "example"
    },
    "name": "worldbank__worldbank_get_country"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider requires the attribution below wherever you use results from its tools.
Reproduce it verbatim:

> "The World Bank: Dataset name: Data source (if known)"; same acknowledgment must be passed to sub-licensees

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "annotations": {
    "idempotentHint": true,
    "openWorldHint": true,
    "readOnlyHint": true
  },
  "description": "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.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "country_code": {
        "description": "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.",
        "pattern": "^[A-Za-z0-9]{2,3}$",
        "type": "string"
      }
    },
    "required": [
      "country_code"
    ],
    "type": "object"
  },
  "name": "worldbank__worldbank_get_country",
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "anyOf": [
      {
        "not": {
          "required": [
            "error"
          ]
        },
        "required": [
          "id",
          "iso2",
          "name",
          "region",
          "incomeLevel",
          "lendingType",
          "capitalCity",
          "longitude",
          "latitude",
          "isAggregate"
        ]
      },
      {
        "required": [
          "error"
        ]
      }
    ],
    "properties": {
      "capitalCity": {
        "description": "Capital city name (empty for aggregates).",
        "type": "string"
      },
      "error": {
        "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. `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.",
                "examples": [
                  "country_not_found",
                  "multiple_countries"
                ],
                "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"
      },
      "id": {
        "description": "Country or aggregate ID.",
        "type": "string"
      },
      "incomeLevel": {
        "additionalProperties": false,
        "description": "World Bank income classification.",
        "properties": {
          "id": {
            "description": "Income level code.",
            "type": "string"
          },
          "name": {
            "description": "Income level name.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "isAggregate": {
        "description": "True when this entry is a regional or income-group aggregate.",
        "type": "boolean"
      },
      "iso2": {
        "description": "ISO2 country code.",
        "type": "string"
      },
      "latitude": {
        "description": "Capital latitude (empty for aggregates).",
        "type": "string"
      },
      "lendingType": {
        "description": "World Bank lending type classification.",
        "type": "string"
      },
      "longitude": {
        "description": "Capital longitude (empty for aggregates).",
        "type": "string"
      },
      "name": {
        "description": "Country or aggregate name.",
        "type": "string"
      },
      "region": {
        "additionalProperties": false,
        "description": "World Bank region this country belongs to.",
        "properties": {
          "id": {
            "description": "Region code.",
            "type": "string"
          },
          "name": {
            "description": "Region name.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      }
    },
    "type": "object"
  },
  "title": "Get World Bank Country"
}
```
