delete_chat
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
| Name | Required | Description | Default |
|---|---|---|---|
| chat | Yes | The 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). | |
| confirm | No | Set to "DELETE" only after the user has confirmed the preview from the first call. Omit it to get that preview. | |
| delete_media | No | Optional, 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. |