Skip to main content
Glama
sureshsankaran

Obsidian Tools MCP Server

delete_note

Remove notes from your Obsidian vault to declutter and organize your knowledge base by specifying the file path.

Instructions

Delete a note from the Obsidian vault

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the note to delete relative to vault root

Implementation Reference

  • The main handler function for the delete_note tool. It resolves the full file path, checks if the note exists, 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}`; }
  • Input schema for the delete_note tool, specifying a required 'path' parameter of type string.
    inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the note to delete relative to vault root", }, }, required: ["path"], },
  • src/index.ts:50-63 (registration)
    Registration of the delete_note tool in the tools array, including name, description, and input schema. This is used by the ListTools handler.
    { 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-871 (registration)
    Switch case in the CallToolRequestSchema handler that routes calls to delete_note to the handleDeleteNote function.
    case "delete_note": result = await handleDeleteNote(args as { path: string });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sureshsankaran/obsidian-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server