whatsapp_get_group
Retrieve detailed information about a specific WhatsApp group using its group ID, including member list, group settings, and metadata for group management operations.
Instructions
Get information about a specific group.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | Group ID (with @g.us) |
Input Schema (JSON Schema)
{
"properties": {
"groupId": {
"description": "Group ID (with @g.us)",
"type": "string"
}
},
"required": [
"groupId"
],
"type": "object"
}
Implementation Reference
- src/tools/groups.ts:38-51 (handler)The ToolHandler implementation for 'whatsapp_get_group', including input schema, description, and async handler that validates input and fetches group details from the WhatsApp API.export const getGroup: ToolHandler = { name: 'whatsapp_get_group', description: 'Get information about a specific group.', inputSchema: { type: 'object', properties: { groupId: { type: 'string', description: 'Group ID (with @g.us)' } }, required: ['groupId'], }, handler: async (args: any) => { const input = validateInput(getGroupSchema, args); const result = await wsapiClient.get(`/groups/${input.groupId}`); return { success: true, group: result }; }, };
- src/validation/schemas.ts:200-202 (schema)Zod validation schema used in the handler for input validation of groupId.export const getGroupSchema = z.object({ groupId: groupIdSchema, });
- src/server.ts:57-65 (registration)Tool categories array including 'groupTools' (which contains whatsapp_get_group), registered in setupToolHandlers.const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ];
- src/server.ts:17-17 (registration)Import of groupTools containing the whatsapp_get_group tool.import { groupTools } from './tools/groups.js';
- src/tools/groups.ts:71-71 (registration)Export bundling group-related tools including getGroup for registration in server.export const groupTools = { getGroups, createGroup, getGroup, updateGroupName };