Skip to main content
Glama
mcp-whatsapp

mcp-whatsapp

edit_message

DestructiveIdempotent

Edit a previously sent WhatsApp text message in place within WhatsApp’s ~15-minute window; recipients see the new body with an edited label. Only your own messages can be changed.

Instructions

Edit a previously-sent text message in place; recipients see the new body with an edited label and the cached row takes the new body. Only your own messages can be edited and only within WhatsApp's edit window (~15 minutes). Re-edit by calling again with another new_body; to remove the message entirely use delete_message (revoke). Returns the plain-text string Message edited on success.

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>",
      "new_body": "<new_body>"
    },
    "name": "edit_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
chat_jidYesWhatsApp JID: individual as `<digits>@s.whatsapp.net` or bare phone digits, group as `<digits>-<timestamp>@g.us`
new_bodyYesreplacement message body text
message_idYesWhatsApp message ID of your own message to edit (use `message_id` from list_messages)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / message_id / description
      Previous value: -"WhatsApp message ID"New value: +"WhatsApp message ID of your own message to edit (use `message_id` from list_messages)"
    • changedInput schema / properties / new_body / description
      Previous value: -"replacement text"New value: +"replacement message body text"
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint, idempotentHint, openWorldHint), it discloses observable effects: recipients see the new body with an `edited` label and the cached row is overwritten. It also states the success return value ('Message edited') despite there being no output schema, and the re-edit/idempotent behavior is consistent with idempotentHint=true.

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?

Purpose is front-loaded in the first clause, with constraints, alternative, and return value following in a logical order. The only slightly verbose phrase is the recipients/cache effect, which still earns its place by explaining user-visible impact.

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 3-parameter mutation tool with no output schema, the description covers permissions (own messages only), time limits, idempotent re-edit, the destructive alternative, and the return string. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100%, so chat_jid, message_id, and new_body are already documented in detail. The description adds only marginal semantic value beyond the schema — chiefly that `new_body` can be replaced repeatedly on re-edit — so the baseline 3 applies.

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 ('Edit a previously-sent text message in place') and contrasts implicitly with siblings by naming delete_message for removal and describing the edit-window scope. An agent can distinguish this from send_message or delete_message 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?

Explicitly gives the preconditions ('Only your own messages can be edited and only within WhatsApp's edit window (~15 minutes)') and the alternative path ('to remove the message entirely use delete_message (revoke)'). It also covers the repeat-use case ('Re-edit by calling again with another `new_body`').

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