Replace text in a Docmost page
replace_page_textReplaces exact text in a Docmost page while preserving comments, mentions, and formatting, and merges with concurrent edits; rewrite the full body in Markdown only when needed.
Instructions
Replaces an exact piece of text in a page, changing plain text in the live document so it merges with anyone editing and keeps comments, mentions and formatting, with Docmost saving it within 45 seconds, and rewriting the whole body from Markdown only when the change needs Markdown.
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": {
"pageId": "<pageId>",
"oldText": "<oldText>",
"newText": "<newText>"
},
"name": "replace_page_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | Page id, slug id, or the full page URL copied from the browser. | |
| newText | Yes | Replacement Markdown; an empty string deletes oldText. | |
| oldText | Yes | Exact text to replace, copied from get_page output; must match once unless replaceAll is set. | |
| replaceAll | No | Replace every occurrence of oldText; defaults to false. |