Write Document Content
write_documentReplace 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
| Name | Required | Description | Default |
|---|---|---|---|
| graph_id | Yes | ||
| document_id | Yes | ||
| content | Yes | ||
| comments | No |