Skip to main content
Glama
wsapi-chat

WSAPI WhatsApp MCP Server

whatsapp_edit_message

Idempotent

Modify the text of a message you've already sent before WhatsApp's 15-minute edit window closes. Updates are visible to everyone in the chat.

Instructions

Edit the text of a message this number sent. Everyone in the chat sees it marked as edited. WhatsApp only allows it for about 15 minutes after sending. Returns a success confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesChat JID
textYesNew text content (max 4096 characters)
mentionsNo
messageIdYesID of the message to edit
ephemeralExpirationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.0
    • addedInput schema / properties / ephemeralExpiration
      Added value: +{
      +  "enum": [
      +    "off",
      +    "24h",
      +    "7d",
      +    "90d"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / mentions
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / text / description
      Previous value: -"New text content for the message (max 4096 characters)"New value: +"New text content (max 4096 characters)"
    • changedInput schema / properties / to / description
      Previous value: -"Chat ID where the message is located"New value: +"Chat JID"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this is a mutating, non-destructive, idempotent operation. The description adds valuable behavioral details beyond annotations: everyone in the chat sees the 'edited' mark, there is a ~15-minute time window, and it returns a success confirmation. It still does not describe what happens if the window has passed or the exact failure response.

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?

Four short sentences, front-loaded with the core action. Each sentence adds distinct information: what it does, visibility, time constraint, and return value. No wasted wording.

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

Completeness4/5

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

For a mutation tool with annotations and no output schema, the description covers purpose, side effects, key constraint, and return behavior. It does not explain failure modes (e.g., expired window) or the effect of optional parameters like mentions and ephemeralExpiration, leaving a minor completeness gap.

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 description coverage is 60%, with 'to', 'text', and 'messageId' documented in the schema, while 'mentions' and 'ephemeralExpiration' are undocumented. The description adds no parameter-level meaning beyond referring to 'text', so it does not compensate for the two undocumented optional parameters.

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?

The description states a specific verb and resource: 'Edit the text of a message this number sent.' It scopes the operation to messages sent by the authenticated number, which cleanly distinguishes it from sibling tools like whatsapp_send_text and whatsapp_delete_message without needing to name them.

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

Usage Guidelines4/5

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

It provides clear contextual guidance: the message must be one this number sent, and WhatsApp only permits editing for about 15 minutes after sending. It does not explicitly name alternatives (such as deleting and resending), but the conditions for valid use are clear.

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

Deploy Server

Other Tools