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
| Name | Required | Description | Default |
|---|---|---|---|
| delay | No | Delay in milliseconds | |
| instanceName | Yes | Instance name | |
| number | Yes | Recipient phone number | |
| text | Yes | Message text |
Implementation Reference
- src/index.ts:633-647 (handler)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) } ] }; }
- src/index.ts:99-112 (schema)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);
- src/services/evolution-api.ts:80-88 (helper)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; }