Skip to main content
Glama

validate_phone

Validate global phone numbers to confirm E.164 format, identify country, carrier, and line type for accurate communication and data processing.

Instructions

Validate any phone number globally. Returns E.164 format, country, carrier, line type. Cost: $0.001 USDC. Service: phonevalidator.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phoneYes
country_hintNoISO 2-letter code e.g. IN, US

Implementation Reference

  • The tool 'validate_phone' is dynamically fetched from a registry URL and executed via this request handler. It is not statically implemented in the codebase.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      let registry: Registry;
      try {
        registry = await fetchRegistry();
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({ error: "Failed to fetch tool registry", detail: String(error) }),
            },
          ],
        };
      }
    
      const tool = registry.tools.find((t) => t.name === name);
      if (!tool) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: `Tool '${name}' not found`,
                available_tools: registry.tools.map((t) => t.name),
              }),
            },
          ],
        };
      }
    
      try {
        const result = await callTool(tool, args as Record<string, unknown>);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: "Tool call failed",
                tool: name,
                service: tool.service,
                detail: String(error),
              }),
            },
          ],
        };
      }
    });
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It usefully adds cost information ('Cost: $0.001 USDC') and service provider context ('Service: phonevalidator'), which are important behavioral traits not captured elsewhere. However, it doesn't mention rate limits, authentication requirements, or error handling.

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 extremely concise and front-loaded with the core purpose. Every sentence earns its place: the first states the function, the second lists outputs, and the third provides cost/service context. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description does an adequate job for a validation tool. It specifies what the tool does and what it returns, plus cost information. However, it lacks details about error conditions, response format, or limitations that would be helpful for an agent.

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 50% (only 'country_hint' has a description). The description doesn't add any parameter-specific information beyond what's in the schema. It mentions phone number validation generally but doesn't clarify format expectations for the 'phone' parameter or how 'country_hint' affects validation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Validate any phone number globally' with specific outputs listed (E.164 format, country, carrier, line type). It uses a specific verb ('Validate') and resource ('phone number'), but doesn't distinguish from siblings since there are no obvious phone-related tools in the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions cost and service provider details, but doesn't indicate scenarios where this validation is appropriate or when other tools might be better suited for related tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yantrix-ai/yantrix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server