Skip to main content
Glama

Replace an image, video or file in every article that uses it

colliedesk_kb_media_replace

Put another library item (with_media_id: an image for an image, a video for a video) in the place of media_id in every live article whose current text or a translation shows it. Each such article gets a new version; published ones change on the help center at once. A file is replaced in place (in_place true): it keeps its id and address and takes the bytes and name of with_media_id, a file no article lists, which goes to the trash holding the earlier version. article_id changes that one article (and its translations) only, as for an edited copy of a screenshot, and also needs kb_articles:update; a published article gets the copy in its unpublished changes, so the help center shows it once they are published. colliedesk_kb_media_get of the new item then lists media_id under earlier_versions. Undo it with colliedesk_kb_media_replace_undo and the replacement_id.

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": {
      "media_id": "<media_id>",
      "with_media_id": "<with_media_id>"
    },
    "name": "colliedesk_kb_media_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
media_idYesFrom colliedesk_kb_media_list, or the id in an article's /api/v1/kb/images/<id> link.
article_idNoReplace in this article only; it must show media_id. Not for a file.
with_media_idYesThe item to show instead, from colliedesk_kb_media_list or colliedesk_kb_image_upload.

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
    • addedInput schema / properties / article_id
      Added value: +{
      +  "description": "Replace in this article only; it must show media_id. Not for a file.",
      +  "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / in_place
      Added value: +{
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only say readOnly=false, destructive=false, idempotent=false, openWorld=true; the description goes far beyond them by disclosing that each matching article gets a new version, that published articles change on the help center immediately, that a file swap preserves id and address while the old bytes go to the trash, that the article_id path lands in unpublished changes rather than live, and that colliedesk_kb_media_get will list the old id under earlier_versions. The permission requirement (kb_media:update) is also stated, which annotations cannot convey.

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 purpose is front-loaded in the first sentence and every subsequent sentence carries distinct information (versioning, in-place file behavior, article_id scope, undo). It loses a point because the sentences are long and heavily nested with parentheticals ('a file no article lists, which goes to the trash holding the earlier version'), making it slower to parse than necessary.

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 non-idempotent, open-world mutation with three parameters and an output schema, the description covers side effects, reversibility, scope branching, type constraints, and required permissions. Nothing an agent needs to invoke it safely or to recover from it is missing, and return-value details are correctly left to the output schema.

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

Parameters5/5

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

Schema coverage is 100%, but the description still adds semantics the schema lacks: with_media_id must be type-matched ('an image for an image, a video for a video'), must be a file no article currently lists in the file case, and article_id restricts replacement to one article plus its translations and is invalid for files. These are real constraints that change how an agent chooses arguments.

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 opens with a precise verb and resource ('Put another library item ... in the place of media_id') and immediately scopes the operation ('in every live article whose current text or a translation shows it'). It distinguishes the default all-articles behavior from the single-article mode (article_id) and from the file-replacement case, so an agent can tell it apart from siblings like colliedesk_kb_media_update or colliedesk_kb_media_replace_undo 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?

It states explicitly when the default scope applies, when to use article_id instead ('as for an edited copy of a screenshot'), that article_id is 'Not for a file', and names the escape hatch ('Undo it with colliedesk_kb_media_replace_undo and the replacement_id'). It also gives the prerequisite permission for the narrower path (kb_articles:update), leaving nothing to inference about which variant to pick.

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