Skip to main content
Glama

Agent Data Hub

Phone number validation and formatting

validate_phone
Read-onlyIdempotent

Validate and normalise any phone number worldwide (Google libphonenumber metadata). Returns valid/possible, line type (mobile, fixed line, toll free, VoIP…), E.164, international and national format, country and calling code. Pass a country code for numbers written in national format. Price: $0.002 per call (USDC on Base via x402); the first 10 calls per day are free.

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": "validate_phone"
  }
}

Input Schema

NameRequiredDescriptionDefault
numberYesPhone number, e.g. +971 50 123 4567 or 050 123 4567
countryNoOptional default country (ISO code) for national-format numbers

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial context beyond the readOnly/idempotent annotations: it enumerates returned fields (valid/possible, line type, E.164, international and national formats, country, calling code) with no output schema present, and discloses the x402 pricing model ($0.002 per call, first 10/day free), which is a cost signal an agent cannot infer from structured fields.

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?

Three sentences ordered by importance: capability and scope, expected return payload, parameter guidance, then cost. Every clause carries information and nothing is repeated from the schema or annotations.

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 only two parameters and no output schema, the description's job is to explain what comes back and what it costs, and it does both. An agent has everything needed to decide to call it, supply arguments correctly, and anticipate the billing implication.

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 is 3, but the description adds meaning by clarifying that the country parameter is needed specifically for national-format numbers rather than being a general override. It does not restate format examples already present in the schema, keeping the addition substantive.

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 pair ('validate and normalise') on a specific resource ('any phone number worldwide') and names the underlying metadata source (Google libphonenumber). This is unambiguously distinct from the chain_*, company_*, and crypto_* siblings.

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 a clear conditional rule for the optional parameter: 'Pass a country code for numbers written in national format,' which tells the agent exactly when national-format input needs disambiguation. It stops short of explicit when-not-to-use guidance or naming an alternative tool, but none of the siblings perform phone validation so no exclusion is genuinely needed.

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