Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

list_contacts

Retrieve all WhatsApp Business contacts for a specified instance to manage messaging and communication workflows.

Instructions

List all contacts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNameYesInstance name

Implementation Reference

  • The main handler function for the 'list_contacts' tool. It fetches contacts from the EvolutionAPI service for the given instance and returns them as a JSON-formatted text content block.
    private async handleListContacts(args: any) { const contacts = await evolutionAPI.findContacts(args.instanceName); return { content: [ { type: 'text', text: JSON.stringify(contacts, null, 2) } ] }; }
  • Defines the tool schema for 'list_contacts', specifying the input schema that requires an 'instanceName' parameter.
    { name: 'list_contacts', description: 'List all contacts', inputSchema: { type: 'object', properties: { instanceName: { type: 'string', description: 'Instance name' } }, required: ['instanceName'] } },
  • src/index.ts:524-525 (registration)
    Registers the 'list_contacts' tool in the switch statement within the CallToolRequest handler, dispatching to the specific handler method.
    case 'list_contacts': return await this.handleListContacts(args);

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