Skip to main content
Glama
billyfranklim1

mcp-evolution

Check Number

check_number

Check whether phone numbers have active WhatsApp accounts. Returns existence status and JID for each number.

Instructions

Check whether phone numbers have WhatsApp accounts. Returns exists, jid, and number for each.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numbersYesArray of phone numbers to check (e.g. ['5511999999999']). Returns whether each number has WhatsApp and their JID.

Implementation Reference

  • The registerCheckNumber function is the main handler that registers the 'check_number' tool on the MCP server. It accepts a zod schema requiring an array of phone numbers, calls the Evolution API endpoint /chat/whatsappNumbers/{instanceName} to check if each number has WhatsApp, and returns the result (exists, jid, number) as JSON.
    import { z } from "zod";
    import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { McpError } from "@modelcontextprotocol/sdk/types.js";
    import type { EvolutionClient } from "../evolution-client.js";
    
    const schema = {
      numbers: z.array(z.string().min(1)).min(1).describe(
        "Array of phone numbers to check (e.g. ['5511999999999']). Returns whether each number has WhatsApp and their JID."
      ),
    };
    
    export function registerCheckNumber(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "check_number",
        {
          title: "Check Number",
          description: "Check whether phone numbers have WhatsApp accounts. Returns exists, jid, and number for each.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.post(`/chat/whatsappNumbers/${client.instanceName}`, {
              numbers: args.numbers,
            });
            return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
          } catch (e) {
            if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] };
            throw e;
          }
        }
      );
    }
  • The input schema defines a single required parameter 'numbers' as an array of non-empty strings, describing that it checks if each number has WhatsApp and returns their JID.
    const schema = {
      numbers: z.array(z.string().min(1)).min(1).describe(
        "Array of phone numbers to check (e.g. ['5511999999999']). Returns whether each number has WhatsApp and their JID."
      ),
    };
  • Import of registerCheckNumber from the check-number module.
    import { registerCheckNumber } from "./check-number.js";
  • Registration call: registerCheckNumber(server, client) invoked inside registerAllTools.
    registerCheckNumber(server, client);
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 for behavioral disclosure. It correctly implies a read-only check operation but does not explicitly state it is non-destructive, nor does it describe potential errors, rate limits, or permission requirements. The description adds minor value beyond schema by listing return fields.

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 a single, front-loaded sentence that immediately conveys the tool's action and output. Every word contributes meaning, with no redundancy or extraneous information.

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 the tool's simplicity (one parameter, no output schema, no annotations), the description provides a basic understanding. However, it lacks context about error handling, input validation, or operational dependencies (e.g., active session), which could lead to incorrect usage in edge cases.

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?

The schema coverage is 100%, with a clear description of the 'numbers' parameter and what it returns. The tool description adds only the specific return fields (exists, jid, number), which marginally enhances understanding but is already implied by the schema. Baseline of 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 explicitly states the verb 'Check' and the resource 'phone numbers' with respect to WhatsApp accounts. It specifies the return values (exists, jid, number), making the tool's purpose clear and distinct from sibling tools.

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 vs alternatives. There is no mention of prerequisites, typical use cases, or situations where the tool should not be used, leaving the agent to infer applicability from the name and limited context.

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/billyfranklim1/mcp-evolution'

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