Skip to main content
Glama
j-shelfwood

Obsidian Local REST API MCP Server

by j-shelfwood

delete_item

Remove files or directories from your Obsidian vault to manage storage and organize notes.

Instructions

Delete a file or directory from the vault

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the item to delete

Implementation Reference

  • The core handler function in ObsidianApiClient that executes the DELETE request to the Obsidian REST API endpoint `/files/{path}` to delete the specified file or directory.
    async deleteItem(path: string) {
      return this.request(`/files/${encodeURIComponent(path)}`, {
        method: "DELETE",
      });
    }
  • Tool schema definition including name, description, and input schema requiring a 'path' string parameter.
    {
      name: "delete_item",
      description: "Delete a file or directory from the vault",
      inputSchema: {
        type: "object",
        properties: {
          path: { type: "string", description: "Path to the item to delete" },
        },
        required: ["path"],
      },
    },
  • src/index.ts:472-474 (registration)
    Tool call dispatcher in the CallToolRequestHandler switch statement that routes 'delete_item' calls to the client.deleteItem handler.
    case "delete_item":
      result = await this.client.deleteItem(args?.path as string);
      break;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Delete' implies a destructive mutation, the description lacks details on permissions required, whether deletion is permanent or reversible, error handling (e.g., if path doesn't exist), or side effects. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, direct sentence that efficiently conveys the core action without unnecessary words. It is front-loaded with the key verb and resource, making it easy to parse and ideal for quick comprehension by an AI agent.

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?

Given the tool's destructive nature, lack of annotations, and absence of an output schema, the description is insufficiently complete. It does not cover critical aspects like return values, error conditions, or behavioral nuances (e.g., recursive deletion for directories), leaving significant gaps for safe and effective tool invocation.

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 schema description coverage is 100%, with the single parameter 'path' clearly documented in the schema. The description does not add any semantic details beyond what the schema provides (e.g., path format examples or constraints), so it meets the baseline for high schema coverage without enhancing parameter understanding.

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

Purpose4/5

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

The description clearly states the action ('Delete') and the target ('a file or directory from the vault'), making the purpose immediately understandable. However, it does not differentiate this tool from potential siblings like 'write_file' or 'create_or_update_note' in terms of destructive nature, which would require explicit mention for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., item existence), exclusions (e.g., cannot delete non-empty directories if applicable), or suggest alternatives like 'write_file' for modifications, leaving the agent without contextual usage cues.

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/j-shelfwood/obsidian-local-rest-api-mcp'

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