Skip to main content
Glama

Write Document Content

write_document

Replace document content with TipTap XML for real-time UI synchronization in Mnemosyne knowledge graphs. Supports collaborative editing with comments and structured formatting.

Instructions

Replaces document content with TipTap XML. Syncs to UI in real-time.

WARNING: This REPLACES all content. For collaborative editing, prefer append_to_document.

Blocks: paragraph, heading (level="1-3"), bulletList, orderedList, blockquote, codeBlock (language="..."), taskList (taskItem checked="true"), horizontalRule Marks (nestable): strong, em, strike, code, mark (highlight), a (href="..."), footnote (data-footnote-content="..."), commentMark (data-comment-id="...") Example: Text with highlight and a note

Comments: Pass a dict mapping comment IDs to metadata. Comment IDs must match data-comment-id attributes in the content. Example comments: {"comment-1": {"text": "Great point!", "author": "Claude"}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graph_idYes
document_idYes
contentYes
commentsNo
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing critical behavioral traits: it replaces all content (destructive), syncs to UI in real-time, and warns about the replacement nature. It also hints at collaboration considerations but doesn't cover permissions, rate limits, or error handling in depth.

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?

The description is appropriately sized and front-loaded with key information (replacement action and warning). Every sentence adds value, such as usage guidelines, XML details, and examples, though the structure could be slightly tighter by integrating examples more seamlessly.

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?

Given the tool's complexity (destructive write operation with XML content and comments), no annotations, and no output schema, the description is largely complete: it covers purpose, usage, parameters, and behavioral aspects. However, it lacks details on error cases, response format, or authentication needs, leaving minor gaps.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It adds substantial meaning beyond the schema: 'content' is TipTap XML with detailed block and mark examples, 'comments' is a dict mapping IDs to metadata with examples, and it implies 'graph_id' and 'document_id' identify the target. This effectively documents all parameters.

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 specific action ('Replaces document content with TipTap XML') and resource ('document'), distinguishing it from sibling tools like 'append_to_document' by emphasizing replacement versus appending. It also mentions real-time UI syncing, adding operational context.

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: use this tool to replace all content, and for collaborative editing, prefer 'append_to_document' instead. This directly addresses when to use this tool versus alternatives, with clear exclusions for specific scenarios.

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/sophia-labs/mnemosyne-mcp'

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