Update Group Picture
update_group_pictureUpdate a WhatsApp group's profile picture by providing the group JID and a base64-encoded image or image URL via the Evolution API instance.
Instructions
Update the profile picture of a WhatsApp group via the pinned instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupJid | Yes | Group JID (e.g. 120363000000000000@g.us) | |
| image | Yes | Base64 encoded image or URL for the group picture |
Implementation Reference
- src/tools/update-group-picture.ts:11-32 (handler)The registerUpdateGroupPicture function that registers and implements the tool handler. It posts to /group/updateGroupPicture/:instance endpoint with groupJid and image parameters.
export function registerUpdateGroupPicture(server: McpServer, client: EvolutionClient): void { server.registerTool( "update_group_picture", { title: "Update Group Picture", description: "Update the profile picture of a WhatsApp group via the pinned instance.", inputSchema: schema, }, async (args) => { try { const data = await client.post( `/group/updateGroupPicture/${client.instanceName}?groupJid=${encodeURIComponent(args.groupJid)}`, { image: args.image } ); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; } catch (e) { if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] }; throw e; } } ); } - Input schema for update_group_picture: groupJid (string) and image (base64/URL string).
const schema = { groupJid: z.string().min(1).describe("Group JID (e.g. 120363000000000000@g.us)"), image: z.string().min(1).describe("Base64 encoded image or URL for the group picture"), }; - src/tools/index.ts:120-120 (registration)Registration call for registerUpdateGroupPicture in the central tools index.
registerUpdateGroupPicture(server, client); - src/tools/index.ts:47-47 (registration)Import of registerUpdateGroupPicture from the module.
import { registerUpdateGroupPicture } from "./update-group-picture.js";