Skip to main content
Glama
by wsapi-chat

whatsapp_set_account_presence

Update your WhatsApp account status to show as available or unavailable to other users, controlling your online presence visibility.

Instructions

Set account presence status.

Input Schema

NameRequiredDescriptionDefault
statusYesPresence status

Input Schema (JSON Schema)

{ "properties": { "status": { "description": "Presence status", "enum": [ "available", "unavailable" ], "type": "string" } }, "required": [ "status" ], "type": "object" }

Implementation Reference

  • The ToolHandler object defining the whatsapp_set_account_presence tool, including its name, description, input schema (inline), and handler function that validates input and sends PUT request to /account/presence via wsapiClient.
    export const setAccountPresence: ToolHandler = { name: 'whatsapp_set_account_presence', description: 'Set account presence status.', inputSchema: { type: 'object', properties: { status: { type: 'string', enum: ['available', 'unavailable'], description: 'Presence status' }, }, required: ['status'], }, handler: async (args: any) => { const input = validateInput(setAccountPresenceSchema, args); logger.info('Setting account presence'); await wsapiClient.put('/account/presence', input); return { success: true, message: 'Account presence updated successfully' }; }, };
  • Zod schema used for validating the input parameters (status enum) in the whatsapp_set_account_presence handler.
    export const setAccountPresenceSchema = z.object({ status: z.enum(['available', 'unavailable']), });
  • src/server.ts:57-65 (registration)
    Registration block in MCP server setup where accountTools (exporting whatsapp_set_account_presence) is included in toolCategories array, which is then iterated to register all tools in the server's tools Map.
    const toolCategories = [ messagingTools, contactTools, groupTools, chatTools, sessionTools, instanceTools, accountTools, ];

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wsapi-chat/wsapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server