akb_edit
Edit a single document by replacing exact text. Fails clearly if the text is missing or ambiguous, and supports insert, replace, or delete inline content without resending the document body.
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. Use this for inserting, replacing, or removing an inline image without resending the complete document body. For find-and-replace across many documents, use akb_grep with replace instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | Document URI | |
| message | No | Commit message describing the change | |
| new_string | Yes | Replacement text. Can be empty to delete. | |
| 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. | |
| base_commit | No | Optional OCC pin — when set, the edit is rejected if the document's current_commit moved. Use after akb_get to fail-fast on concurrent writers. | |
| replace_all | No | Replace all occurrences (default: false, requires old_string to be unique) | |
| _vault_skill_ack | No | Opaque acknowledgement returned as vault_skill.ack_token. After applying that guide, retry the unchanged operation with this value. The bundled proxy supplies it automatically. |