Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buttonTextNoButton text
descriptionNoList description
instanceNameYesInstance name
numberYesRecipient phone number
sectionsYesList sections
titleNoList title

Implementation Reference

  • 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'] } },
  • 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; }

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