Skip to main content
Glama

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
NameRequiredDescriptionDefault
chatIdYesChat 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"],
      },
    },
  • 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}.`,
          },
        ],
      };
    }
  • 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",
      });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Unarchive a chat') and effect ('Moves the chat back to the main chat list'), but doesn't cover critical behavioral aspects such as required permissions, whether the operation is reversible, error conditions, or rate limits. This leaves significant gaps for an agent to understand the tool's behavior fully.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short, direct sentences with zero waste. It front-loads the purpose and efficiently explains the outcome, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (a mutation operation with no annotations and no output schema), the description is incomplete. It covers the basic action and effect but lacks details on behavioral traits, error handling, or return values. However, the high schema coverage for the single parameter provides some compensation, making it minimally adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'chatId' parameter clearly documented. The description doesn't add any additional meaning or context beyond what the schema provides (e.g., it doesn't explain where to find the chatId or format nuances), so it meets the baseline of 3 for high schema coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Unarchive a chat') and the effect ('Moves the chat back to the main chat list'), providing a specific verb and resource. It distinguishes itself from the sibling 'waha_archive_chat' by being the inverse operation, though it doesn't explicitly name that sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a chat needs to be restored from an archived state, but it doesn't provide explicit guidance on when to use this tool versus alternatives (e.g., when to unarchive vs. other chat management tools) or any prerequisites. The context is clear but lacks detailed exclusions or comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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-whatsapp-mcp'

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