Skip to main content
Glama
sureshsankaran

Obsidian Tools MCP Server

append_to_note

Add content to the end of an existing note in your Obsidian vault. Specify the note path and content to append, with optional separator formatting.

Instructions

Append content to the end of an existing note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the note relative to vault root
contentYesContent to append
separatorNoSeparator to add before appended content. Default: '\n\n'

Implementation Reference

  • The handler function that reads an existing note, appends the provided content with an optional separator, and writes it back to the file.
    async function handleAppendToNote(args: { path: string; content: string; separator?: string; }): Promise<string> { const fullPath = resolvePath(args.path); const separator = args.separator ?? "\n\n"; if (!(await fileExists(fullPath))) { throw new Error(`Note not found at ${args.path}`); } const existingContent = await fs.readFile(fullPath, "utf-8"); const newContent = existingContent + separator + args.content; await fs.writeFile(fullPath, newContent, "utf-8"); return `Successfully appended content to ${args.path}`; }
  • The input schema definition for the append_to_note tool, including parameters for path, content, and optional separator.
    { name: "append_to_note", description: "Append content to the end of an existing note", inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the note relative to vault root", }, content: { type: "string", description: "Content to append", }, separator: { type: "string", description: "Separator to add before appended content. Default: '\\n\\n'", default: "\n\n", }, }, required: ["path", "content"], },
  • src/index.ts:878-882 (registration)
    The switch case in the main tool call handler that dispatches to the append_to_note handler function.
    case "append_to_note": result = await handleAppendToNote( args as { path: string; content: string; separator?: string } ); break;

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

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