delete_note
Remove a note from your Obsidian vault by specifying its file path to declutter and organize your knowledge base.
Instructions
Delete a note from the Obsidian vault
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the note to delete relative to vault root |
Implementation Reference
- src/index.ts:453-462 (handler)The handler function that implements the delete_note tool. It resolves the note path, checks existence, deletes the file using fs.unlink, and returns a success message.async function handleDeleteNote(args: { path: string }): Promise<string> { const fullPath = resolvePath(args.path); if (!(await fileExists(fullPath))) { throw new Error(`Note not found at ${args.path}`); } await fs.unlink(fullPath); return `Successfully deleted note at ${args.path}`; }
- src/index.ts:50-63 (schema)The tool schema definition including name, description, and inputSchema for the delete_note tool, used for registration and validation.{ name: "delete_note", description: "Delete a note from the Obsidian vault", inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the note to delete relative to vault root", }, }, required: ["path"], }, },
- src/index.ts:870-872 (registration)The switch case registration that dispatches calls to the delete_note handler in the main tool call handler.case "delete_note": result = await handleDeleteNote(args as { path: string }); break;