Run WordCraft engine commands
run_wordcraft_commandsExecute a sequence of WordCraft engine commands to create, edit, and save documents from templates or opened files, optionally driving the live app.
Instructions
Advanced: run any of WordCraft's 615 engine commands in order (text., format., para., styles., table., insert., layout., references., review., mailings., design., equation., chart., smartArt., fields.*...) plus the engine tools new_document / open_document / type_text / select_text / get_text / inspect_document / render_page / save_document (step id = the tool name), on a new document, a template or an opened file, then save. Parameters can use "$steps[N].field" for a value returned by step N (0-based). With live=true the steps drive the open WordCraft app instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | Drive the open WordCraft app (control port 7985) instead of a headless engine. | |
| name | No | wordcraft | |
| scale | No | png only: pixels per point (default 2 ≈ 144 dpi). | |
| steps | No | ||
| author | No | Who tracked changes and comments are by (headless only). | |
| markup | No | Print Markup: tracked changes marked up and comments beside each page (pdf / png), a comment list (html / md / txt). | |
| formats | No | Save the result (needs output_dir or output_path). | |
| password | No | docx only: encrypt the saved document with this password. | |
| template | No | New document template when there is no open_path. | blank |
| open_path | No | Absolute document to open first (never saved over; save a copy with formats). | |
| overwrite | No | ||
| output_dir | No | ||
| output_path | No | ||
| export_pages | No | png only: pages to render, 1-based: "1-3,5" (default all). | |
| preview_page | No | Return an image of this page. | |
| stop_on_error | No |