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 WhatsApp is re-syncing, ask the user to open WhatsApp on their phone and try again in a minute.

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.9/5.0
Behavior5/5

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

Annotations already declare destructive=true and idempotent=true, but the description adds substantial context beyond them: the action is irreversible, other participants keep their copy and see nothing, the user stays in the group, and free-plan compatibility. It also documents the preview-first safety flow, the failure mode ("WhatsApp is re-syncing"), and the recovery step, which is far beyond what the annotations convey.

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 core action, then alternatives, then the workflow, then the return shape — a logical order with little filler. It is long, and the detailed enumeration of `chat` contact fields (name_source values, canonical_jid, phone_jid, lid_jid) reads as reference material that could be tightened, but no sentence is purely redundant given there is no output schema.

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?

For a destructive three-parameter tool with no output schema, the description covers the full picture: prerequisites (preview, user confirmation), consequences (irreversible, group membership unaffected, deleted_messages vanishes from read_chat_history and search_messages), return shape, and error recovery. Nothing an agent needs in order to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning on top: it warns that names match loosely so the preview must be checked, and it specifies calling twice with the same `chat` plus confirm: "DELETE". It also clarifies that the first call deletes nothing, which the schema's confirm description only implies.

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... from the user's WhatsApp, on their phone and every linked device") and pins down scope precisely as a whole chat rather than individual messages. It explicitly distinguishes itself from delete_message and archive_chat, so an agent can route without opening the schemas.

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 an explicit when-to-use case ("when the user wants a conversation gone from their inbox (e.g. one-off chats with couriers)") and names two alternatives with the exact conditions that select them: delete_message for removing only some of the user's own messages, archive_chat for moving a chat aside without losing it. The required two-call confirmation sequence is spelled out end to end.

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.