whatsapp_set_account_name
Change your WhatsApp account display name through the WSAPI WhatsApp MCP Server by specifying a new name up to 255 characters.
Instructions
Update account display name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | New account name (max 255 characters) |
Implementation Reference
- src/tools/account.ts:19-33 (handler)The ToolHandler object defining the whatsapp_set_account_name tool, including name, description, inputSchema, and the async handler function that validates input using setAccountNameSchema and updates the account name via wsapiClient.put('/account/name').export const setAccountName: ToolHandler = { name: 'whatsapp_set_account_name', description: 'Update account display name.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'New account name (max 255 characters)' } }, required: ['name'], }, handler: async (args: any) => { const input = validateInput(setAccountNameSchema, args); logger.info('Setting account name'); await wsapiClient.put('/account/name', input); return { success: true, message: 'Account name updated successfully' }; }, };
- src/validation/schemas.ts:260-262 (schema)Zod schema used for input validation in the tool handler, specifying the 'name' field with length constraints.export const setAccountNameSchema = z.object({ name: z.string().min(1).max(255), });
- src/server.ts:57-65 (registration)Registration of accountTools (which includes whatsapp_set_account_name) into the toolCategories array, which is then iterated to register each tool into the server's tools Map.const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ];
- src/server.ts:21-21 (registration)Import of the accountTools object containing the whatsapp_set_account_name handler.import { accountTools } from './tools/account.js';