Skip to main content
Glama

update_note

Replace the entire content of an existing note in your Obsidian vault by specifying the file path and new content.

Instructions

Update/replace the entire content of an existing note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the note to update relative to vault root
contentYesNew content for the note

Implementation Reference

  • The core handler function that executes the update_note tool logic: resolves the note path, verifies existence, overwrites the file content with the provided content, and returns a success message.
    async function handleUpdateNote(args: { path: string; content: string; }): Promise<string> { const fullPath = resolvePath(args.path); if (!(await fileExists(fullPath))) { throw new Error(`Note not found at ${args.path}`); } await fs.writeFile(fullPath, args.content, "utf-8"); return `Successfully updated note at ${args.path}`; }
  • src/index.ts:64-81 (registration)
    Registers the update_note tool in the tools array, including name, description, and input schema definition. This is used by the ListToolsRequest handler.
    { name: "update_note", description: "Update/replace the entire content of an existing note", inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the note to update relative to vault root", }, content: { type: "string", description: "New content for the note", }, }, required: ["path", "content"], }, },
  • src/index.ts:873-877 (registration)
    Registers the handler for update_note tool calls within the switch statement in the CallToolRequest handler.
    case "update_note": result = await handleUpdateNote( args as { path: string; content: string } ); break;
  • Defines the input schema for the update_note tool, specifying required path and content properties.
    inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the note to update relative to vault root", }, content: { type: "string", description: "New content for the note", }, }, required: ["path", "content"], },

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