Skip to main content
Glama
dot-RealityTest

obsidian-codex-mcp

update_note

Update an existing note in an Obsidian vault by providing the file path, optionally updating its content and metadata.

Instructions

Update an existing note.

Args: path: Path to the note content: New content (optional) metadata: Metadata updates (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentNo
metadataNo

Implementation Reference

  • The MCP tool handler for 'update_note'. It is decorated with @mcp.tool(), accepts path, optional content, and optional metadata. It checks read-only mode, gets the vault client, and delegates to client.update_note().
    @mcp.tool()
    def update_note(path: str, content: Optional[str] = None, metadata: Optional[dict] = None) -> dict:
        """Update an existing note.
        
        Args:
            path: Path to the note
            content: New content (optional)
            metadata: Metadata updates (optional)
        """
        try:
            if is_read_only():
                return read_only_error()
    
            client = get_vault_client()
            note = client.update_note(path, content, metadata)
            return note
        except Exception as e:
            return {"error": str(e)}
    
    
    @mcp.tool()
    def delete_note(path: str) -> dict:
        """Delete a note permanently.
  • The ObsidianVaultClient.update_note() method that implements the actual note update logic. It loads the existing note's content and metadata, optionally updates the content and/or metadata, creates a backup if configured, and writes the note back to disk.
    def update_note(self, path: str, content: Optional[str] = None, metadata: Optional[Dict] = None) -> Dict[str, Any]:
        """Update an existing note."""
        note_path = self._resolve_vault_path(path)
        
        if not note_path.exists():
            raise ValueError(f"Note does not exist: {path}")
        
        current_content, current_metadata = self._load_markdown(note_path)
        post = frontmatter.Post(current_content, **current_metadata)
        
        if content is not None:
            post.content = content
        
        if metadata is not None:
            post.metadata.update(metadata)
        
        self._backup_note(note_path)
        with open(note_path, 'w', encoding='utf-8') as f:
            f.write(frontmatter.dumps(post))
        
        return self.get_note(path)
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'Update an existing note' but does not clarify whether updates are merging or overwriting, what happens to unspecified fields, or if there are side effects or authorization requirements.

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 very concise, containing only one line of text plus a bulleted list of parameters. No unnecessary words, but it could be slightly more structured (e.g., separating purpose from parameter details) without adding length.

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 lack of annotations and output schema, the description is incomplete. It does not explain return values (e.g., success/error), behavior when the note does not exist, or how partial updates are applied. Sibling tools suggest actions like get_note and delete_note, but no cross-referencing.

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 description lists parameters with brief explanations (e.g., 'path: Path to the note'), which adds basic meaning beyond the schema's raw type names. However, with 0% schema description coverage, the description could provide more detail, such as what 'metadata updates' entails (e.g., key-value pairs).

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 verb 'Update' and the resource 'note', which distinguishes it from siblings like create_note and delete_note. However, it lacks specificity about what aspects of the note can be updated (e.g., content, metadata) beyond listing parameters.

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 (e.g., create_note for new notes, delete_note for removal). The description does not mention prerequisites, such as the note existing, or cases where partial updates are preferred.

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