Skip to main content
Glama
dot-RealityTest

obsidian-codex-mcp

delete_note

Permanently deletes a note from your Obsidian vault. Provide the file path of the note to remove it.

Instructions

Delete a note permanently.

Args: path: Path to the note to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • The MCP tool handler for 'delete_note'. Decorated with @mcp.tool(), it accepts a path parameter, checks read-only mode, calls the client's delete_note method, and returns success or error responses.
    @mcp.tool()
    def delete_note(path: str) -> dict:
        """Delete a note permanently.
        
        Args:
            path: Path to the note to delete
        """
        try:
            if is_read_only():
                return read_only_error()
    
            client = get_vault_client()
            success = client.delete_note(path)
            
            if success:
                return {"success": True, "message": f"Note deleted: {path}"}
            else:
                return {"error": f"Note not found: {path}"}
        except Exception as e:
            return {"error": str(e)}
  • The actual implementation of delete_note in ObsidianVaultClient. Resolves the vault path, checks if the note exists (returns False if not), validates it's a .md file, optionally backs it up, and deletes it via unlink().
    def delete_note(self, path: str) -> bool:
        """Delete a note."""
        note_path = self._resolve_vault_path(path)
        
        if not note_path.exists():
            return False
        if note_path.suffix.lower() != '.md':
            raise ValueError("Only markdown notes can be deleted")
        
        self._backup_note(note_path)
        note_path.unlink()
        return True
  • server.py:154-155 (registration)
    The @mcp.tool() decorator registers 'delete_note' as an MCP tool with the FastMCP server instance.
    @mcp.tool()
    def delete_note(path: str) -> dict:
Behavior3/5

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

The term 'permanently' indicates irreversibility, but without annotations, the description lacks disclosure of auth requirements, impact on links, or recoverability.

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?

Extremely concise, front-loaded with the main action. The 'Args' section adds minimal structure but is functional.

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?

Given a single required parameter, no output schema, and no annotations, the description covers the essential operation reasonably well, though it omits return value or success indicators.

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

Parameters2/5

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

The description merely repeats the schema's parameter name and minimal purpose ('Path to the note to delete'), adding no format, absolute/relative distinction, or validation beyond the schema.

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 action ('Delete') and resource ('note') and specifies permanence, effectively distinguishing it from sibling tools like update_note or get_note.

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 on when to use this tool versus alternatives (e.g., moving to trash instead of permanent deletion) or any prerequisites like confirming deletion.

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/dot-RealityTest/obsidian-codex-mcp'

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