Skip to main content
Glama

replace_media

Swap an existing media asset's image (e.g. after re-cropping), keeping its id so entries referencing it stay intact. Upload the new file via get_upload_url first, then pass that call's id as assetId

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": {
      "id": "<id>",
      "assetId": "<assetId>"
    },
    "name": "replace_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
assetIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose one important behavior — the asset id is preserved so downstream entries remain valid — but says nothing about what happens to the previous image, whether this requires permissions, or whether it is reversible.

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

Conciseness5/5

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

Two tightly written sentences: the preservation guarantee is front-loaded and the required call sequence follows. No filler or redundancy.

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?

For a simple two-parameter mutation with no annotations or output schema, the description covers the main failure mode (wrong upload flow) and the key side effect (id retention). It stops short of covering the lifecycle of the replaced file or any confirmation step, which an agent might need.

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?

Schema description coverage is 0%, so the description must compensate. It clearly explains assetId as the `id` returned by get_upload_url, but the `id` parameter — the target asset — is only implied by 'existing media asset', and reusing the word 'id' for both values creates mild ambiguity.

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 (swap an existing media asset's image) plus the key invariant: the asset id is preserved so referencing entries stay intact. This distinguishes it clearly from get_upload_url (which creates the file) and confirm_media (which presumably finalizes it).

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 an explicit prerequisite and ordering: upload the new file via get_upload_url first, then pass that call's `id` as assetId, with a use case ('e.g. after re-cropping'). It does not state when NOT to use it (e.g. vs delete_media plus re-upload), so it falls short of full when/when-not/alternatives coverage.

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