whatsapp_set_account_picture
Change your WhatsApp profile picture by uploading a base64 encoded image. This tool updates your account's visual identity within the WSAPI WhatsApp MCP Server.
Instructions
Update account profile picture.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pictureBase64 | Yes | Base64 encoded image data |
Implementation Reference
- src/tools/account.ts:35-49 (handler)Main handler implementation for the whatsapp_set_account_picture tool. Validates input with setAccountPictureSchema and posts to wsapiClient /account/picture endpoint.export const setAccountPicture: ToolHandler = { name: 'whatsapp_set_account_picture', description: 'Update account profile picture.', inputSchema: { type: 'object', properties: { pictureBase64: { type: 'string', description: 'Base64 encoded image data' } }, required: ['pictureBase64'], }, handler: async (args: any) => { const input = validateInput(setAccountPictureSchema, args); logger.info('Setting account picture'); const result = await wsapiClient.post('/account/picture', input); return { success: true, pictureId: result.id, message: 'Account picture updated successfully' }; }, };
- src/validation/schemas.ts:264-266 (schema)Zod validation schema for the tool input, requiring pictureBase64 matching base64Schema pattern.export const setAccountPictureSchema = z.object({ pictureBase64: base64Schema, });
- src/tools/account.ts:85-85 (registration)Groups the account tools including setAccountPicture for registration in the MCP server.export const accountTools = { getAccountInfo, setAccountName, setAccountPicture, setAccountPresence, setAccountStatus };
- src/server.ts:64-64 (registration)Includes accountTools in toolCategories array which registers all tools including whatsapp_set_account_picture in the MCP server via setupToolHandlers().accountTools,