Skip to main content
Glama

AgentStall: Africa and global data for agents

South African phone number formatting and validation (+27)

za_normalize_phone
Read-onlyIdempotent

South African phone number formatting and classification: converts an SA number in any common format to international +27 (E.164) and local formats, and says whether it is mobile, landline (with area for major cities), toll-free, VoIP or premium-rate. Useful for cleaning contact lists, SMS and WhatsApp messaging, and form validation. Returns JSON with valid, e164, national, type. Read-only; invalid input is rejected before any charge. Price: $0.001 USDC per call (x402, Base mainnet), paid only when the call succeeds.

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

Input Schema

NameRequiredDescriptionDefault
numberYesPhone number in any common format, e.g. 082 123 4567 or +27 11 555 1234

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 readOnlyHint, idempotentHint and closed-world behavior, so the safety profile is covered. The description goes further by disclosing the response fields (valid, e164, national, type), the rejection of invalid input, and the paid-per-successful-call billing model with price and network — meaningful operational context an agent cannot get from annotations.

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?

It is front-loaded with what the tool does and what it returns, then closes with cost and payment mechanics. It is somewhat dense, but every clause (classification types, return fields, billing) carries information an agent needs.

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 no output schema, the description compensates by listing the four returned fields and the full set of classification categories. Pricing, payment rail and failure behavior are also covered, which is everything needed to call a single-parameter formatter correctly.

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% and the single `number` parameter already carries an example format, so the schema does the heavy lifting. The description restates 'any common format' and adds E.164/national output formats, which is helpful but largely duplicative of the schema text.

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 names a specific verb set (converts/formats/classifies) and a specific resource (South African phone numbers), and enumerates the classification outputs (mobile, landline with area, toll-free, VoIP, premium-rate). This clearly separates it from the sibling validators for ID numbers, company numbers and tax numbers.

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?

It gives concrete use contexts: cleaning contact lists, SMS and WhatsApp messaging, and form validation. It does not explicitly state when-not to use it or name a sibling alternative, but for a single-purpose formatter the usage boundary is unambiguous.

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