Create a document of any type
create-documentCreate any Foundry document type, including embedded ones inside another document via parentUuid. Use when specialized tools don't apply; preview with dryRun first.
Instructions
Generic fallback: create one document of any type in the world, or inside another document with parentUuid (a page in a journal, an item on an actor, a wall on a scene). data holds the fields as nested objects, as describe-document-type shows them. The permission settings apply as for the specialised tools; ids, ownership, _stats and the flags of this module cannot be given. The answer is read back from Foundry. Use dryRun first. Prefer journal-create, journal-add-page, create-scene, manage-actors, manage-world-items, create-macro and create-roll-table where they fit. Chat messages are sent only with send-chat-message; settings, users and compendiums are not written here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Fields of the new document as nested objects, e.g. { "name": "Goblin", "type": "npc" } | |
| dryRun | No | Only check and preview; nothing is written. Recommended before the real call | |
| parentUuid | No | uuid of the document that holds an embedded one, e.g. "Actor.abc" for its items, "Scene.abc" for its walls | |
| documentType | Yes | Foundry document name, e.g. "Actor", "JournalEntryPage", "Combat", "Wall"; with id when no uuid is given |