Skip to main content
Glama

Edit a sent message

edit_message
DestructiveIdempotent

Replace the text of a message you sent to fix typos or incorrect details without deleting and resending it; only your own recent messages can be changed.

Instructions

Replace the text of a message the user sent, e.g. to fix a typo or a wrong date, instead of deleting and resending it. Only the user's own messages, and only for a while after sending (15 minutes on WhatsApp, for example). Recipients see the new text marked as edited. This changes a message on the user's behalf: confirm the new text with the user first.

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": {
      "chatID": "<chatID>",
      "messageID": "<messageID>",
      "text": "<text>"
    },
    "name": "edit_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe new text (Markdown is converted where the network supports formatting)
chatIDYesChat ID (or local chat ID)
messageIDYesID of the message to edit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, and the description explains exactly why the operation is destructive: recipients see the new text marked as edited, so the original is overwritten on the receiving side. It adds details annotations cannot carry — the per-network time window and the requirement for user confirmation before acting on the user's behalf.

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 sentences, front-loaded with the action and its purpose, then constraints, then the confirmation rule. Every clause earns its place, including the WhatsApp window example, which conveys the order of magnitude of the limit.

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 3-parameter mutation with no output schema, the description covers purpose, preconditions, side effects, and the confirmation requirement. It does not say what the agent should expect when the edit fails (window elapsed, message not the user's own) or what the response contains, leaving minor gaps.

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%, so chatID, messageID, and text are already documented, including the Markdown conversion note. The description adds only indirect meaning (that messageID must refer to the user's own recent message) and says nothing further about resolving chatID or what happens with an invalid messageID. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Replace the text of a message the user sent') and immediately scopes it against the obvious sibling behavior ('instead of deleting and resending it'). An agent can distinguish this from delete_message or send_file 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?

It gives a concrete when-to-use trigger (fix a typo or wrong date), the alternative it replaces (delete + resend), and two hard preconditions: only the user's own messages, and only within a short window after sending (15 minutes on WhatsApp). It also states a required behavior before calling: confirm the new text with the user.

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