GnistAI GnistAI
Log in

Phone Number Validation

Phone number validation and parsing — country detection, number type, formatting.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Utilities

Data source: Curated dataset (ITU numbering plans)

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/phone-validation/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-phone-validation": {
      "url": "https://context.gnist.ai/mcp/phone-validation/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/phone-validation/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "validate_phone_number", "arguments": {"number": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/phone-validation/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/phone-validation/validate_phone_number?number=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/phone-validation/validate_phone_number",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "number": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc phone-validation

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

validate_phone_number
Validate and parse a phone number.
ParameterTypeRequiredDescription
numberstringrequiredPhone number to validate (E.164, international, or national format, e.g. +14155551234, 00441234567890).
format_phone_number
Format a phone number in the specified style.
ParameterTypeRequiredDescription
numberstringrequiredPhone number to format.
fmtstringoptionalOutput format: e164, international, or national. (default: "e164")
list_calling_codes
List all known country calling codes with metadata.
get_calling_code
Get calling code details for a specific country.
ParameterTypeRequiredDescription
country_codestringrequiredISO 3166-1 alpha-2 country code (e.g. US, GB, NO, DE).
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related