geo_get_country

Pack: geo · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/geo_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":"geo_get_country","arguments":{"code_or_name":"US"}}}'

TypeScript (@pipeworx/sdk)

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

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

More examples

{
  "code_or_name": "France"
}

Response shape

Full JSON Schema
{
  "type": "object",
  "oneOf": [
    {
      "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"
          }
        },
        "population_year": {
          "type": "string"
        },
        "latlng": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "borders": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tld": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "flag_image": {
          "type": "string"
        },
        "found": {
          "type": "boolean",
          "enum": [
            true
          ],
          "description": "Present and true on an answer; a miss is the found:false branch."
        }
      },
      "required": [
        "name",
        "official_name",
        "codes",
        "capital",
        "population",
        "area_km2",
        "region",
        "subregion",
        "languages",
        "currencies"
      ]
    },
    {
      "type": "object",
      "description": "A miss or an unavailable upstream: found:false with a reason and a hint (the shape check-found-false-schemas.mjs expects).",
      "properties": {
        "found": {
          "type": "boolean",
          "enum": [
            false
          ]
        }
      },
      "required": [
        "found"
      ]
    }
  ]
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the geo pack
{
  "mcpServers": {
    "geo": {
      "url": "https://gateway.pipeworx.io/geo/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 15, 2026