Data source: Curated dataset (ITU numbering plans)
https://context.gnist.ai/mcp/phone-validation/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (5)
validate_phone_numberValidate and parse a phone number.
Returns country, number type (mobile/landline/toll_free/premium), and formatted versions (E.164, international, national).
| Parameter | Type | Required | Description |
|---|---|---|---|
number | string | required | Phone number to validate (E.164, international, or national format, e.g. +14155551234, 00441234567890). |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "validate_phone_number",
"arguments": {
"number": "123456789"
}
}
}format_phone_numberFormat a phone number in the specified style.
Returns the number formatted as E.164 (+1234567890), international (+1 234 567 890), or national (0234 567 890).
| Parameter | Type | Required | Description |
|---|---|---|---|
number | string | required | Phone number to format. |
fmt | string | optional | Output format: e164, international, or national. (default: "e164") |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "format_phone_number",
"arguments": {
"number": "123456789"
}
}
}list_calling_codesList all known country calling codes with metadata.
Returns calling code, country name, trunk prefix, number length ranges, and example numbers for ~50 countries.
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "list_calling_codes",
"arguments": {}
}
}get_calling_codeGet calling code details for a specific country.
Returns calling code, trunk prefix, number length, example numbers, and known prefix patterns for mobile/landline.
| Parameter | Type | Required | Description |
|---|---|---|---|
country_code | string | required | ISO 3166-1 alpha-2 country code (e.g. US, GB, NO, DE). |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "get_calling_code",
"arguments": {
"country_code": "NO"
}
}
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "report_feedback",
"arguments": {
"feedback": "example"
}
}
}Quick Start
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"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/phone-validation/",
headers={"Gnist-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "validate_phone_number",
"arguments": {
"number": "example"
}
}
},
)
print(resp.json())