Skip to main content
Glama
maxkuminov

Obsidian MCP (pgvector + Ollama, self-hosted)

by maxkuminov

delete_file

Delete non-markdown files from an Obsidian vault, moving them to .trash for recovery or permanently unlinking with the permanent flag. Markdown files, directories, and symlinks are refused.

Instructions

Delete a non-markdown file from the vault. Requires a readwrite API key. Peer to delete_note, which stays markdown-only.

By default this is a soft delete: the file moves to .trash/<YYYYMMDD-HHMMSS>-<basename>-<8 hex> inside the vault, keeping a copy the user can recover. Two files with the same name deleted in the same second both survive — the trash never clobbers.

With permanent=True the file is unlinked outright and this server has no recovery path; the user's backups are the only rollback.

Refuses markdown files (use delete_note, which understands the index and backlinks), directories, and symlinks. Non-markdown files are not indexed, so search and embeddings are unaffected either way.

Args: path: Vault-relative path to the file. permanent: If True, unlink instead of moving to .trash/.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
permanentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Even though no annotations are provided, the description thoroughly discloses behavior: default soft delete moves to `.trash/` with a timestamped name ensuring no clobbering; `permanent=True` unlinks with no recovery; refuses certain file types; explains that non-markdown files are not indexed so search/embeddings unaffected. This exceeds the typical transparency expectation.

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

Conciseness4/5

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

The description is thorough but not bloated; it uses paragraphs to explain soft delete, permanent delete, and refusal cases. It could be slightly more compact, but each sentence adds value. The args section is redundant given the schema, but it explains semantics beyond field names.

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

Completeness5/5

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

With no annotations and no output schema details, the description fully covers purpose, behavior, edge cases, security (readwrite key), and parameter meaning. Complete for a delete operation with both soft and permanent modes.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must explain the parameters. It does: `path` is a vault-relative path, `permanent` toggles between soft and hard delete. Both are clearly documented with behavioral implications, fully compensating for the schema's bare names.

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 the tool's primary action: 'Delete a non-markdown file from the vault.' It distinguishes from the sibling tool `delete_note` explicitly, noting it is markdown-only. The verb 'delete' and resource 'non-markdown file' are specific and unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance: when to use it (non-markdown files), prerequisites (readwrite API key), and alternatives (`delete_note` for markdown). It also warns about permanent deletion and mentions refusal of markdown files, symlinks, and directories, making usage conditions crystal clear.

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

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