Edit a Markdown or HTML doc
edit_docChanges a Markdown or HTML doc by exact text, without sending the whole file: each edit finds text and replaces it, in order. Read it first with get; its entry is the base. A find matches the file as stored: for HTML its source, not the readable text get gives with "text". All or none: a find that isn't there, or is there more than once without "all", changes nothing and says why. A newer entry since the base still takes the edits if every find holds there. Answers the new entry and the lines around each change. Up to 50 edits a call.
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": {
"doc": "<doc>",
"base": "<base>",
"edits": "<edits>"
},
"name": "edit_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | The doc's link or its code. | |
| base | Yes | The entry you read: entry in get. | |
| note | No | Keep this entry as a saved point, with this note. | |
| edits | Yes | [{"find": "exact text", "with": "new text"}], applied in order. |