Skip to main content
Glama
wsapi-chat
by wsapi-chat

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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}`); }); });
  • Inline input schema for whatsapp_get_groups tool, which expects no input parameters (empty properties).
    inputSchema: { type: 'object', properties: {} },

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/wsapi-chat/wsapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server