Document Update
document_updateReplace an existing text document's entire content in CozyVTT. Read the document first to avoid data loss; empty input clears the text.
Instructions
Replace an entire txt/md document's content (uploader/admin only). Use document_read first to avoid losing text; use document_create for a new asset or document_upload for PDF. This is replacement, not merge-patching, and cannot edit PDF content. Empty content clears the text. Repeated writes can update metadata or notifications; no full-operation idempotency is promised. Returns upstream REST data. Returns {ok:true,data} on success; tool-body failures return {ok:false,error} with optional diagnostic data. Argument-schema errors are MCP errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Complete text, including empty text, at most 900 KiB UTF-8; rejects C0/DEL controls except TAB/LF/FF/CR. | |
| document_id | Yes | Existing editable text document asset ID, not a share-link ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||