waha_delete_group_picture
Delete a WhatsApp group's profile picture by providing the group ID. This tool removes the current image displayed for the group.
Instructions
Remove group profile picture.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | Group ID (format: number@g.us) |
Implementation Reference
- src/index.ts:603-614 (registration)Tool registration including name, description, and input schema definition in the ListToolsRequestSchema handler.name: "waha_delete_group_picture", description: "Remove group profile picture.", inputSchema: { type: "object", properties: { groupId: { type: "string", description: "Group ID (format: number@g.us)", }, }, required: ["groupId"], },
- src/index.ts:1977-1994 (handler)Primary MCP tool handler: validates groupId parameter, calls WAHAClient.deleteGroupPicture(), and returns formatted success response.private async handleDeleteGroupPicture(args: any) { const groupId = args.groupId; if (!groupId) { throw new Error("groupId is required"); } await this.wahaClient.deleteGroupPicture(groupId); return { content: [ { type: "text", text: `Successfully deleted picture for group ${groupId}.`, }, ], }; }
- src/client/waha-client.ts:851-861 (helper)Underlying WAHAClient helper method that performs the actual HTTP DELETE request to remove the group picture from WAHA API.async deleteGroupPicture(groupId: string): Promise<void> { if (!groupId) { throw new WAHAError("groupId is required"); } const endpoint = `/api/${this.session}/groups/${encodeURIComponent(groupId)}/picture`; await this.request<void>(endpoint, { method: "DELETE", }); }
- src/index.ts:1100-1100 (registration)Handler dispatch registration in the CallToolRequestSchema switch statement that routes tool calls to the specific handler.return await this.handleDeleteGroupPicture(args);