Skip to main content
Glama

Undo a replacement of an image, video or file

colliedesk_kb_media_replace_undo
Idempotent

Put the replaced item back in the articles a replacement changed, where they still show its replacement, as new versions; a file replaced in place gets its earlier bytes back. Undoing twice changes nothing more; it is refused when the replaced item was deleted for good.

Needs: kb_media:update.

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": {
      "replacement_id": "<replacement_id>"
    },
    "name": "colliedesk_kb_media_replace_undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
replacement_idYes

Output Schema

NameRequiredDescriptionDefault
undoneYes
in_placeNo
article_idsYes
to_media_idYes
translationsNo
from_media_idYes
replacement_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / in_place
      Added value: +{
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true), it explains that restoration happens as new versions, that in-place file replacement restores earlier bytes, that repeat undos are no-ops, that it is refused after permanent deletion, and that kb_media:update is required. The stated behavior is consistent with the non-destructive and idempotent hints rather than contradicting them.

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?

Two dense sentences with the core action first, followed by edge-case behavior and the permission prerequisite. The phrase "where they still show its replacement" takes a moment to parse, but nothing is redundant.

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 return values need not be described, and the definition covers permissions, idempotency, refusal conditions, and partial-application scope. The only thing an agent might still want is the source of the replacement_id, which neither the schema nor the description supplies.

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?

The schema has one parameter with 0% description coverage, and the description only implicitly refers to it as "a replacement" without saying the argument is the replacement's UUID or where that ID comes from (presumably the replace call's response). This is a modest but real gap in an otherwise well-specified definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Put the replaced item back in the articles a replacement changed" states a specific verb (restore) and resource (replaced media item) and makes clear this is the inverse of colliedesk_kb_media_replace. It does not name the sibling explicitly, but the undo framing makes the distinction unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete applicability conditions: it only acts where the article still shows the replacement, and it is refused when the replaced item was permanently deleted. It does not point to an alternative tool for the deleted-item case (e.g., an undelete tool), which is the main remaining gap.

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.

Resources