Skip to main content
Glama

Write Document

write_document
Idempotent

Overwrite the body of an existing Scrivener document with new plain text content. A backup is automatically created before the change.

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
contentYesDocument body as plain text. May be empty.
documentIdYesScrivener document UUID, as returned by get_structure (a binder item "id").
Behavior5/5

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

The description discloses key behaviors beyond annotations: overwriting the body, automatic backup, and atomic write. Annotations only indicate readOnlyHint=false and idempotentHint=true, but the description provides essential context about safety (backup) and execution guarantees (atomic), which are critical for an AI agent.

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?

The description is three sentences with no superfluous content. It front-loads the purpose in the first sentence, adds behavioral details in the second, and provides usage guidance in the third. Every sentence adds value efficiently.

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?

Given the tool's simplicity (2 parameters, no output schema) and the richness of annotations and description, the description is complete. It explains the action, behavioral traits, prerequisites, and differences from sibling tools. No missing information that would hinder correct invocation.

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% with both parameters ('content', 'documentId') fully described in the input schema. The description does not add any additional semantic information about the parameters beyond what the schema already provides. Baseline score of 3 is appropriate as the description does not enhance parameter understanding.

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 tool's primary action: 'Replace the entire text of an existing document with new content.' It uses a specific verb ('Replace') and resource ('entire text of an existing document'), and distinguishes itself from sibling tools 'update_document' and 'create_document' by naming the exact alternatives.

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?

Explicit guidance is provided on when to use this tool ('to replace content') and when to use alternatives ('To change only the title or metadata use update_document; to add a new document use create_document'). Prerequisites are also stated: 'Requires an open project and a 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