Skip to main content
Glama

Check a phone number's validity and format

phone
Read-only

Checks and formats a phone number with libphonenumber: valid and possible flags, E.164, international and national formats, country, calling code and line type (mobile, fixed line, toll free and so on). Without a + sign, give the country. No network call. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

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": {
      "number": "<number>"
    },
    "name": "phone"
  }
}

Input Schema

NameRequiredDescriptionDefault
numberYesPhone number, e.g. +44 20 7946 0958
countryNoISO alpha-2 default country when the number has no +, e.g. DE

Output Schema

NameRequiredDescriptionDefault
e164No
typeNo
inputNo
validNo
sourceNo
countryNo
nationalNo
possibleNo
checkedAtNo
callingCodeNo
internationalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Goes well past the annotations by disclosing that the check is offline ('No network call'), that it is priced at $0.002 per successful call via x402 with specific chains, and that failed calls are not charged. Cost and failure-billing behavior are exactly the kind of facts an agent cannot infer from readOnlyHint/openWorldHint and must know before invoking a paid tool.

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

Conciseness4/5

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

Front-loads the core capability, then the country rule, then the commercial terms — a logical order with no filler. The pricing clause is long and parenthetical-heavy, but every element (price, payment rail, failure exemption) is decision-relevant, so trimming would cost information.

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

Completeness4/5

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

With an output schema present, the description needn't explain return values, and it covers the remaining gaps: offline nature, cost, and the country fallback. Only minor items are absent, such as rate limits or what 'possible' vs 'valid' means, which the output schema likely resolves.

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 coverage is 100%, so both parameters are already documented, and the description's country rule ('Without a + sign, give the country') largely restates the schema's 'default country when the number has no +'. Baseline 3 is appropriate since the schema does the heavy lifting and the description adds little new syntax or format detail.

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 and resource ('Checks and formats a phone number with libphonenumber') and then enumerates the exact outputs — valid/possible flags, E.164, international/national formats, country, calling code, line type. That enumeration makes the tool unmistakable next to siblings like email_check or address_parse without needing to open the schema.

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

Usage Guidelines3/5

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

Gives one actionable usage rule — 'Without a + sign, give the country' — which tells the agent how to satisfy the required-input contract. It offers no when-to-use/when-not framing and no explicit routing to alternatives, so usage is implied rather than guided.

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