Skip to main content
Glama

Phone number validation: valid, E.164 format, country and line type

phone_validate
Read-only

Validate and format a phone number with the libphonenumber rules: whether it is valid and possible, the E.164 form, international and national formatting, country, calling code and line type (mobile, fixed-line, toll-free, VoIP…). Give +country code, or a national number and a two-letter country. Offline: nothing is sent and it does not say the line is in service. Use to clean contact lists or check a number before an SMS. Example: number=+1 650-253-0000. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
numberYesPhone number, ideally with +country code
countryNoTwo-letter country for national numbers without +code (US, GB, SE…)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/destructive/idempotent, and the description adds matters the agent genuinely cannot infer: the operation is fully offline with nothing transmitted, it does not confirm the line is in service, and every call is billed so repeats are not free — which concretely explains the idempotentHint=false. The pricing model (first 25 free, failed calls free, x402/card key) is real operational context. Minor tension with openWorldHint=true, since the description emphasizes offline behaviour, but it does not contradict any safety hint.

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-loaded with purpose and return fields, then input rule, then caveats, example and cost. Sentences are dense but each carries distinct information; nothing repeats the schema or annotations verbatim.

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?

There is no output schema, so the description must carry the return shape — and it does, listing every field the caller gets. Inputs, caveats, example and cost are all covered, so an agent can call this correctly without further information.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds the relational rule between the two parameters — country is only needed for national numbers lacking a +code — which the per-field schema text does not express. The worked example ('number=+1 650-253-0000') further pins down the expected format.

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?

Names a specific verb and resource ('Validate and format a phone number') and enumerates exactly what comes back: validity, possible, E.164, international/national formatting, country, calling code and line type. That output list cleanly separates it from the other validators in the sibling set (validate_iban, validate_isbn, validate_luhn, vin).

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?

'Use to clean contact lists or check a number before an SMS' gives concrete selection contexts, and 'Give +country code, or a national number and a two-letter country' states the input rule. It also bounds expectations ('it does not say the line is in service'), which effectively rules out carrier-lookup use cases. No explicit naming of alternatives, so not a 5.

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.