Delete Note
vault_delete_notePermanently delete a markdown note from disk, bypassing trash. Optionally prune empty parent folders. Protected paths under About Me/ and Daily Notes/ are refused.
Instructions
Permanently delete a markdown note — removed from disk directly (no trash, no undo). After deletion, links to it from other notes become broken (detectable via vault_get_backlinks). Protected paths (About Me/, Daily Notes/) are refused.
Example: vault_delete_note({ path: "Scratch/temp.md" }) Example: vault_delete_note({ path: "Archive/2024/old.md", prune_empty_folders: true }) — also remove "Archive/2024" (and "Archive") if deleting the note empties them.
When to use: Removing a note you no longer need. Prefer vault_delete_memory for removing individual dated entries from About Me/ memory files.
Behavior: With prune_empty_folders, pruning is best-effort and runs after the delete — it never fails the call, so the note is always removed even if a folder can't be removed.
Errors:
"cannot delete protected path …" — the path sits under a protected folder; use vault_delete_memory for memory entries
"path traversal blocked" — path escapes the vault root; use a vault-relative path
note does not exist — verify the path with vault_list_notes before deleting
Returns: Confirmation message, noting how many empty folders were pruned when any were.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path of the note to delete, including the ".md" extension | |
| prune_empty_folders | No | When true, remove the note's parent folder(s) if deleting it leaves them empty, walking up to (but never including) the vault root. Default false matches Obsidian, which leaves empty folders in place. Only removes a folder with zero entries — a folder still holding any file, including a hidden one like .DS_Store, is left alone. |