Change a passage of a document
edit_docReplaces a passage in a document by exact text or by section/line range without reading the rest; keeps prior content for restore and refuses unsafe edits.
Instructions
Replace one passage of a document, named by its text in old or by place with section or from and to, which needs no reading of the rest. What it said is kept first for restore_doc, or the edit is refused. The answer's grew should be close to what you sent. A task's page too, by its own name: its boxes are the task's steps.
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>",
"new": "<new>"
},
"name": "edit_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last line; left out, to the end. Only with `from` | |
| doc | Yes | The document's id from `docs`, not its title | |
| new | Yes | What takes its place; empty takes the passage out | |
| old | No | The passage as written now, from `read_doc`, matching one place only; take in a line around it if needed. Not with `section` or lines | |
| echo | No | Hand back the lines around the change, instead of reading again | |
| from | No | First line to replace, from 1. Needs `print` | |
| No | The `print` from `read_doc` or `outline_doc`, for `section` or lines only. If anyone wrote since, nothing changes: ask `outline_doc` again | ||
| section | No | A heading and all under it, by its `at` in the `outline` of `outline_doc`, from 0. Needs `print` | |
| keep_compaction | No | Only on the person's word: `rules` «tidying» |