Skip to main content
Glama

waha_set_presence

Update your WhatsApp presence status to online, offline, typing, recording, or paused for specific chats to indicate availability and activity.

Instructions

Set your own presence status (online, offline, typing, recording, or paused).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatIdYesChat ID (format: number@c.us)
presenceYesPresence status to set

Implementation Reference

  • Input schema and description for the waha_set_presence tool, returned by listTools endpoint.
    name: "waha_set_presence", description: "Set your own presence status (online, offline, typing, recording, or paused).", inputSchema: { type: "object", properties: { chatId: { type: "string", description: "Chat ID (format: number@c.us)", }, presence: { type: "string", enum: ["online", "offline", "typing", "recording", "paused"], description: "Presence status to set", }, }, required: ["chatId", "presence"], }, },
  • src/index.ts:1153-1154 (registration)
    Registration of the waha_set_presence tool handler in the CallToolRequestSchema switch statement.
    case "waha_set_presence": return await this.handleSetPresence(args);
  • Main handler function for waha_set_presence tool call, validates parameters and delegates to WAHAClient.setPresence method.
    private async handleSetPresence(args: any) { const chatId = args.chatId; const presence = args.presence; if (!chatId) { throw new Error("chatId is required"); } if (!presence) { throw new Error("presence is required"); } await this.wahaClient.setPresence({ chatId, presence, }); return { content: [ { type: "text", text: `Successfully set presence to "${presence}" for ${chatId}.`, }, ], }; }
  • WAHAClient helper method that performs the actual HTTP POST request to the WAHA API to set the presence status for a specific chat.
    async setPresence(params: { chatId: string; presence: "online" | "offline" | "typing" | "recording" | "paused"; }): Promise<void> { const { chatId, presence } = params; if (!chatId) { throw new WAHAError("chatId is required"); } if (!presence) { throw new WAHAError("presence is required"); } const body = { chatId, presence, }; await this.request<void>(`/api/${this.session}/presence`, { method: "POST", body: JSON.stringify(body), }); }

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/seejux/waha-mcp'

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