get_country

Pack: geo · Endpoint: https://gateway.pipeworx.io/geo/mcp

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/get_country for the schema, then POST the same URL with its arguments for the data.

Get country information by name or ISO code (e.g., ‘US’, ‘FR’). Returns capital, population, currency, languages, and neighboring countries. Use for regional context or facts.

Parameters

NameTypeRequiredDescription
code_or_namestringyesCountry name or ISO 3166-1 alpha-2/alpha-3 code

Example call

Arguments

{
  "code_or_name": "US"
}

curl

curl -X POST https://gateway.pipeworx.io/geo/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_country","arguments":{"code_or_name":"US"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_country', {
  "code_or_name": "US"
});

More examples

{
  "code_or_name": "France"
}

Response shape

Always returns: name, official_name, codes, capital, population, area_km2, region, subregion, languages, currencies, timezones

FieldTypeDescription
namestringCommon country name
official_namestringOfficial country name
codesobjectISO country codes
capitalstringCapital city or ‘N/A’
populationnumberTotal population
area_km2numberLand area in square kilometers
regionstringGeographic region
subregionstringGeographic subregion
languagesarrayList of official languages
currenciesarrayList of currencies with symbols
timezonesarrayList of timezones used in country
Full JSON Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Common country name"
    },
    "official_name": {
      "type": "string",
      "description": "Official country name"
    },
    "codes": {
      "type": "object",
      "description": "ISO country codes",
      "properties": {
        "alpha2": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 code"
        },
        "alpha3": {
          "type": "string",
          "description": "ISO 3166-1 alpha-3 code"
        }
      },
      "required": [
        "alpha2",
        "alpha3"
      ]
    },
    "capital": {
      "type": "string",
      "description": "Capital city or 'N/A'"
    },
    "population": {
      "type": "number",
      "description": "Total population"
    },
    "area_km2": {
      "type": "number",
      "description": "Land area in square kilometers"
    },
    "region": {
      "type": "string",
      "description": "Geographic region"
    },
    "subregion": {
      "type": "string",
      "description": "Geographic subregion"
    },
    "languages": {
      "type": "array",
      "description": "List of official languages",
      "items": {
        "type": "string"
      }
    },
    "currencies": {
      "type": "array",
      "description": "List of currencies with symbols",
      "items": {
        "type": "string"
      }
    },
    "timezones": {
      "type": "array",
      "description": "List of timezones used in country",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "name",
    "official_name",
    "codes",
    "capital",
    "population",
    "area_km2",
    "region",
    "subregion",
    "languages",
    "currencies",
    "timezones"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "geo": {
      "url": "https://gateway.pipeworx.io/geo/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build September 22, 2026