replace_in_note
Replaces exact text in a Kybase note without resending the whole note, with ordered batch edits and count-checked all-or-nothing writes.
Instructions
Replace exact text in a note without resending the rest. Either find/replace or old_string/new_string — the same pair, either spelling.
For several replacements pass edits rather than the singular fields (one lock and one re-embed for the batch, not one per call); the two forms cannot be combined in one call. Edits apply in order, and each find is matched against the note as the edits before it already changed it — an earlier edit can create the text a later one needs, or destroy it, so sequence them. If any step's count is wrong the whole batch is refused and the note is left untouched, and the error names the failing index.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The note's UUID. Alternative to title | |
| find | No | Text to replace. Alias: old_string | |
| edits | No | Multiple find/replace steps applied in order in a single call — see main description. | |
| title | No | Alternative to id; resolved like get_note | |
| replace | No | Replacement text. Alias: new_string | |
| new_string | No | Alias for replace | |
| old_string | No | Alias for find | |
| expected_count | No | How many times `find` is expected to occur (default 1). The edit is refused if the real count differs, so a loose `find` cannot quietly rewrite more than intended | |
| expected_updated_at | No | ISO updated_at from when you read the note; refuses the write if it changed since |