waha_mark_chat_unread
Mark a WhatsApp chat as unread to add an unread indicator for later review. Specify the chat ID to apply this status.
Instructions
Mark a chat as unread. This adds an unread indicator to the chat.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chatId | Yes | Chat ID (format: number@c.us) |
Implementation Reference
- src/index.ts:313-326 (registration)Registration of the 'waha_mark_chat_unread' tool in the ListToolsRequestSchema handler, including input schema definition.{ name: "waha_mark_chat_unread", description: "Mark a chat as unread. This adds an unread indicator to the chat.", inputSchema: { type: "object", properties: { chatId: { type: "string", description: "Chat ID (format: number@c.us)", }, }, required: ["chatId"], }, },
- src/index.ts:1555-1571 (handler)Primary MCP tool handler: extracts chatId from arguments, calls WAHAClient.markChatUnread(), returns formatted success response.const chatId = args.chatId; if (!chatId) { throw new Error("chatId is required"); } await this.wahaClient.markChatUnread(chatId); return { content: [ { type: "text", text: `Successfully marked chat ${chatId} as unread.`, }, ], }; }
- src/client/waha-client.ts:484-499 (helper)WAHAClient helper method: performs HTTP POST to WAHA API endpoint /api/{session}/chats/{chatId}/unread to mark the chat as unread.* Mark a chat as unread * POST /api/:session/chats/:chatId/unread */ async markChatUnread(chatId: string): Promise<void> { if (!chatId) { throw new WAHAError("chatId is required"); } const endpoint = `/api/${this.session}/chats/${encodeURIComponent( chatId )}/unread`; await this.request<void>(endpoint, { method: "POST", }); }
- src/index.ts:1076-1076 (registration)Tool dispatch/registration in the CallToolRequestSchema switch statement.return await this.handleMarkChatUnread(args);