Skip to main content
Glama

Cofferdock

Validate and format a phone number

validate_phone
Idempotent

Validate and format a phone number. Validates an international phone number and returns it in E.164 and international formats, with its country and type (mobile, fixed line...). Give country (2-letter code) for numbers without the + prefix.

Costs 1 credit per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phoneYesThe phone number to validate. Use the international format with the country code, e.g. "+34600000000".
countryNoISO 3166-1 alpha-2, e.g. "ES", "GB".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral context: it costs 1 credit per call, which is important for an agent deciding whether to invoke it. It also discloses the return format (E.164, international, country, type), which goes beyond the schema.

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?

The description is compact and front-loaded: it states the core action first, then the output details, then the parameter guidance, then the cost. Every sentence earns its place, and the credit cost is a valuable operational detail.

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?

For a simple validation tool with 2 parameters, full schema coverage, and idempotent annotations, the description is nearly complete. It covers the return value, the country parameter's purpose, and the cost. It doesn't describe error behavior (e.g., invalid number), but that's a minor gap for a validation tool.

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 the schema already documents both parameters well. The description adds a small but useful semantic detail: the country parameter is for numbers without the + prefix, which clarifies when to supply it. This is a modest addition over the schema, so a 3 is appropriate.

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?

The description clearly states the tool validates and formats a phone number, and specifies the outputs: E.164 and international formats, country, and type. It distinguishes itself from sibling validation tools (validate_email, validate_iban) by focusing on phone numbers and mentioning the country parameter for numbers without the + prefix.

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?

The description gives clear context on when to use the tool: for validating international phone numbers, and it explains the country parameter's role for numbers without the + prefix. It doesn't explicitly name alternatives or exclusions, but the sibling list makes the domain clear. The credit cost is a useful operational guideline.

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