Delete Note
vault_delete_noteDelete a markdown note from your Obsidian vault, moving it to .trash/ per your Deleted files setting or removing it permanently. Optionally prune folders left empty by the delete.
Instructions
Delete a markdown note, moving it to the vault's .trash/ folder or removing it for good as the vault's Obsidian "Deleted files" setting directs.
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. To relocate a note, use vault_move_note instead. To replace a note's content, use vault_write_note with overwrite: true instead.
Behavior:
The "Deleted files" setting decides the outcome, which the caller can't choose or see in advance:
"Move to system trash" moves the note to
.trash/. Notes this server moved there are deleted after its retention period (TRASH_RETENTION_DAYS: 30 days by default, never when set to none)."Move to Obsidian trash" moves the note to
.trash/and keeps it forever."Permanently delete" removes the note for good.
Links to the note from other notes become broken; list them first with vault_get_backlinks. Protected paths are refused: About Me/ and the daily notes folder (Daily Notes/ by default; vault_get_daily_note's path shows the folder in use; not protected when Obsidian's Daily Notes folder setting is the vault root or blank).
Parameters:
prune_empty_folders keeps a folder that holds any file, even a hidden .DS_Store. Pruning is best-effort: a folder that can't be removed never fails the call.
Errors:
"cannot delete protected path" — the path sits under a protected folder; use vault_delete_memory for a memory entry, or ask the vault's owner to delete the note in Obsidian
"path must end in …" — add the .md extension
"absolute path blocked" / "path traversal blocked" / "hidden path blocked" — pass a vault-relative path with no dot-prefixed part
"concurrent write in progress" — another write to this note is in flight; retry
"note not found: …" — verify path with vault_list_notes
"cannot move to trash … — 100 collisions in .trash/" — .trash/ holds this name and 100 numbered copies; ask the vault's owner to clear old copies, then retry
"cannot move to trash …" without "100 collisions" — the note stays put; ask the vault's owner to fix .trash/ (e.g. a plain file blocks a needed folder), then retry
"cannot delete …" (other than a protected path) — the note stays put; ask the vault's owner to fix the cause (e.g. permissions), then retry
"ENAMETOOLONG: …" or another filesystem error — the message says what to do; the note stays put
"cannot read trash config from .obsidian/app.json" — ask the vault's owner to repair it, then retry
"cannot read daily notes config from .obsidian/daily-notes.json" — the file that names the protected daily notes folder can't be parsed; ask the vault's owner to repair it, or the server's operator to set DAILY_NOTES_FOLDER or PROTECTED_PATHS, then retry
Returns: Confirmation message naming the outcome — "Deleted " for permanent removal, "Moved to trash (<.trash/ path>)" when the note landed in .trash/. Notes how many empty folders were pruned when any were.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "vault_delete_note"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Vault-relative path of the note to delete, including the ".md" extension. Use the exact letter case. | |
| prune_empty_folders | No | When true, also remove parent folders the delete leaves empty. Default false. |