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
| Name | Required | Description | Default |
|---|---|---|---|
| instanceName | Yes | Instance name |
Implementation Reference
- src/index.ts:941-951 (handler)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) } ] }; }
- src/index.ts:402-412 (schema)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);