Skip to main content
Glama
mcp-whatsapp

mcp-whatsapp

delete_message

DestructiveIdempotent

Delete a WhatsApp message for all participants or only from your own devices. Both scopes are permanent, and choosing for_everyone shows others a deleted-message notice.

Instructions

Delete a message for everyone or only for this account; neither can be undone. for_everyone (the default) revokes it, so participants see a message was deleted notice (your own messages, or any message as a group admin); for_me removes a cached message from your own devices through WhatsApp app state while other participants keep it, and hides it from this server's cache reads without removing the row. Use edit_message to correct text instead. Omitting scope returns plain text. An explicit scope returns JSON {scope, chat_jid, message_id, outcome, reversible, message}, where outcome is sent (WhatsApp accepted it), refused (nothing was sent) or unknown (the send call returned an error, so it may or may not have taken effect; check the phone instead of retrying), flagged as an error unless sent.

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_jid": "<chat_jid>",
      "message_id": "<message_id>"
    },
    "name": "delete_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNo`for_everyone` (default) revokes the message for all participants; `for_me` deletes it from this account's devices only and requires the message to be in the local cache
chat_jidYesWhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`
message_idYesWhatsApp message ID of the message to delete (use `message_id` from list_messages)
sender_jidNoJID of the original sender; with `for_everyone`, required when deleting someone else's message as a group admin and empty for your own; ignored with `for_me`, which reads the sender from the cache (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.9.0
    • changedInput schema / properties / message_id / description
      Previous value: -"WhatsApp message ID of the message to revoke (use `message_id` from list_messages)"New value: +"WhatsApp message ID of the message to delete (use `message_id` from list_messages)"
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "`for_everyone` (default) revokes the message for all participants; `for_me` deletes it from this account's devices only and requires the message to be in the local cache",
      +  "enum": [
      +    "for_everyone",
      +    "for_me"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / sender_jid / description
      Previous value: -"JID of the original sender; required when deleting someone else's message as a group admin, leave empty when deleting your own (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)"New value: +"JID of the original sender; with `for_everyone`, required when deleting someone else's message as a group admin and empty for your own; ignored with `for_me`, which reads the sender from the cache (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)"
  2. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / message_id / description
      Previous value: -"WhatsApp message ID"New value: +"WhatsApp message ID of the message to revoke (use `message_id` from list_messages)"
    • changedInput schema / properties / sender_jid / description
      Previous value: -"original sender; leave empty when deleting your own messages (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)"New value: +"JID of the original sender; required when deleting someone else's message as a group admin, leave empty when deleting your own (WhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`)"
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint and idempotent; the description goes well beyond them by disclosing irreversibility, the user-visible "message was deleted" notice, and the subtle for_me side effect of hiding the message from this server's cache reads without removing the row. The outcome taxonomy (sent/refused/unknown) with the explicit "check the phone instead of retrying" instruction is unusually valuable failure guidance.

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-loads the irreversible destructive action and mode split in the first clause, and every subsequent sentence carries operational weight (notice text, cache behavior, output shape). It is dense but not padded; the return-format sentence is long but replaces a missing 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?

Despite having no output schema, the description fully specifies the response contract, including the no-scope plain-text case and the error flagging rule for non-sent outcomes. For a destructive, open-world mutation with conditional sender requirements, nothing an agent needs before invoking it is absent.

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 adds behavioral consequence to the scope enum — what each mode does to other participants, to app state, and to server cache visibility. The sender_jid conditional (only meaningful for for_everyone as a group admin, read from cache for for_me) is also reinforced in prose.

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?

Opens with a specific verb+resource ("Delete a message") and immediately splits the two distinct modes (for everyone vs. only this account), so an agent can tell exactly what the tool does and which scope it needs. It also names the sibling edit_message as the non-destructive alternative.

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 explicit when-to-use guidance per mode: for_everyone applies to your own messages or any message as a group admin, for_me applies when the message is in the local cache. It also states the exclusion directly — "Use edit_message to correct text instead" — so the agent knows when not to reach for this tool.

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