Skip to main content
Edit part of an existing note in place. Name an anchor: a heading section (anchor:{type:“heading”,heading:“Notes”}), a block reference (anchor:{type:“block”,block_id}), or the preamble above the first heading (anchor:{type:“frontmatter”}); then an operation: append/prepend/replace content, or replace_text (old_string/new_string). Required fields per operation (anchor or target_heading on append, prepend and replace only): append, prepend, replace: content; replace_text: old_string + new_string. Refused: old_string/new_string on append, prepend, replace; content on replace_text. Frontmatter is preserved. Examples: add a line to the end of a section = operation append + heading anchor + content. insert_before is append-only: it inserts content above a unique matching line within the resolved section, useful for keeping signatures, Parent links and footnote blocks at the end. Move, reorder or duplicate sections = ONE replace_text anchored on an enclosing heading (the note’s top-level H1 spans every section below it): old_string is those sections as they are now, new_string the same text rearranged; the anchor heading line itself is never touched. To add at the very end of a note use append_note, which needs no anchor. A heading that appears more than once needs anchor.occurrence (1-based, document order) or a path (heading:“Parent > Child”); without either the call is refused with every matching line number, never silently bound to the first match (same for a block id on more than one line). On a heading anchor, replace preserves the anchor heading line itself; if content’s first non-blank line repeats it (same level and text), that line is dropped so the two calling conventions do not double the heading. replace_text takes old_string/new_string instead of content and substitutes an exact match scoped to the resolved anchor’s section; with neither anchor nor target_heading it is note-wide (the whole note body, frontmatter excluded, heading lines included), so a heading typo can be fixed in one call. 0 or 2+ matches is refused (with the count for 2+); confirm_replace is ignored for it. A replace on a heading anchor that would discard more than 20 lines AND over half of the note’s body (e.g. the note’s only H1, which no lower-or-equal heading bounds) is refused unless confirm_replace is set. Snapshots (restore_note’s undo) are captured only when the server’s snapshots.enabled config is on; the default “trusted-local” posture leaves it on, so such a write is rollback-able via restore_note unless snapshots have been explicitly disabled. response_format=concise acknowledges with {vault, path, content_hash} only (plus quality_warning, redactions, and lines_removed/bytes_removed when non-zero).

Annotations

Idempotent is the advisory MCP idempotentHint. Destructive is also yes for a tool that asks for confirmation only on some calls.

Confirmation (human in the loop)

No human confirmation is required to call this tool.

Input

Output

Other tools in the notes domain: append_note, bulk_create_notes, bulk_move_notes, copy_note, delete_note, fetch, get_provenance, list_notes, list_snapshots, move_note, note_exists, read_note, read_notes, read_resources, read_snapshot, restore_note, snapshot_note, write_note. Back to the tool catalog.