Skip to main content
Glama

waha_delete_chat

Permanently remove WhatsApp conversations from the WAHA MCP Server. This irreversible action deletes chat history and all associated messages.

Instructions

Delete a chat completely. WARNING: This is a destructive operation that cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatIdYesChat ID (format: number@c.us)

Implementation Reference

  • src/index.ts:272-284 (registration)
    Tool registration and input schema definition for 'waha_delete_chat' in the listTools handler
      name: "waha_delete_chat",
      description: "Delete a chat completely. WARNING: This is a destructive operation that cannot be undone.",
      inputSchema: {
        type: "object",
        properties: {
          chatId: {
            type: "string",
            description: "Chat ID (format: number@c.us)",
          },
        },
        required: ["chatId"],
      },
    },
  • Main handler function that processes 'waha_delete_chat' tool calls, validates input, calls WAHAClient.deleteChat, and returns confirmation
    private async handleDeleteChat(args: any) {
      const chatId = args.chatId;
    
      if (!chatId) {
        throw new Error("chatId is required");
      }
    
      await this.wahaClient.deleteChat(chatId);
    
      return {
        content: [
          {
            type: "text",
            text: `WARNING: Chat ${chatId} has been completely deleted.\nThis operation cannot be undone.`,
          },
        ],
      };
    }
  • WAHAClient.deleteChat method - core API implementation that makes the DELETE request to WAHA API to delete the chat
    async deleteChat(chatId: string): Promise<void> {
      if (!chatId) {
        throw new WAHAError("chatId is required");
      }
    
      const endpoint = `/api/${this.session}/chats/${encodeURIComponent(chatId)}`;
    
      await this.request<void>(endpoint, {
        method: "DELETE",
      });
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively warns that this is a 'destructive operation that cannot be undone,' which is crucial for a deletion tool. However, it doesn't mention permissions, side effects, or what 'completely' entails (e.g., if it affects messages or participants).

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 extremely concise with two sentences that are front-loaded and waste no words. The first sentence states the purpose, and the second provides a critical warning, making every sentence earn its place efficiently.

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 destructive nature and lack of annotations or output schema, the description is moderately complete. It covers the core action and warning but misses details like permissions, error cases, or confirmation requirements, which could help the agent use it safely in context.

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?

Schema description coverage is 100% for the single parameter (chatId), so the schema already documents its type and format. The description adds no additional parameter information beyond what's in the schema, meeting the baseline for high coverage but not enhancing understanding.

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 ('Delete a chat completely') and specifies the resource ('a chat'), which distinguishes it from sibling tools like waha_archive_chat or waha_clear_chat_messages. However, it doesn't explicitly differentiate from waha_delete_message, which might cause some ambiguity about scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like waha_archive_chat or waha_clear_chat_messages. It mentions the operation is destructive but doesn't specify use cases or prerequisites, leaving the agent without contextual decision-making criteria.

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