Skip to main content
Glama
bazylhorsey
by bazylhorsey

delete_note

Remove notes from Obsidian vaults to maintain organized knowledge bases and eliminate outdated information.

Instructions

Delete a note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the note
vaultYesVault name

Implementation Reference

  • MCP tool handler for 'delete_note': retrieves the vault connector and calls its deleteNote method with the provided path.
    case 'delete_note': {
      const connector = this.connectors.get(args?.vault as string);
      if (!connector) {
        throw new Error(`Vault "${args?.vault}" not found`);
      }
      const result = await connector.deleteNote(args?.path as string);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema definition and registration for the 'delete_note' tool in the ListTools response.
    {
      name: 'delete_note',
      description: 'Delete a note',
      inputSchema: {
        type: 'object',
        properties: {
          vault: { type: 'string', description: 'Vault name' },
          path: { type: 'string', description: 'Path to the note' },
        },
        required: ['vault', 'path'],
      },
    },
  • deleteNote implementation for remote vaults: sends DELETE request to the remote API endpoint.
    async deleteNote(path: string): Promise<VaultOperationResult<void>> {
      try {
        await this.client.delete(`/vault/${encodeURIComponent(path)}`);
        this.notesCache.delete(path);
    
        return { success: true };
      } catch (error) {
        return {
          success: false,
          error: `Failed to delete note: ${error instanceof Error ? error.message : String(error)}`
        };
      }
  • deleteNote implementation for local vaults: deletes the file using fs.unlink and updates cache.
    async deleteNote(notePath: string): Promise<VaultOperationResult<void>> {
      try {
        const fullPath = path.join(this.config.path!, notePath);
        await fs.unlink(fullPath);
        this.notesCache.delete(notePath);
    
        return { success: true };
      } catch (error) {
        return {
          success: false,
          error: `Failed to delete note: ${error instanceof Error ? error.message : String(error)}`
        };
      }
  • Abstract method definition in BaseConnector interface that all connectors must implement.
    abstract deleteNote(path: string): Promise<VaultOperationResult<void>>;
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Delete' implies a destructive mutation, but it doesn't specify if the deletion is permanent, reversible, requires specific permissions, or has side effects (e.g., affecting related data). This is a significant gap for a tool that performs a critical operation.

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?

The description is extremely concise with just three words, front-loading the core action. There is no wasted language or redundancy, making it efficient for quick understanding, though it may be overly terse for completeness.

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

Completeness2/5

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

For a destructive tool with no annotations and no output schema, the description is inadequate. It doesn't cover behavioral aspects like safety, permissions, or return values, and with 2 required parameters, more context is needed to ensure correct usage. The high schema coverage doesn't compensate for the lack of operational guidance.

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?

The input schema has 100% description coverage, with clear definitions for 'path' and 'vault'. The description adds no additional meaning beyond the schema, such as explaining path formats or vault constraints. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the heavy lifting.

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

Purpose3/5

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

The description 'Delete a note' clearly states the verb (delete) and resource (note), which is better than a tautology. However, it lacks specificity about what constitutes a 'note' in this context (e.g., a file in a vault) and doesn't differentiate it from sibling tools like 'update_note' or 'get_note', making it somewhat vague.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention prerequisites (e.g., the note must exist), exclusions (e.g., cannot delete system notes), or related tools like 'update_note' for modifications instead of deletion. This leaves the agent without context for decision-making.

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

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