Skip to main content
Glama

WhatsMCP: MCP for WhatsApp

Edit Message

wa_edit_message

Edit a WhatsApp message you sent. WhatsApp only accepts an edit within about 20 minutes of the original send.

Input Schema

NameRequiredDescriptionDefault
chatYesthe chat the message is in — a phone number or a group/channel JID
textYesthe replacement message body
account_idNothe account, as returned by wa_list_accounts; omit it when the workspace has only one account
message_idYesWhatsApp's id for the message, as returned by wa_send_message

Output Schema

NameRequiredDescriptionDefault
statusYesok (the operation succeeded) or refused (nothing was done)
refusalNopresent only when status is refused
new_message_idNoWhatsApp's id for the react/edit/revoke protocol message itself

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / account_id / description
      Previous value: -"the account, as returned by wa_list_accounts"New value: +"the account, as returned by wa_list_accounts; omit it when the workspace has only one account"
    • changedInput schema / required
      Previous value: -[
      -  "account_id",
      -  "chat",
      -  "message_id",
      -  "text"
      -]New value: +[
      +  "chat",
      +  "message_id",
      +  "text"
      +]
    • addedOutput schema / properties / refusal / properties / candidates
      Added value: +{
      +  "description": "on an account_ambiguous refusal: the accounts to choose from — retry with one of these as account_id",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "account_id": {
      +        "description": "the id to retry with as account_id",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "the account's WhatsApp display name",
      +        "type": "string"
      +      },
      +      "phone": {
      +        "description": "the account's phone number, E.164",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "whether the number works right now — live, connecting, or why not, as wa_list_accounts reports it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "account_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  2. Changed3 schema fields changed
    • addedOutput schema / properties / refusal / properties / account_status
      Added value: +{
      +  "description": "when the number is not working: its status — starting, not_running, whatsapp_down, suspended, pairing, unlinked or locked",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / account_status_reason
      Added value: +{
      +  "description": "the detail of account_status, e.g. no_egress, stopped, no_plan",
      +  "type": "string"
      +}
    • addedOutput schema / properties / refusal / properties / since
      Added value: +{
      +  "description": "when the number stopped working, RFC3339, when known",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only but non-destructive mutation, and the description adds platform-specific behavioral context the annotations cannot: the ~20-minute edit window enforced by WhatsApp. It does not say what happens when the window has expired (error vs silent no-op), which keeps it from a 5.

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?

Two short sentences with no filler; the core action comes first and the constraint second. Every sentence carries information the agent needs.

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?

An output schema exists, so return values need no explanation, and the full parameter set is described in the schema. What remains is failure behavior past the 20-minute cutoff, which would help the agent decide between retrying and sending a new message.

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, text, message_id and account_id are already fully documented, and description adds little per-parameter detail. The 20-minute rule implicitly constrains which message_id values are valid, but the description does not state this about the parameter directly. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 WhatsApp message you sent'), so the agent can distinguish it from wa_send_message and wa_delete_message by intent. It stops short of naming the sibling tools it supersedes in a given situation, but the action is unambiguous.

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?

The description gives two concrete applicability conditions: the message must be one 'you sent' and the edit must occur within roughly 20 minutes of the original. That is real guidance an agent can act on, though it never explicitly contrasts with alternatives such as sending a new message instead.

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.

Resources