Skip to main content
Glama

Replace a document's content

claix.document.replace
Destructive

Replace the content of a persisted document with another document's content (POST /replace-document). Body: document_id (kept) and new_content_document_id (source, deleted after copy). Records a swap, bumps version, and returns swap_id, version, and swaps_count. Free call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoAPI key secreta de Claix. Ejemplo: claix_sk_abc123.... Opcional si la conexión MCP envía x-api-key en cabecera HTTP (recomendado en Smithery/Cursor).
document_idYesUUID del documento persistido (document_id de una extracción con window_context). Ejemplo: 3c7a9f21-4b8e-4d1a-9c6f-2e0d8a5b7c4f.
new_content_document_idYesUUID of the source document whose file_name and markdown_content will be copied onto document_id. Deleted after a successful replace. Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoJSON payload from the Claix API (extracted records, schema list, or Excel export metadata).
errorNoHuman-readable error message when success is false.
successYesTrue when Claix returned a successful response. False when isError is set on the tool result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

With annotations already flagging destructiveHint=true and idempotentHint=false, the description still adds substantive behavior: the source document is deleted after a successful copy, a swap is recorded, the version is bumped, and the call is free. This tells the agent exactly what is irreversibly lost.

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 packed sentences with the endpoint, the argument roles, the side effects, and the return values front-loaded. No filler.

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 destructive two-argument mutation, the description covers inputs, side effects, versioning, and return fields, and an output schema exists to carry the response shape. Nothing needed to call it correctly is missing.

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 both required UUIDs are already documented in the schema. The description's notes ('kept' vs 'source, deleted after copy') reinforce role semantics but add little that the schema does not already carry; baseline 3 applies.

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 ('Replace the content of a persisted document with another document's content') and pins the HTTP endpoint. An agent can distinguish it from siblings like claix.document.delete or claix.spaces.remove_document without opening the schema.

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 description explains the mechanics of the swap but never states when to choose this over alternatives or what prerequisites/context it requires. Usage is implied by the operation rather than guided.

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