Skip to main content
Glama
MarkusPfundstein

MCP server for Obsidian

obsidian_append_content

Add content to Obsidian notes by appending text to new or existing files in your vault. This tool integrates with Obsidian's Local REST API to modify note files programmatically.

Instructions

Append content to a new or existing file in the vault.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filepathYesPath to the file (relative to vault root)
contentYesContent to append to the file

Implementation Reference

  • The run_tool method implements the core logic of the obsidian_append_content tool: validates arguments, calls the Obsidian API to append content, and returns a success message.
    def run_tool(self, args: dict) -> Sequence[TextContent | ImageContent | EmbeddedResource]: if "filepath" not in args or "content" not in args: raise RuntimeError("filepath and content arguments required") api = obsidian.Obsidian(api_key=api_key, host=obsidian_host) api.append_content(args.get("filepath", ""), args["content"]) return [ TextContent( type="text", text=f"Successfully appended content to {args['filepath']}" ) ]
  • Defines the input schema and description for the obsidian_append_content tool.
    return Tool( name=self.name, description="Append content to a new or existing file in the vault.", inputSchema={ "type": "object", "properties": { "filepath": { "type": "string", "description": "Path to the file (relative to vault root)", "format": "path" }, "content": { "type": "string", "description": "Content to append to the file" } }, "required": ["filepath", "content"] } )
  • Registers the AppendContentToolHandler instance with the MCP server.
    add_tool_handler(tools.AppendContentToolHandler())

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

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