Skip to main content
Glama

append_to_note

Add content to the end of existing notes in Obsidian vaults to update information without rewriting entire files.

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 appends new content to the end of an existing note file using the provided separator (default '\n\n').
    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}`; }
  • Input schema defining parameters for the append_to_note tool: path (required), content (required), separator (optional).
    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:82-105 (registration)
    Tool registration in the tools array, including name, description, and inputSchema, used for listing available tools.
    { 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-881 (registration)
    Dispatch case in the main CallToolRequestSchema handler that routes to the append_to_note handler function.
    case "append_to_note": result = await handleAppendToNote( args as { path: string; content: string; separator?: string } );

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