Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

get_chats

Retrieve all WhatsApp chats for a specified instance to monitor conversations and manage messaging workflows.

Instructions

Get all chats

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNameYesInstance name

Implementation Reference

  • The main handler function for the 'get_chats' tool. It fetches chats using the EvolutionAPI service for the given instance and returns them as a JSON-formatted text response.
    private async handleGetChats(args: any) { const chats = await evolutionAPI.findChats(args.instanceName); return { content: [ { type: 'text', text: JSON.stringify(chats, null, 2) } ] }; }
  • The input schema definition for the 'get_chats' tool, specifying that it requires an 'instanceName' parameter.
    { name: 'get_chats', description: 'Get all chats', inputSchema: { type: 'object', properties: { instanceName: { type: 'string', description: 'Instance name' } }, required: ['instanceName'] } },
  • src/index.ts:540-541 (registration)
    The switch case that registers and dispatches calls to the 'get_chats' handler within the MCP tool request handler.
    case 'get_chats': return await this.handleGetChats(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