waha_unarchive_chat
Move archived WhatsApp chats back to the main chat list using the WAHA MCP Server. Restores access to previously hidden conversations by providing the chat ID.
Instructions
Unarchive a chat. Moves the chat back to the main chat list.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chatId | Yes | Chat ID (format: number@c.us) |
Implementation Reference
- src/index.ts:299-312 (registration)MCP tool registration including name, description, and input schema definition.{ name: "waha_unarchive_chat", description: "Unarchive a chat. Moves the chat back to the main chat list.", inputSchema: { type: "object", properties: { chatId: { type: "string", description: "Chat ID (format: number@c.us)", }, }, required: ["chatId"], }, },
- src/index.ts:1533-1549 (handler)Primary MCP tool handler function. Extracts chatId from arguments, validates it, calls the underlying WAHA client unarchiveChat method, and returns success message.const chatId = args.chatId; if (!chatId) { throw new Error("chatId is required"); } await this.wahaClient.unarchiveChat(chatId); return { content: [ { type: "text", text: `Successfully unarchived chat ${chatId}.`, }, ], }; }
- src/client/waha-client.ts:466-481 (handler)WAHA API client implementation. Constructs the endpoint URL and makes a POST request to the WAHA server to unarchive the specified chat.* Unarchive a chat * POST /api/:session/chats/:chatId/unarchive */ async unarchiveChat(chatId: string): Promise<void> { if (!chatId) { throw new WAHAError("chatId is required"); } const endpoint = `/api/${this.session}/chats/${encodeURIComponent( chatId )}/unarchive`; await this.request<void>(endpoint, { method: "POST", }); }