Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

check_number

Verify phone numbers to determine WhatsApp account status for business messaging, ensuring messages reach valid contacts.

Instructions

Check if phone numbers have WhatsApp

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNameYesInstance name
numbersYesPhone numbers to check

Implementation Reference

  • The primary MCP tool handler for 'check_number'. It calls the EvolutionAPI service to check WhatsApp status for given phone numbers and returns the result as formatted JSON text.
    private async handleCheckNumber(args: any) {
      const result = await evolutionAPI.checkNumberStatus(args.instanceName, args.numbers);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Tool definition including name, description, and input schema for validation.
    {
      name: 'check_number',
      description: 'Check if phone numbers have WhatsApp',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name' },
          numbers: {
            type: 'array',
            items: { type: 'string' },
            description: 'Phone numbers to check'
          }
        },
        required: ['instanceName', 'numbers']
      }
    },
  • src/index.ts:526-527 (registration)
    Registration of the tool handler in the MCP call tool request switch statement.
    case 'check_number':
      return await this.handleCheckNumber(args);
  • Supporting method in EvolutionAPI service that makes the actual HTTP POST request to the backend API endpoint /chat/checkNumberStatus/{instanceName} to check number statuses.
    async checkNumberStatus(instanceName: string, numbers: string[]): Promise<any[]> {
      const response = await this.client.post(`/chat/checkNumberStatus/${instanceName}`, { numbers });
      return response.data;
    }
  • HTTP API route handler for checking numbers (POST /check-numbers), which cleans numbers and calls the same EvolutionAPI method. Related but separate from MCP tool.
    router.post('/check-numbers', async (req, res) => {
      try {
        const { instanceName, numbers } = req.body;
        
        if (!instanceName || !numbers || !Array.isArray(numbers)) {
          res.status(400).json({ 
            error: 'Missing required fields: instanceName, numbers (array)' 
          });
          return;
        }
    
        const cleanNumbers = numbers.map(n => n.replace(/[\s\-\+\(\)]/g, ''));
        const result = await evolutionAPI.checkNumberStatus(instanceName, cleanNumbers);
        
        res.json(result);
      } catch (error: any) {
        res.status(500).json({ error: error.message });
      }
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It doesn't disclose behavioral traits like whether this is a read-only operation, what permissions are needed, how results are returned, rate limits, or what 'checking' actually involves (e.g., real-time verification vs cached data). The description is too minimal for a tool with no annotation support.

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 - a single sentence that states the core purpose without any wasted words. It's front-loaded with the essential information and earns its place efficiently.

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

Completeness2/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 is incomplete. It doesn't explain what the tool returns (e.g., boolean results per number, status details), error conditions, or how it interacts with the WhatsApp system. For a verification tool in a WhatsApp API context, more context is needed.

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 (instanceName and numbers). The description doesn't add any meaning beyond what's in the schema - it doesn't explain format requirements for phone numbers or what 'instanceName' refers to in this context.

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: checking if phone numbers have WhatsApp. It uses a specific verb ('check') and resource ('phone numbers'), but doesn't differentiate from siblings like 'list_contacts' or 'get_chats' which might provide related contact information.

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?

No guidance is provided about when to use this tool versus alternatives. There's no mention of prerequisites (like needing an active instance), comparison to sibling tools, or context about what 'checking' entails beyond the basic purpose.

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

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