Skip to main content
Glama
jagoff

obsidian-mcp-complete

by jagoff

obsidian_delete_note

Destructive

Move an Obsidian note to the .trash/mcp folder or permanently delete it. Requires explicit confirmation to prevent accidental loss.

Instructions

Move a note to .trash/mcp or permanently delete it. Requires OBSIDIAN_ENABLE_DELETE=1 and confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vaultNoOptional configured vault name. Defaults to the server default vault.
pathYesVault-relative path. Absolute paths and traversal are rejected.
confirmationYes
permanentNo

Implementation Reference

  • src/tools.ts:611-621 (registration)
    Registration of the 'obsidian_delete_note' tool with schema and handler delegating to vaults.trash()
      "obsidian_delete_note",
      "Move a note to .trash/mcp or permanently delete it. Requires OBSIDIAN_ENABLE_DELETE=1 and confirmation.",
      {
        vault: vaultArg,
        path: pathArg,
        confirmation: z.string(),
        permanent: z.boolean().optional().default(false),
      },
      async (args) => vaults.trash(vaults.notePath(args.path), args.vault, args),
      { destructiveHint: true },
    );
  • Core handler vaults.trash() that resolves path, validates confirmation, and either permanently deletes or moves to .trash/mcp/
    async trash(
      notePath: string,
      vaultName?: string | null,
      options: { permanent?: boolean; confirmation?: string } = {},
    ): Promise<{ deleted: boolean; path: string; trashPath?: string; permanent: boolean }> {
      this.assertWritable();
      if (!this.config.enableDelete) {
        throw new Error("Delete is disabled. Set OBSIDIAN_ENABLE_DELETE=1 to enable this tool.");
      }
      const resolved = this.resolvePath(notePath, vaultName);
      if (options.confirmation !== resolved.relative && options.confirmation !== "DELETE") {
        throw new Error(`Confirmation must equal "${resolved.relative}" or "DELETE"`);
      }
      if (options.permanent) {
        await fs.unlink(resolved.absolute);
        this.onInvalidate?.(resolved.vault.name);
        return { deleted: true, path: resolved.relative, permanent: true };
      }
      const stamp = new Date().toISOString().replace(/[:.]/g, "-");
      const trashRel = `.trash/mcp/${stamp}-${path.basename(resolved.relative)}`;
      const trashAbs = path.join(resolved.vault.root, trashRel);
      await fs.mkdir(path.dirname(trashAbs), { recursive: true });
      await fs.rename(resolved.absolute, trashAbs);
      this.onInvalidate?.(resolved.vault.name);
      return { deleted: true, path: resolved.relative, trashPath: trashRel, permanent: false };
    }
  • Input schema for obsidian_delete_note: vault (optional), path (required), confirmation, and permanent
    {
      vault: vaultArg,
      path: pathArg,
      confirmation: z.string(),
      permanent: z.boolean().optional().default(false),
    },
  • enableDelete config flag gates delete tool access
    enableDelete: boolean;
  • enableDelete set from OBSIDIAN_ENABLE_DELETE env var
    enableDelete: truthy(env.OBSIDIAN_ENABLE_DELETE),
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate destructiveHint=true, but the description adds useful behavioral context: the need for an environment variable, the two deletion modes, and confirmation requirement. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, no filler. Every word is necessary for understanding the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers key decision factors: action, modes, prerequisites. Lacks details on return values, but no output schema exists, so this is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50% (2 of 4 parameters described). The description adds meaning to 'permanent' by referencing permanent deletion, but 'confirmation' and 'vault' are not further explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool moves a note to trash or permanently deletes it. It distinguishes from sibling tools like obsidian_delete_folder by focusing on single note deletion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions prerequisites (OBSIDIAN_ENABLE_DELETE=1 and confirmation) but does not explicitly guide when to use move vs permanent delete or when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/jagoff/obsidian-mcp'

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