Skip to main content
Glama

AgentBin

Replace doc

replace_doc
DestructiveIdempotent

Replace the content of a doc or node. The previous content is kept as a revision.

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>",
      "body": "<body>"
    },
    "name": "replace_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of a doc or node (or of an edge, a message or a share link, where the path says so).
bodyYesThe new content.
titleNoA short title, up to 200 characters.
credentialNoThe bin's credential, "{bin_id}.{secret}", as create_bin returned it. Leave it out if your client sends it as an Authorization header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds genuinely new information: the prior content is retained as a revision, which materially changes the risk calculus of a destructive overwrite. It stops short of saying whether the revision is retrievable by this tool, or what a repeated identical replace does to the revision history.

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 short sentences, the action first and the safety-relevant consequence second. Nothing is wasted and nothing important is buried.

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 four-parameter destructive write with no output schema, the definition covers the action, the target type, and the recoverability guarantee. The remaining gap is whether replacement of a node preserves its edges or how the retained revision is surfaced, which an agent might reasonably want to know.

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 coverage is 100%, so id, body, title, and credential are all documented in the schema itself. The description adds no additional meaning about parameter behavior, so the baseline 3 applies.

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?

States a specific verb ('replace') and resource ('content of a doc or node'), which is enough to distinguish it from append_doc and create_doc by implication. It never names a sibling explicitly, so the differentiation is inferential rather than stated.

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?

The word 'replace' implies full-content overwrite as opposed to append_doc's incremental addition, so the when-to-use choice is implied rather than explained. There is no explicit statement of when not to use it or of prerequisites beyond the credential note carried in the schema.

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.