Update a dochost page
update_pageReplace the content of one of your pages in place. The URL, view/like counts, and expiry stay the same; only the body, format, and title change. Resending identical content is a no-op. Prefer this over publishing again whenever the user is revising something you already published for them — a second publish creates a second link and strands the one they already shared. This replaces the WHOLE body, so unless you wrote the live content yourself in this conversation, call get_page_content first and pass its version/sha256 back as ifVersion/ifSha — the write is then refused with the current version instead of overwriting an edit you never saw.
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": {
"slug": "<slug>",
"body": "<body>"
},
"name": "update_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| slug | Yes | ||
| ifSha | No | Write only if the live body still hashes to this (from get_page_content). | |
| title | No | ||
| format | No | ||
| ifVersion | No | Write only if the page is still at this version (from get_page_content). Omit and the write always wins. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| slug | Yes | ||
| title | No | ||
| format | No | ||
| version | No |