akb_edit
Replace exact text in a single document. Requires unique old_string or use replace_all to replace all occurrences.
Instructions
Edit a single document by replacing exact text. Scope is one document. old_string must be unique within the document (or use replace_all). If old_string is not found or appears multiple times, the call fails with a clear error. For find-and-replace across many documents, use akb_grep with replace instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | Document URI | |
| old_string | Yes | Exact text to replace. Must be unique in the document body unless replace_all=true. Include surrounding context if needed for uniqueness. | |
| new_string | Yes | Replacement text. Can be empty to delete. | |
| replace_all | No | Replace all occurrences (default: false, requires old_string to be unique) | |
| message | No | Commit message describing the change |