whatsapp_get_groups
Retrieve a complete list of all WhatsApp groups from your account to manage conversations and contacts.
Instructions
Get list of all WhatsApp groups.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/groups.ts:8-17 (handler)The complete ToolHandler definition for 'whatsapp_get_groups', including inline input schema and the async handler function that fetches WhatsApp groups via wsapiClient.get('/groups') and returns them with count.export const getGroups: ToolHandler = { name: 'whatsapp_get_groups', description: 'Get list of all WhatsApp groups.', inputSchema: { type: 'object', properties: {} }, handler: async () => { logger.info('Getting groups list'); const result = await wsapiClient.get('/groups'); return { success: true, groups: result, count: result.length }; }, };
- src/server.ts:56-76 (registration)The tool registration logic in setupToolHandlers() where groupTools (containing whatsapp_get_groups) is included in toolCategories array and then each tool is registered into the server's tools Map by name.// Register all tool categories const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ]; toolCategories.forEach(category => { Object.values(category).forEach(tool => { if (this.tools.has(tool.name)) { logger.warn(`Tool ${tool.name} already registered, skipping`); return; } this.tools.set(tool.name, tool); logger.debug(`Registered tool: ${tool.name}`); }); });
- src/tools/groups.ts:11-11 (schema)Inline input schema for whatsapp_get_groups tool, which expects no input parameters (empty properties).inputSchema: { type: 'object', properties: {} },