waha_get_group_info
Retrieve detailed information about a specific WhatsApp group using its group ID to access member lists, settings, and metadata for chat management.
Instructions
Get detailed information about a specific group.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | Group ID (format: number@g.us) |
Implementation Reference
- src/index.ts:1892-1909 (handler)The primary handler for the 'waha_get_group_info' MCP tool. Extracts 'groupId' from input arguments, validates it, calls the WAHAClient's getGroupInfo method, and returns the group information formatted as a JSON string in a text content block.* Handle waha_get_group_info tool */ private async handleGetGroupInfo(args: any) { const groupId = args.groupId; if (!groupId) { throw new Error("groupId is required"); } const groupInfo = await this.wahaClient.getGroupInfo(groupId); return { content: [ { type: "text", text: `Group information for ${groupId}:\n${JSON.stringify(groupInfo, null, 2)}`, }, ],
- src/index.ts:548-560 (schema)The input schema and metadata definition for the 'waha_get_group_info' tool, registered in the ListTools response. Specifies that 'groupId' is a required string parameter.name: "waha_get_group_info", description: "Get detailed information about a specific group.", inputSchema: { type: "object", properties: { groupId: { type: "string", description: "Group ID (format: number@g.us)", }, }, required: ["groupId"], }, },
- src/index.ts:1093-1094 (registration)Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching calls to 'waha_get_group_info' to the handleGetGroupInfo method.case "waha_get_group_info": return await this.handleGetGroupInfo(args);
- src/client/waha-client.ts:775-785 (helper)Underlying helper method in WAHAClient class that makes the HTTP GET request to retrieve group information from the WAHA API endpoint `/api/{session}/groups/{groupId}`.async getGroupInfo(groupId: string): Promise<any> { if (!groupId) { throw new WAHAError("groupId is required"); } const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}`; return this.request<any>(endpoint, { method: "GET", }); }