Skip to main content
Glama
dot-RealityTest

obsidian-codex-mcp

create_note

Create new Markdown notes in an Obsidian vault with specified path, content, optional title and tags.

Instructions

Create a new note.

Args: path: Path for the new note (e.g., "notes/new-note.md") content: Note content in Markdown title: Optional title (defaults to filename) tags: Optional list of tags

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
titleNo
tagsNo

Implementation Reference

  • MCP tool handler for 'create_note'. Receives path, content, optional title and tags, builds metadata dict, checks read-only mode, then delegates to ObsidianVaultClient.create_note(). Returns the created note dict or an error.
    @mcp.tool()
    def create_note(path: str, content: str, title: Optional[str] = None, tags: Optional[list] = None) -> dict:
        """Create a new note.
        
        Args:
            path: Path for the new note (e.g., "notes/new-note.md")
            content: Note content in Markdown
            title: Optional title (defaults to filename)
            tags: Optional list of tags
        """
        try:
            if is_read_only():
                return read_only_error()
    
            client = get_vault_client()
            
            metadata = {}
            if title:
                metadata['title'] = title
            if tags:
                metadata['tags'] = tags
            
            note = client.create_note(path, content, metadata)
            return note
        except Exception as e:
            return {"error": str(e)}
  • server.py:106-107 (registration)
    The '@mcp.tool()' decorator registers create_note as an MCP tool with the FastMCP server instance.
    @mcp.tool()
    def create_note(path: str, content: str, title: Optional[str] = None, tags: Optional[list] = None) -> dict:
  • ObsidianVaultClient.create_note() - the underlying implementation that validates the path (must end with .md, must not exist), creates parent directories, builds a frontmatter Post with metadata, writes it to disk, then returns the newly created note via get_note().
    def create_note(self, path: str, content: str, metadata: Optional[Dict] = None) -> Dict[str, Any]:
        """Create a new note."""
        note_path = self._resolve_vault_path(path)
        if note_path.suffix.lower() != '.md':
            raise ValueError("Note path must end with .md")
        
        if note_path.exists():
            raise ValueError(f"Note already exists: {path}")
        
        note_path.parent.mkdir(parents=True, exist_ok=True)
        
        post = frontmatter.Post(content, **(metadata or {}))
        
        with open(note_path, 'w', encoding='utf-8') as f:
            f.write(frontmatter.dumps(post))
        
        return self.get_note(path)
  • The function signature and docstring serve as the input schema for the 'create_note' tool, specifying path (str), content (str), optional title (str), and optional tags (list).
    """Create a new note.
    
    Args:
        path: Path for the new note (e.g., "notes/new-note.md")
        content: Note content in Markdown
        title: Optional title (defaults to filename)
        tags: Optional list of tags
    """
Behavior2/5

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

No annotations are provided, so the description must convey all behavioral traits. It only states the action (create) but fails to disclose whether the tool overwrites existing paths, creates intermediate folders, or what the return value is. This is a significant gap for a mutation tool.

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 concise: one-line purpose followed by a clean argument list with clear descriptions. No redundant information, every sentence earns its place.

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

Completeness3/5

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

For a simple create tool with four parameters and no annotations or output schema, the description covers the core functionality but lacks detail on path conventions, overwrite behavior, and return values. More context would improve completeness.

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

Parameters4/5

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

With schema description coverage at 0%, the description adds essential meaning: 'Path for the new note,' 'Note content in Markdown,' 'Optional title (defaults to filename),' and 'Optional list of tags.' This adds value beyond the null schema descriptions.

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 'Create a new note,' which is a specific verb+resource combination that distinguishes it from siblings like update_note, delete_note, or search_notes.

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

Usage Guidelines3/5

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

The description implies usage (creating a note) but does not explicitly differentiate from alternatives like update_note or note when to use it versus other tools. No exclusions or prerequisites are mentioned.

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