write_page
Write Markdown to LegendKeeper wiki pages with mentions, callouts, tables, tasks, and images. Atomic edits use expected_version to prevent overwriting changes made in the app.
Instructions
Write Markdown to a page document. [[Name]] and text become mentions; callouts, secrets, tables, task lists and images are supported. Writes are atomic; pass expected_version (from read_document) so edits made in the app after you read the page are never overwritten.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | append/prepend: add to the end/start. replace: replace the whole page (keep lk:keep markers to preserve special blocks). replace_section: replace the content under the heading `section` (include the heading in `markdown` to rename it). append_to_section: add to the end of that section. A missing section is created at the end of the page. | |
| project | No | Configured project (world) name. Omit to use the default project; see list_projects. | |
| section | No | Heading text for the *_section modes (case-insensitive). | |
| document | No | Document id or name within the resource. Omit to pick the resource's main document. | |
| markdown | Yes | Page content in LegendKeeper Markdown (see legendkeeper://guides/markdown). | |
| resource | Yes | Resource id, or its exact name/alias (case-insensitive). | |
| expected_version | No | The page version shown by read_document. When set, nothing is written if the page changed since then. Strongly recommended with mode='replace' or 'replace_section'. |