Skip to main content
Glama

Turbo Notify: WhatsApp for AI agents

Edit the text of a message already sent

edit_text_message
Destructive

Replace the text of a WhatsApp text message this number already sent.

The recipient sees the new text marked as edited. The message keeps its id and its place in the conversation; only the text changes.

Only a text message can be edited here. For the caption of an image, video or document use edit_media_caption, and for a calendar event edit_calendar_event or cancel_calendar_event. A location, contact card, link button, sticker or audio message cannot be edited at all: delete_message is the only change for them. Using this tool on any message that is not text answers invalid_request: message_not_editable.

Only a message sent THROUGH Turbo Notify can be edited. One typed on the phone itself belongs to the same number but cannot be edited here, and neither can a message received from someone else.

WhatsApp only accepts a change to a text within 15 minutes of sending it. A later edit is refused up front with invalid_request: edit_window_expired; send a new message instead.

The edit is accepted at once and the outcome arrives as an event: message.edited when it worked, message.edit.failed when WhatsApp or the platform could not apply it. Read them with list_events.

The number first appears online and its unread messages in that conversation are marked as read, then the edit happens. Opening the conversation this way is automatic and uses no quota of its own.

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": {
      "message_id": "<message_id>",
      "text": "<text>"
    },
    "name": "edit_text_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe new text. It replaces the whole text of the message.
message_idYesMessage id (`msg_…`), as returned by a send or by `list_messages`.
number_aliasNoWhich of the organization's WhatsApp numbers this acts on: `main`, the alias of an extra number, or the number's `id` (`num_…`), which stays the same when the alias is renamed. Call `list_numbers` to see them. Defaults to the main number.main

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: the 15-minute edit window, the exact error codes (message_not_editable, edit_window_expired), that the edit is asynchronous with message.edited / message.edit.failed events read via list_events, and that the number briefly comes online and marks unread messages read. The annotations already flag destructiveHint and non-idempotency; the description complements rather than repeats them.

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?

Front-loaded with the core action, then blocks for alternatives, constraints, async outcome, and side effects. Short paragraphs, no filler, and each sentence carries a distinct operational fact.

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?

Complete for a mutation tool: eligibility rules, time limit, error codes, and event-based result reporting are all present, and an output schema exists so return values need not be spelled out. Only minor gap is that number_alias behavior across multiple numbers is left entirely to the schema.

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 message_id, text, and number_alias are fully documented in the schema itself. The description adds the semantic constraint that `text` replaces the entire body rather than appending, but says nothing about number_alias or how a mismatched number behaves. 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 ('Replace the text of a WhatsApp text message this number already sent') and immediately pins down scope: the message keeps its id and position, only the text changes. It is clearly separable from edit_media_caption and edit_calendar_event, which it names.

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?

Explicit when-to-use and when-not-to-use: only text messages sent through Turbo Notify, with the caption/calendar cases routed to edit_media_caption and edit_calendar_event, and sticker/location/contact/audio routed to delete_message. It even covers the third case of messages received from others, which no sibling handles.

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.