Skip to main content
Glama

Validate and parse a phone number

data_validate_phone
Read-onlyIdempotent

Check one phone number offline against the country's numbering plan (Google libphonenumber metadata): valid or not, E.164 form, national and international format, country, calling code and type (mobile, fixed_line, toll_free, premium_rate, voip and more). It does not show whether the number is in service or who holds it. Costs 0 credits.

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

Input Schema

NameRequiredDescriptionDefault
numberYesThe phone number, best with + and the country code, such as +44 20 7946 0958.
countryNoOptional two-letter ISO country code for a number written without + and its country code, such as US or VN.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld=false, and the description adds real context beyond them: the check is offline, sourced from Google libphonenumber metadata, costless (0 credits), and explicitly capped in scope. It does not say what happens on a malformed or unparsable input, which is the remaining gap.

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-loaded with the core action, followed by a compact output enumeration and two short constraint sentences; nothing is padded. The long parenthetical type list is the only slightly heavy element.

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 no output schema, the description correctly enumerates the returned fields, and it discloses the negative space (not in service, not carrier data) plus cost. For a two-parameter read-only validator this is nearly complete; only input-failure behavior is unstated.

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 both parameters are already documented, including the "+ and country code" advice and the ISO country fallback. The description adds nothing further about parameter syntax or precedence beyond referencing the country's numbering plan, so baseline 3 applies.

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 ("Check one phone number offline against the country's numbering plan") and enumerates exactly what is returned: validity, E.164, national/international formats, country, calling code and type. The tool is unmistakable against the unrelated data_* 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?

Implies usage for single-number validation and parsing and rules out a nearby use case ("does not show whether the number is in service or who holds it"), which keeps an agent from calling it for carrier/liveness checks. No alternatives are named, but no sibling operates in this domain, so the exclusion carries the routing weight.

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.