format_phone
Parse and validate phone numbers, then format them into E.164, national, and international formats while identifying the country.
Instructions
Parse and format a phone number into E.164, national, and international formats. Validates the number and identifies the country.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"phone": "<phone>"
},
"name": "format_phone"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phone | Yes | Phone number (e.g., "+1 (212) 555-1234") | |
| country_code | No | ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "DE"). Default: "US" |