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; }

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