Skip to main content
Glama

Edit a sent message

edit_message
DestructiveIdempotent

Correct a previously sent WhatsApp message within its edit window; recipients see an edited mark. Use only when the user asks to fix sent text.

Instructions

Edits the text of a message previously sent by this instance; the recipient sees an 'edited' mark. Only works on messages the instance sent, and only within WhatsApp's edit window. Use only when the user asks to correct a message.

Input Schema

NameRequiredDescriptionDefault
textYesNew text.
numberYesRecipient phone with country code, digits only (e.g. 5511999999999 for Brazil). For groups use the group JID ending in @g.us.
message_idYesId of the sent message.
instance_idNoZapZap instance id (a connected WhatsApp number). Optional when ZAPZAP_INSTANCE_ID is configured; otherwise call list_instances first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true, openWorld=true, so the bar is lower; the description still adds real value by disclosing the recipient-visible 'edited' marker and the edit-window/time limit, neither of which is in the structured data. It does not spell out that the original text is replaced irreversibly, which is the main behavioral trait left implicit.

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?

Three tight clauses, zero filler: the operation, the recipient-visible effect, the two hard constraints, and the usage rule. The scope constraint is front-loaded in the first sentence.

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 4-parameter mutation with annotations covering safety and a fully described schema, the description supplies the operational constraints an agent needs (own-message only, edit window, user intent). Only the return value is unspecified, a minor gap given no output schema exists.

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 100% and every parameter (number, message_id, text, instance_id) is documented in the schema with format hints, so the description's silence on parameters is acceptable. It adds no meaning beyond the schema, which is the baseline case.

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 (edits the text of a previously sent message) and scopes it to messages sent by this instance, which cleanly separates it from send_text and delete_message. The user-visible consequence ('recipient sees an edited mark') further pins down what the operation actually does.

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 gives an explicit when-to-use rule ('Use only when the user asks to correct a message') plus two when-not constraints: messages must be sent by this instance and must still be inside WhatsApp's edit window. It stops short of naming a fallback (delete_message or send_text) for when the edit window has closed, so the routing is clear but not fully closed.

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