Update a page
update_pageSave a complete new Markdown version of a Sophia wiki page using its current version to prevent overwrite conflicts; re-read and merge if a 409 occurs.
Instructions
Save a new version of a page (needs editor role). Always read the page first (get_page) and send the version you read: if someone saved in between, Sophia answers 409 and you must re-read, merge their changes with yours and save again with the new version. Send the COMPLETE new body (it replaces the old one); title and body are each optional, the one you omit stays as it is. Body = GitHub-flavoured Markdown (tables, task lists, fenced code). Raw HTML is NOT rendered (shown as text), so convert it. Sophia syntax: files ; mentions @[Name](user:<uuid>); panels = blockquote whose first line is > [!INFO], > [!NOTE], > [!SUCCESS], > [!WARNING] or > [!ERROR]; internal links [Title](/sophia/spaces/<KEY>/pages/<pageId>); Kanbio ticket keys written as plain text (e.g. PROJ-12; not inside code or links) link automatically. Links may only point to http(s), mailto, /site-paths or #anchors; images only to attachment: or http(s).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"page_id": "<page_id>",
"version": "<version>"
},
"name": "update_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | The complete new Markdown body. | |
| title | No | ||
| page_id | Yes | Sophia page id (uuid), from get_page_tree, search_pages or recent_pages. | |
| version | Yes | The version you read with get_page (the current one at that moment). |