Skip to main content
Glama

Write Document

write_document
Idempotent

Replace the entire body of an existing document with new content. A backup is taken before an atomic overwrite.

Instructions

Replace the entire text of an existing document with new content. This overwrites the body; a backup of the previous version is taken first and the write is atomic. To change only the title or metadata use update_document; to add a new document use create_document. Requires an open project and a valid document id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
documentIdYes
Behavior5/5

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

Discloses key behaviors beyond annotations: overwriting the body, backup taken, atomic write. No contradiction with annotations (idempotentHint=true consistent with atomic write).

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 sentences pack essential purpose, behavior, alternatives, and prerequisites. No unnecessary words, well front-loaded.

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?

Covers purpose, behavior, alternatives, prerequisites. Lacks mention of return value or success signaling, but for a write operation with idempotentHint and no output schema, it is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, and the description does not explain parameter formats or constraints. It mentions 'valid document id' but no specifics; content is vague as 'new content'.

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?

The description clearly states the action ('replace the entire text'), the resource ('existing document'), and distinguishes from sibling tools. The verb 'replace' is precise and the resource is explicit.

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?

Explicitly provides when to use this tool and when not, naming alternatives (update_document, create_document). Also mentions prerequisites: open project and valid document id.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/writerslogic/scrivener-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server