Skip to main content
Glama

delete_chat

DestructiveIdempotent

Deletes a whole WhatsApp conversation (a person or a group) from the user's WhatsApp, on their phone and every linked device, like "Delete chat" on the phone. Works on the free plan. It can't be undone. The other people in the chat keep their copy and see nothing; the user stays in the group. Use it when the user wants a conversation gone from their inbox (e.g. one-off chats with couriers). To remove only some of the user's own messages for everyone, use delete_message instead; to just move a chat out of the way without losing it, use archive_chat. Two steps: first call it without confirm (nothing is deleted): it returns a preview with the chat it found, its number of stored messages and the date of the latest. Show that to the user (names match loosely, so check it's the right chat), and once they agree call it again with the same chat and confirm: "DELETE". The deleting call returns { chat, status (deleted or failed), deleted_messages }: deleted_messages is how many stored messages were removed from wa-mcp's copy, so read_chat_history and search_messages no longer show them; chat has the contact fields (name; name_source: address_book, push_name, group_subject, business, phone or unresolved; canonical_jid: the JID to pass to send_message and read_chat_history; phone_jid and lid_jid: the chat's phone-number and LID forms, null when unknown or for groups; phone_display: the number as +). If it answers that the chat settings are out of sync, tell the user it didn't work and suggest doing it in WhatsApp on their phone; only try again if the user asks.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chat": "<chat>"
    },
    "name": "delete_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesThe chat to delete: a contact name, a phone number with country code, a group's exact name, or a chat JID (person, @lid or group).
confirmNoSet to "DELETE" only after the user has confirmed the preview from the first call. Omit it to get that preview.
delete_mediaNoOptional, default false. true also deletes the chat's photos, videos and files from the user's devices; false keeps them in the phone's gallery.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds far more: irreversibility, that other participants keep their copy and see nothing, that the user stays in the group, free-plan availability, and the preview-then-confirm protocol. It also documents the failure mode ('chat settings are out of sync') and the recommended recovery, which no annotation conveys.

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

Conciseness4/5

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

Front-loaded with the destructive action and the irreversible warning, then the alternatives, then the procedure. It is long and the return-field enumeration is dense, but with no output schema each clause carries real information; only the exhaustive field list borders on over-stuffed.

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

Completeness5/5

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

A destructive, multi-step, no-output-schema tool is fully covered: what is destroyed and what is not, the confirmation sequence, the preview contents, the success/failure return shape including deleted_messages semantics, and behavior on error. Nothing an agent needs to call it safely is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description earns extra by explaining the operational meaning of `confirm` as a two-call handshake (first call deletes nothing and returns a preview; second call with 'DELETE' performs the deletion) and warning that name matching is loose. It never mentions `delete_media` explicitly, leaving that one parameter entirely to the schema.

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

Purpose5/5

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

States a specific verb and resource ('Deletes a whole WhatsApp conversation (a person or a group)'), its blast radius ('on their phone and every linked device'), and explicitly contrasts itself with delete_message and archive_chat, so an agent can pick it out of the sibling set without opening any schema.

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

Usage Guidelines5/5

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

Gives concrete when-to-use context ('when the user wants a conversation gone from their inbox, e.g. one-off chats with couriers') plus explicit alternatives and the condition that selects each ('remove only some of the user's own messages' -> delete_message; 'just move a chat out of the way' -> archive_chat). It also prescribes a two-step flow and tells the agent what to do on an out-of-sync failure.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.