Skip to main content
Glama

Phone Number Validation

phone_validate
Read-only

Parse and validate any phone number worldwide using libphonenumber. Returns is_valid, e164 (canonical international format e.g. '+4917612345678'), national_format, country_code (ISO alpha-2), and line_type (MOBILE/FIXED_LINE/VOIP/TOLL_FREE). Provide country_code hint (e.g. 'DE') for local numbers without country prefix. Price: $0.0045 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"phone":"+41 44 668 18 00"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phoneYesPhone number to validate. Can be in any format: E.164 ('+4915123456789'), national ('015123456789'), or international ('0049 151 23456789'). Include country code (+ prefix) for best results.
country_codeNoISO 3166-1 alpha-2 country code hint for parsing national numbers without country prefix (e.g. 'DE' for Germany, 'US' for United States). Optional if number includes country code (+...).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/openWorld/non-destructive annotations by disclosing the cost ($0.0045 USDC per call), the payment rail (x402 on Base, Solana, Polygon, Arbitrum), and that x402 MCP clients settle automatically. This payment context is essential and not present in any structured field.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose, then returns, then parameter hint, then pricing/payment, then sample. Each sentence adds distinct, needed information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description fully specifies the response shape (is_valid, e164, national_format, country_code, line_type) and covers payment and usage, leaving nothing an agent needs before invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameters are already fully documented. The description restates the country_code hint and gives an example ('DE') but adds no format or behavioral nuance beyond the schema, matching the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (parse and validate) plus resource (phone number worldwide) and names the underlying library (libphonenumber), and enumerates the exact return fields. No sibling overlap in this toolset, so it is immediately distinguishable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear conditional guidance for the optional parameter ('Provide country_code hint for local numbers without country prefix') and a concrete free-sample entry point, but offers no explicit when-not or alternative-tool routing (e.g., vs email_validate or a generic text parser).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources