update_wiki_page
Edit a wiki page: retitle it, change its body, move it under another parent (or to the top of its space), or set its labels. Identify it by 'id', or by 'spaceKey' + 'title'. To change part of the body, pass 'edits' (exact find-and-replace on the Markdown source, each 'oldText' occurring exactly once) or 'replaceSection' — the answer says where each landed, not the page, so a one-line fix to a long page costs one line. 'markdown' replaces the whole body — read it first with get_wiki_page(withMarkdown: true) and edit that, or the page's links, images and macros are dropped; 'appendMarkdown' adds to the end and leaves what is there untouched. Mention someone as @Their Name, the wiki's own form. Requires permission to edit the page. Answers with 'notified' (who this actually reaches) and 'unresolvedMentions' (what looked like a mention and reached nobody, each with a reason) — a wrong handle is stored as written and never refused, so that list is the only sign it did not land.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Page id (as returned by search_wiki). | |
| edits | No | Exact replacements in the page's Markdown source — the text get_wiki_page returns with 'section', 'offset' or withMarkdown: true. Every 'oldText' is matched against the page as you read it (not against the result of the other edits) and must occur exactly once unless 'replaceAll' is set; if any edit does not fit, none is applied. Pair with 'expectedVersion'. | |
| title | No | Current page title, when identifying the page by title. | |
| labels | No | Labels to set, space or comma separated. Replaces the existing set. | |
| message | No | Short note for the page history, e.g. why you changed it. | |
| markdown | No | The complete new body as Markdown — replaces what is there. Carries $…$ / $$…$$ LaTeX formulas and the wiki's macros on a line of their own ({toc}, {children}, {info} … {info}, {expand:title=…} … {expand}). | |
| newTitle | No | New title. The page's existing links follow the rename. | |
| parentId | No | Move the page under this parent page id. | |
| spaceKey | No | Space key, when identifying the page by title. | |
| minorEdit | No | Mark this as a minor edit in the history. | |
| toTopLevel | No | Move the page to the top of its space, out from under any parent, so it sits beside the space's other root pages. Use this instead of parentId/parentTitle — a tool argument has no way to say 'no parent' by leaving one out. | |
| parentTitle | No | Move the page under the page with this title, in the same space. | |
| appendMarkdown | No | Markdown to add to the end of the page, leaving the rest as it is. Same syntax as 'markdown'. | |
| replaceSection | No | Replace one whole section: 'section' names it as get_wiki_page's 'section' does (anchor or heading text), 'markdown' is what replaces it — heading line included, as reading the section returned it. Can be combined with 'edits' elsewhere on the page. | |
| expectedVersion | No | The version you read (from get_wiki_page). If the page has moved on since, the edit is refused instead of overwriting someone else's. |