Skip to main content
Glama

obsidian_append_content

Append content to existing Obsidian notes or create new files to add thoughts, references, and connections in Zettelkasten workflows.

Instructions

Append content to the end of an existing file or create new file.

Quick way to add content to notes. Useful for adding new thoughts, references,
or connections to existing Zettelkasten notes.

Args:
    params (AppendContentInput): Contains:
        - filepath (str): Path to file
        - content (str): Content to append

Returns:
    str: Success message with updated file info
    
Example:
    Add a new related concept to an existing note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool registration and handler function for 'obsidian_append_content'. Calls obsidian_client.append_to_file to append content to Obsidian vault file.
    @mcp.tool(
        name="obsidian_append_content",
        annotations={
            "title": "Append Content to File",
            "readOnlyHint": False,
            "destructiveHint": False,
            "idempotentHint": False,
            "openWorldHint": False
        }
    )
    async def append_content(params: AppendContentInput) -> str:
        """Append content to the end of an existing file or create new file.
        
        Quick way to add content to notes. Useful for adding new thoughts, references,
        or connections to existing Zettelkasten notes.
        
        Args:
            params (AppendContentInput): Contains:
                - filepath (str): Path to file
                - content (str): Content to append
        
        Returns:
            str: Success message with updated file info
            
        Example:
            Add a new related concept to an existing note.
        """
        try:
            result = await obsidian_client.append_to_file(params.filepath, params.content)
            
            return json.dumps({
                "success": True,
                "message": "Content appended successfully",
                "filepath": params.filepath
            }, indent=2)
            
        except ObsidianAPIError as e:
            return json.dumps({
                "error": str(e),
                "filepath": params.filepath,
                "success": False
            }, indent=2)
  • Pydantic input schema for the obsidian_append_content tool defining filepath and content parameters.
    class AppendContentInput(BaseModel):
        """Input for appending content to files."""
        model_config = ConfigDict(str_strip_whitespace=True, extra='forbid')
        
        filepath: str = Field(
            description="Path to the file to append to",
            min_length=1,
            max_length=500
        )
        content: str = Field(
            description="Content to append to the file",
            min_length=1,
            max_length=50000
        )
  • Helper method in ObsidianClient that implements the append logic: reads existing content, appends new content, writes back or creates new file.
    async def append_to_file(self, filepath: str, content: str) -> Dict[str, Any]:
        """Append content to an existing file or create new file."""
        try:
            existing_content = await self.read_file(filepath)
            new_content = existing_content + "\n" + content if existing_content else content
            return await self.write_file(filepath, new_content)
        except ObsidianAPIError:
            # File doesn't exist, create it
            return await self.write_file(filepath, content)
Behavior3/5

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

Annotations already indicate this is not read-only, not open-world, not idempotent, and not destructive. The description adds useful behavioral context by specifying that it appends to the end of files and can create new files if needed, which goes beyond the annotations. However, it doesn't mention potential side effects like file creation behavior details or error conditions.

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 well-structured and appropriately sized: it starts with a clear purpose statement, provides usage context, details parameters with a structured Args section, specifies return values, and includes a practical example. Every sentence adds value without redundancy, and information is front-loaded effectively.

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 the tool's moderate complexity (file operations with creation fallback), the description covers purpose, usage, parameters, and returns adequately. The presence of an output schema means return values don't need explanation. However, for a tool that modifies files, more behavioral details (e.g., what happens if the file doesn't exist, encoding considerations) would enhance completeness.

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?

With 0% schema description coverage, the schema provides no parameter descriptions. The description compensates by listing both parameters (filepath and content) and their basic purpose in the Args section, adding meaningful semantics. However, it doesn't provide format details (e.g., filepath structure, content encoding) or constraints beyond what's implied, leaving some gaps.

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 purpose with specific verbs ('append content', 'create new file') and resource ('existing file'), distinguishing it from siblings like obsidian_patch_content (which patches rather than appends) and obsidian_write_note (which writes rather than appends). The opening sentence provides a precise, actionable summary.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Quick way to add content to notes', 'Useful for adding new thoughts, references, or connections to existing Zettelkasten notes'), which helps differentiate it from tools like obsidian_patch_content or obsidian_write_note. However, it doesn't explicitly state when NOT to use it or name specific alternatives, preventing a perfect score.

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

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