Skip to main content
Glama

Normalize phone number (E.164)

normalize_phone

Use this when you need a phone number in E.164 format with its country and line type (MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, TOLL_FREE, VOIP, ...) before storing, deduplicating or dialing it. Works for every country with a calling code, offline, using Google libphonenumber metadata via libphonenumber-js. Give defaultCountry for numbers written without an international prefix. Invalid numbers are a valid (charged) answer with a reason code; it does not check whether the line is in service.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "normalize_phone"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNoBatch mode: up to 500 items, each with the same fields as a single call. Omit when validating a single value through the top-level fields.
phoneNoPhone number as written, e.g. "+52 55 1234 5678", "(415) 555-2671", "0049 30 901820". International prefix optional when defaultCountry is given.
defaultCountryNoISO 3166-1 alpha-2 country assumed when the number has no + prefix, e.g. "MX", "US", "ES".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the offline execution model and data source (libphonenumber metadata via libphonenumber-js), the cost model ('invalid numbers are a valid (charged) answer'), and the correctness boundary (no line-in-service check). These are traits an agent could not infer from 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?

Four sentences, front-loaded with the when-to-use trigger, then mechanism, then the parameter hint, then the caveat. Dense but every sentence contributes distinct information; nothing is repeated from the schema verbatim.

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?

For a stateless, offline converter with no output schema, the description covers inputs, the returned fields, the failure shape ('reason code'), and the cost implication. There is no output schema to defer to, and the description fills that gap by enumerating the line-type vocabulary.

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%, including examples for 'phone' and the ISO alpha-2 semantics of 'defaultCountry', so the baseline is 3. The description reinforces defaultCountry for numbers written without an international prefix but adds no syntax or format detail beyond the schema, and never mentions the batch 'items' path.

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 ('normalize phone number') and names the exact output contract (E.164 plus country and line type with enumerated example values). This clearly separates it from the validate_* siblings, which operate on other identifiers, and an agent knows what artifact comes back.

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?

Opens with an explicit when-to-use clause tied to concrete downstream tasks ('before storing, deduplicating or dialing it') and adds a when-not boundary ('it does not check whether the line is in service'). It does not point at any alternative tool, but no sibling performs phone normalization, so the routing gap is small.

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.