edit_selected_part
Replaces one exact piece of text.
The old text must match exactly.
- Tool name
- edit_selected_part
- Group
- Files
- Risk
- medium
- Needs approval
- never
- Approval rule
- No approval. Hard blocks apply.
- Allowed in scheduled jobs
- No
- Default
- on
Parameters
| Name | Type | Required | Default | Meaning | Limits |
|---|---|---|---|---|---|
| path | string | Yes | Path relative to the project, such as vault/note.md. | ||
| old_text | string | Yes | Exact text to replace. Must match once. | ||
| new_text | string | Yes | Replacement text. |
Returns
A confirmation.
Example (made up for this page)
{
"path": "demo",
"old_text": "demo",
"new_text": "demo"
}Edited vault/notes/a.mdSide effects
- Changes a file.
How it can fail
| When | What the agent sees |
|---|---|
| Text not found | old_text not found (exact match required) |
See also:Files tools
Checked against the source at commit f4fd89f on 29 Oct 2026. Everything here is merged on the main branch; no release has been tagged yet. The source is private, so these pages are the public description.