Skip to main content
Glama

edit_message

Idempotent

Replace the text of an existing chat message and notify the conversation that it was edited. Use it to correct or update your own Nextcloud messages within 24 hours.

Instructions

Replace the text of a chat message. Talk marks it as edited and tells the conversation.

Only your own messages (or, for a moderator, any in a group conversation), only within 24 hours, and not system messages or shared polls and locations; for a shared file the new text becomes its caption. Mentions read back from get_messages show names; to keep a mention when editing, write it as search_mentions gives it (@"user-id").

Args: token: The conversation token. message_id: The message to edit. message: The new text. Mentions work as in send_message.

Returns: JSON with the edited message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYes
messageYes
message_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations cover safety (readOnlyHint=false, idempotentHint=true, destructiveHint=false); the description adds non-obvious behavior beyond them — the message is marked as edited, the conversation is notified, and edits are subject to a 24-hour window and permission constraints. It does not describe failure modes or what happens to mentions that no longer resolve.

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?

Well front-loaded: the core action comes first, then constraints, then the mention caveat, then Args/Returns. Every sentence carries information, though the Args and Returns blocks partly restate what the schema and output schema already provide.

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?

An output schema exists, so the Returns line is a mild redundancy, but the description covers permissions, time limits, excluded message types, and mention semantics. It stops short of describing error behavior or concurrency/conflict outcomes for an idempotent edit.

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 description coverage is 0%, so the description must compensate, and it does document all three parameters plus mentions handling ('Mentions work as in send_message', pointing at search_mentions format). 'token' and 'message_id' remain thinly described (no format/validity ranges), preventing a 5.

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 chat message'), immediately distinguishing it from sibling mutations like edit_comment, delete_message, or send_message. The scope and effect (marks as edited, tells the conversation) are front-loaded.

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?

Explicitly enumerates when the tool may be used: only your own messages (moderators may edit any in a group conversation), only within 24 hours, and never for system messages or shared polls/locations. It also notes the shared-file caption special case, leaving little 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