Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

send_text

Send WhatsApp messages using Evolution API, including predefined templates for business communications like order confirmations and appointment reminders.

Instructions

Send a text message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
delayNoDelay in milliseconds
instanceNameYesInstance name
numberYesRecipient phone number
textYesMessage text

Implementation Reference

  • MCP tool handler for 'send_text': extracts arguments, calls evolutionAPI.sendText, formats and returns the result as MCP content.
    private async handleSendText(args: any) {
      const result = await evolutionAPI.sendText(args.instanceName, {
        number: args.number,
        text: args.text,
        delay: args.delay
      });
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Tool definition including name, description, and input schema for validation.
    {
      name: 'send_text',
      description: 'Send a text message',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name' },
          number: { type: 'string', description: 'Recipient phone number' },
          text: { type: 'string', description: 'Message text' },
          delay: { type: 'number', description: 'Delay in milliseconds' }
        },
        required: ['instanceName', 'number', 'text']
      }
    },
  • src/index.ts:498-499 (registration)
    Registration in the tool dispatch switch statement within CallToolRequestSchema handler.
    case 'send_text':
      return await this.handleSendText(args);
  • Helper method in EvolutionAPI service that sends HTTP POST request to the underlying Evolution API endpoint for sending text messages.
    async sendText(instanceName: string, data: {
      number: string;
      text: string;
      delay?: number;
      linkPreview?: boolean;
    }): Promise<Message> {
      const response = await this.client.post(`/message/sendText/${instanceName}`, data);
      return response.data;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.5/5.0
Behavior2/5

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

No annotations provided; description does not disclose any behavioral traits such as required authentication, message length limits, or side effects. It only states the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no waste, but it is too brief given the complexity and sibling context. It does not earn its place fully as it lacks valuable information.

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?

No output schema and minimal description leave many questions: what is returned? Any validation? For a 4-parameter tool, this is insufficient.

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% with parameter descriptions, but the description adds no additional meaning beyond what is in the schema. Baseline 3 is appropriate.

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

Purpose3/5

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

Description states 'Send a text message' which clearly names the action and resource, but does not differentiate from sibling tools like send_media or send_list. It lacks specificity about the platform or context.

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 on when to use this tool versus alternatives. With many sibling messaging tools, explicit usage context is needed.

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