Skip to main content
Glama

Phone number

validate_phone_number
Read-onlyIdempotent

Validate and format a phone number. A valid number also has e164, national, international, country, type and, from libphonenumber's numbering-plan data in English: carrier, the operator the number range was first allocated to (numbering-plan data, not a live HLR lookup: a ported number may now be with another operator; null for landlines and where unknown); timezones, IANA zone ids ([] when unknown; a number with no geographic tie, such as most mobiles, gets its country's zones); location, the area of a geographic number (a city or region, e.g. "San Francisco, CA"), else the country, null when unknown. An invalid number has only valid and possible; one that does not parse, valid and reason. Works without a key within a daily free quota.

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_number"
  }
}

Input Schema

NameRequiredDescriptionDefault
numberYesE.164 with a leading +, or national with country; in a URL query send the + as %2B
countryNoDefault region for numbers without a + prefix

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare it as a read-only, idempotent, non-open-world call; the description goes well beyond them by describing the returned shape in each outcome branch (valid, invalid, unparseable). It also discloses substantive caveats an agent would otherwise get wrong: carrier comes from static numbering-plan data rather than a live HLR lookup, so ported numbers may be stale, and timezones/location can be null or fall back to country. It stops short of describing the individual return types or ordering of response fields, but the caveats are genuinely informative.

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?

The purpose is front-loaded and there is no filler; every clause carries real information, including the per-outcome return shapes and the caveats on carrier, timezones and location. The deduction is for packaging: the second sentence runs roughly a hundred words with deeply nested parentheses and semicolons, which makes it hard to scan and buries the key caveats mid-clause.

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-value burden, and it does: it enumerates the fields on a valid result, the reduced field set on an invalid one, and the different pair for a number that will not parse. Combined with the carrier, timezone and location caveats and the quota note, an agent has everything needed to call it correctly and interpret both success and failure.

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 in-schema, including the E.164-with-plus convention, the %2B URL encoding rule and the country default-region role. The description adds nothing about `number` or `country` beyond what the schema states, so the 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 pair up front ('Validate and format a phone number') and the description makes clear it also derives metadata. No sibling tool in the catalog touches phone numbers (the siblings are places, postal codes, timezones, countries), so there is no ambiguity to resolve.

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?

Usage is only implied: the tool takes a number and returns validity, with no explicit statement of when to call it versus doing something else, and no prerequisites such as 'use country only for numbers lacking a + prefix' routing guidance. The one usage-context note is operational ('works without a key within a daily free quota'), which is helpful but is not when-to-use guidance.

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