edit_message
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
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | 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. | |
| content | No | 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. | |
| metadata | No | Replacement JSON object stored with the message. Omitted or null, the current metadata is kept. | |
| message_id | Yes | UUID of the message to edit. It must be your own message and not tombstoned. |