Skip to main content
Glama

Rewrite document from text (new version)

clio_document_write

Replaces the body of an existing Clio DOCX with new markdown-lite text while keeping its header, footer, and styles. Preview first, then confirm the write.

Instructions

Creates a new version of an existing DOCX document in Clio from the given text (same markdown-lite format as clio_document_create_from_letterhead). The document body is REPLACED by the new text; header, footer and styles are kept (template = the document itself, or base='letterhead' = the current letterhead of the user). Suitable for fixing documents created by Claude; for third-party documents with complex formatting prefer downloading and editing in Cowork. Write operation – preview first, then confirm with the token from the preview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNodocument (default) = header/footer from the current version of the document; letterhead = from the user's letterhead
confirmNoconfirm=true performs the write. Use it directly when the user's request contains everything needed; call without confirm (preview) only when you want to check the data first or something is unclear.
contentYesNew complete text of the document (markdown-lite)
document_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • changedInput schema / properties / confirm / description
      Previous value: -"Leave out on the first call: the tool returns a PREVIEW with a confirmation token. Show the preview to the user, wait for their explicit approval, then repeat the call with identical arguments and confirm set to that token. confirm=true is not accepted."New value: +"confirm=true performs the write. Use it directly when the user's request contains everything needed; call without confirm (preview) only when you want to check the data first or something is unclear."
  2. First observedv1.0.0-beta.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the body is REPLACED (destructive scope), that header/footer/styles are preserved, the template/base semantics, and the two-step preview/confirm requirement. However, 'preview first, then confirm with the token from the preview' is at odds with the schema's confirm description ('use it directly when the user's request contains everything needed'), leaving the mandatory-vs-optional nature of the preview slightly ambiguous.

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?

Front-loads the core action and destruction semantics, then layers the alternative and write-flow guidance. Dense but every sentence carries information; the trailing preview/confirm sentence is the only part that could be tightened and is where the ambiguity lives.

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 mutation tool with no annotations and no output schema, the description covers destruction semantics, preserved elements, and the confirm flow well. It does not say what the call returns (e.g. new version identifier or number), which an agent would want after a version-creating write.

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 75%, and the description adds real meaning on top: it explains the base='letterhead' vs template=document distinction, specifies that content uses markdown-lite (same format as create_from_letterhead), and implies document_id targets an existing document. It adds context beyond the raw enum/property descriptions.

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 (creates a new version / rewrites) and resource (existing DOCX document in Clio), and explicitly contrasts with the sibling clio_document_create_from_letterhead by referencing its markdown-lite format. An agent can distinguish it from clio_document_upload_version and create_from_letterhead without opening schemas.

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?

Gives both when-to-use ('suitable for fixing documents created by Claude') and when-not with a named alternative ('for third-party documents with complex formatting prefer downloading and editing in Cowork'). It also routes the agent through the preview-then-confirm flow, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.