Skip to main content
Glama

update_note

Modify existing notes in your Obsidian vault by specifying the file path and new content to update.

Instructions

Obsidianノートの内容を更新します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notePathYesノートのパス(vault相対パス)
contentYes新しいノートの内容

Implementation Reference

  • The core handler function in ObsidianHandler class that validates the note path and writes the new content to the file in the Obsidian vault.
    async updateNote(notePath: string, content: string): Promise<string> { if (!FileUtils.validatePath(this.config.vaultPath, notePath)) { throw new Error('無効なファイルパスです'); } const fullPath = path.join(this.config.vaultPath, notePath); await fs.writeFile(fullPath, content, 'utf-8'); return `ノート '${notePath}' を更新しました`;
  • src/server.ts:102-119 (registration)
    MCP tool registration in the server's listTools handler, defining the tool name, description, and input schema.
    { name: 'update_note', description: 'Obsidianノートの内容を更新します', inputSchema: { type: 'object', properties: { notePath: { type: 'string', description: 'ノートのパス(vault相対パス)', }, content: { type: 'string', description: '新しいノートの内容', }, }, required: ['notePath', 'content'], }, },
  • Dispatch logic in the MCP callTool request handler that extracts arguments and calls the ObsidianHandler.updateNote method.
    case 'update_note': const updateResult = await this.obsidianHandler.updateNote( args.notePath as string, args.content as string ); return { content: [{ type: 'text', text: updateResult }], };

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

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