waha_get_all_presence
Retrieve all subscribed presence data from WhatsApp contacts to monitor availability status and online activity through the WAHA MCP Server.
Instructions
Get all subscribed presence information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:2662-2673 (handler)MCP tool handler for 'waha_get_all_presence'. Calls WAHAClient.getAllPresence() and returns formatted JSON response.private async handleGetAllPresence(args: any) { const presences = await this.wahaClient.getAllPresence(); return { content: [ { type: "text", text: `All subscribed presence information:\n${JSON.stringify(presences, null, 2)}`, }, ], }; }
- src/index.ts:1156-1157 (registration)Tool registration in the CallToolRequestSchema switch statement, dispatching to the handler.return await this.handleGetAllPresence(args); default:
- src/index.ts:1034-1041 (schema)Tool schema definition in ListToolsRequestSchema response, specifying name, description, and empty input schema.name: "waha_get_all_presence", description: "Get all subscribed presence information.", inputSchema: { type: "object", properties: {}, }, }, ],
- src/client/waha-client.ts:1456-1462 (helper)WAHAClient helper method that makes GET request to /api/{session}/presence to fetch all presence data.async getAllPresence(): Promise<any[]> { const endpoint = `/api/${this.session}/presence`; return this.request<any[]>(endpoint, { method: "GET", }); }