Edit Note
editReplace text in an existing note by exact string match, by line range, or within a line range. Read the note first, then apply precise edits and deletions.
Instructions
Replace text in an existing note, chosen by an exact old_text, by a range of lines, or by an old_text within a range of lines.
Read the note first for its current text. When old_text has no
exact match, a unique match after normalising Unicode, dashes, quotes and
whitespace is used and reported as match_type "normalized".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of the note. | |
| if_match | No | Etag from read. Pass it, one edit per read, when line_start and line_end are given; omit it for several old_text-only edits to one note at once. | |
| line_end | No | Last line to replace, inclusive; pass with line_start. | |
| new_text | No | Replacement text; empty deletes the matched text or the lines. | |
| old_text | No | Text to replace, occurring once in the note or in the line range; omit to replace the whole line range. | |
| line_start | No | First line to replace, counting from 1 over the content read returns, frontmatter included; pass with line_end. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||