Document Create
document_createCreate new text or markdown documents from inline content, specifying name, format, and visibility scope for CozyVTT campaigns.
Instructions
Create a new txt/md document from inline content through REST. Use document_upload for PDF or larger local files, and document_update to replace existing text. Name and description are trimmed; content preserves whitespace. USER is personal, CAMPAIGN requires its DM, and GLOBAL rights are enforced upstream. Each accepted call creates a separate asset. Content is capped at 900 KiB UTF-8; upstream JSON limits also apply. Upload/create share a default 30 requests/minute/user limit. Creation does not separately link a personal asset; use document_share for that. 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 |
|---|---|---|---|
| name | Yes | Asset title, trimmed to 1..200 characters. | |
| scope | No | Visibility/ownership scope: USER (default personal), CAMPAIGN, or GLOBAL; upstream enforces creation rights. CAMPAIGN uses campaign_id. | USER |
| format | Yes | Text representation: txt or md; PDFs require document_upload. | |
| content | Yes | Complete text, including empty text, at most 900 KiB UTF-8; rejects C0/DEL controls except TAB/LF/FF/CR. | |
| campaign_id | No | Explicit campaign ID; null uses the configured campaign when scope=CAMPAIGN, otherwise omits the field. If supplied, it is forwarded for any scope. | |
| description | No | Optional metadata, trimmed to at most 1000 characters; null omits it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||