Change one passage of a wiki page
edit_wikiReplaces one passage of an existing wiki page without resending the body. Pass the exact text to replace (oldString) and what it becomes (newString) — the same contract as a code editor's Edit: oldString must occur exactly once on the page. If it is missing, or occurs more than once, nothing is written and the error says which; copy the text verbatim from get_wiki (whitespace and line breaks count) or include more surrounding text to make it unique. newString="" deletes the passage. Matching is literal, not a regex. This is the normal way to fix a sentence, update a value, or correct one rule on a page that already exists. Use write_wiki when you are composing a page or rewriting several sections at once, and mode="append" there when a section is genuinely missing. The edit is a revision like any other write: it folds into your previous write within 30 minutes unless newRevision=true, and baseRev refuses the edit when the page moved on since you read it. The response carries rev, coalesced, previousBodyChars and bodyChars, plus warnings[] when the page as a whole now strays from the skeleton — not the body. Requires a write-scope token.
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>",
"page": "<page>",
"oldString": "<oldString>",
"newString": "<newString>"
},
"name": "edit_wiki"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | Page slug of an existing page. | |
| slug | Yes | Ground slug. | |
| baseRev | No | The revision you read. If the page has moved past it, the edit is refused. | |
| newString | Yes | The replacement text. "" deletes the passage. | |
| oldString | Yes | The exact text to replace. Must occur exactly once on the page. | |
| newRevision | No | Force a new revision instead of folding into your last write. |