send_list
Send interactive list messages via WhatsApp Business to present multiple options with titles, descriptions, and selectable rows for user interaction.
Instructions
Send interactive list message
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"instanceName": "<instanceName>",
"number": "<number>",
"sections": "<sections>"
},
"name": "send_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buttonText | No | Button text | |
| description | No | List description | |
| instanceName | Yes | Instance name | |
| number | Yes | Recipient phone number | |
| sections | Yes | List sections | |
| title | No | List title |
Implementation Reference
- src/index.ts:690-706 (handler)The primary handler function for the 'send_list' MCP tool. It processes the input arguments, calls the EvolutionAPI.sendList service method, and formats the response as MCP content.
private async handleSendList(args: any) { const result = await evolutionAPI.sendList(args.instanceName, { number: args.number, title: args.title, description: args.description, buttonText: args.buttonText, sections: args.sections }); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; } - src/index.ts:159-194 (registration)Registration of the 'send_list' tool in the MCP tools array. Defines the tool name, description, and complete input schema for validation.
{ name: 'send_list', description: 'Send interactive list message', inputSchema: { type: 'object', properties: { instanceName: { type: 'string', description: 'Instance name' }, number: { type: 'string', description: 'Recipient phone number' }, title: { type: 'string', description: 'List title' }, description: { type: 'string', description: 'List description' }, buttonText: { type: 'string', description: 'Button text' }, sections: { type: 'array', items: { type: 'object', properties: { title: { type: 'string' }, rows: { type: 'array', items: { type: 'object', properties: { title: { type: 'string' }, description: { type: 'string' }, rowId: { type: 'string' } } } } } }, description: 'List sections' } }, required: ['instanceName', 'number', 'sections'] } }, - src/index.ts:504-505 (handler)Dispatch case in the main CallToolRequest handler that routes 'send_list' calls to the specific handleSendList method.
case 'send_list': return await this.handleSendList(args); - Supporting service method in EvolutionAPI class that makes the HTTP POST request to the underlying Evolution API endpoint for sending list messages.
async sendList(instanceName: string, data: { number: string; title?: string; description?: string; buttonText?: string; footerText?: string; sections: Array<{ title: string; rows: Array<{ title: string; description?: string; rowId: string; }>; }>; }): Promise<Message> { const response = await this.client.post(`/message/sendList/${instanceName}`, data); return response.data; }