whatsapp_set_account_status
Update your WhatsApp status message to share your current status with contacts. Set a custom status up to 139 characters to communicate availability, mood, or information.
Instructions
Update account status message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Status message (max 139 characters) |
Input Schema (JSON Schema)
{
"properties": {
"status": {
"description": "Status message (max 139 characters)",
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
}
Implementation Reference
- src/tools/account.ts:69-83 (handler)The ToolHandler implementation for 'whatsapp_set_account_status', including name, description, inputSchema (basic), and handler function that validates input using setAccountStatusSchema and calls wsapiClient.put('/account/status', input).export const setAccountStatus: ToolHandler = { name: 'whatsapp_set_account_status', description: 'Update account status message.', inputSchema: { type: 'object', properties: { status: { type: 'string', description: 'Status message (max 139 characters)' } }, required: ['status'], }, handler: async (args: any) => { const input = validateInput(setAccountStatusSchema, args); logger.info('Setting account status'); await wsapiClient.put('/account/status', input); return { success: true, message: 'Account status updated successfully' }; }, };
- src/validation/schemas.ts:272-274 (schema)Zod schema defining the input for the tool: an object with 'status' string field max 139 characters.export const setAccountStatusSchema = z.object({ status: z.string().max(139), });
- src/tools/account.ts:85-85 (registration)Exports the accountTools object grouping all account-related tools, including setAccountStatus, for registration in the MCP server.export const accountTools = { getAccountInfo, setAccountName, setAccountPicture, setAccountPresence, setAccountStatus };
- src/server.ts:57-76 (registration)In setupToolHandlers(), includes 'accountTools' in toolCategories array and loops to register each tool (including whatsapp_set_account_status) into the server's tools Map.const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ]; toolCategories.forEach(category => { Object.values(category).forEach(tool => { if (this.tools.has(tool.name)) { logger.warn(`Tool ${tool.name} already registered, skipping`); return; } this.tools.set(tool.name, tool); logger.debug(`Registered tool: ${tool.name}`); }); });