validate_phone
Validate global phone numbers to confirm E.164 format, identify country, carrier, and line type for accurate communication and data processing.
Instructions
Validate any phone number globally. Returns E.164 format, country, carrier, line type. Cost: $0.001 USDC. Service: phonevalidator.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | Yes | ||
| country_hint | No | ISO 2-letter code e.g. IN, US |
Implementation Reference
- src/index.ts:166-223 (handler)The tool 'validate_phone' is dynamically fetched from a registry URL and executed via this request handler. It is not statically implemented in the codebase.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; let registry: Registry; try { registry = await fetchRegistry(); } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Failed to fetch tool registry", detail: String(error) }), }, ], }; } const tool = registry.tools.find((t) => t.name === name); if (!tool) { return { content: [ { type: "text", text: JSON.stringify({ error: `Tool '${name}' not found`, available_tools: registry.tools.map((t) => t.name), }), }, ], }; } try { const result = await callTool(tool, args as Record<string, unknown>); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: JSON.stringify({ error: "Tool call failed", tool: name, service: tool.service, detail: String(error), }), }, ], }; } });