Skip to main content
Glama

edit_message

Destructive

Rewrite your own message in place, updating its body, typed content, or metadata while keeping its ID and author; edits reindex search and preserve earlier versions for review.

Instructions

Rewrite your own message in place, keeping its id and author, with a new body, new typed content or new metadata. Only the author can edit: another member's message can be tombstoned with tombstone_message, not rewritten, and a tombstoned message cannot be edited. Omitted content and metadata keep their current values, and sending neither body nor content is refused. The edit emits a message_edited event, which reindexes the message for search; earlier versions stay readable with list_message_edits. Returns the updated message. Requires message:post.

Input Schema

NameRequiredDescriptionDefault
bodyNoNew plain-text body, which is what search indexes; omit when sending typed content, and the body is derived from the blocks. Send body or content; sending neither is refused.
contentNoReplacement typed content blocks, in order. Each block has a type (text, code, tool_use, tool_result or resource_link) plus that type's fields, as in post_message. Omitted, the message keeps its current blocks.
metadataNoReplacement JSON object stored with the message. Omitted or null, the current metadata is kept.
message_idYesUUID of the message to edit. It must be your own message and not tombstoned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv479.0.2
    • changedInput schema / properties / body / description
      Previous value: -"plain text; omit when sending typed content (body is derived from it)"New value: +"New plain-text body, which is what search indexes; omit when sending typed content, and the body is derived from the blocks. Send body or content; sending neither is refused."
    • changedInput schema / properties / content / description
      Previous value: -"typed content blocks: {type: text|code|tool_use|tool_result|resource_link, ...}"New value: +"Replacement typed content blocks, in order. Each block has a type (text, code, tool_use, tool_result or resource_link) plus that type's fields, as in post_message. Omitted, the message keeps its current blocks."
    • addedInput schema / properties / message_id / description
      Added value: +"UUID of the message to edit. It must be your own message and not tombstoned."
    • addedInput schema / properties / metadata / description
      Added value: +"Replacement JSON object stored with the message. Omitted or null, the current metadata is kept."
  2. First observedv479.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare a non-read-only, destructive, non-idempotent mutation; the description adds real context beyond them — the message_edited event, search reindexing, prior versions remaining readable, the auth requirement (message:post), and the refusal when neither body nor content is sent. Retention of earlier versions nuances the destructive hint without contradicting it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action and constraints are front-loaded in the first sentence and no sentence is filler. The opening sentence is dense with stacked clauses, but the density carries necessary information rather than redundancy.

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

Completeness5/5

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

For a four-parameter mutation with nested content blocks and no output schema, the description covers authorization, side effects, recovery path, parameter interplay, and the return value. An agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline applies, but the description still adds meaning: body versus content selection, that the body is derived from blocks when content is sent, and that omitted content/metadata keep current values. It stops short of adding format or size guidance beyond the schema.

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 ('Rewrite your own message in place') plus the preserved invariants (id and author) and the three things that can change (body, typed content, metadata). It also explicitly distinguishes itself from tombstone_message and list_message_edits, so an agent can route without opening a 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?

Gives explicit when-to-use and when-not-to-use: own messages only, another member's message goes to tombstone_message, and a tombstoned message cannot be edited at all. It also points at list_message_edits for prior versions and names the required scope, leaving nothing to inference.

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