Skip to main content
Glama

clearly_replace

DestructiveIdempotent

OVERWRITE the whole body of an EXISTING artifact. Destructive: anything in it the caller did not write is replaced (the workspace keeps a version to restore). target accepts a path, key, id or exact title. For a canvas, content is the JSON-encoded array of nodes and expectedRev is checked against the saved revision. A stale-revision refusal carries the current scene. batch supports several replacements.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "clearly_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoOverride the type when the target does not name it.
batchNoReplace several: `[{ target, content }, …]`. Max 50.
titleNoNew title (optional).
targetNoThe existing artifact: path, key, id or exact title.
contentNoThe whole new body: markdown for a document, CSV/TSV for a sheet, JSON-encoded nodes for a canvas.
expectedRevNocanvas only: the `canvasNodesRev` you read. Refused if the scene moved since.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint and idempotentHint, yet the description adds genuinely new behavior: exactly what is lost ('anything in it the caller did not write is replaced'), that a version is kept for restore, that a stale-revision refusal returns the current scene, and the 50-item batch cap. That is meaningful context beyond the structured fields, though it omits permission or rate-limit aspects.

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?

Four dense sentences, front-loaded with the verb and destructive warning, each carrying distinct information with no filler. The batch and canvas caveats come after the core statement, which is the right order.

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?

With no output schema, the description usefully covers the error path (stale-revision refusal returns the scene) and target resolution forms. It is nearly complete for a destructive write tool, with only permission/authorization requirements left unstated.

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 coverage is 100%, so the baseline is a 3; the description still adds value by explaining that expectedRev is checked against the saved revision and that a mismatch returns the current scene, and by clarifying the canvas-specific JSON node encoding. The remaining parameters (type, title) are left to the schema.

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 in caps (OVERWRITE) plus the resource and scope: the whole body of an EXISTING artifact. The emphasis on 'whole body' implicitly separates it from the partial-edit sibling without ambiguity about what it does.

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

Usage Guidelines3/5

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

Usage is implied through the destructive framing and the canvas/batch notes, so an agent can infer when full replacement is appropriate. However, it never explicitly says when to prefer a partial edit over a full overwrite, so no real exclusion or alternative is named.

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.