Skip to main content
Glama
libra850
by libra850

update_note

Modify existing note content in Obsidian vaults by specifying the file path and new text, enabling content updates and revisions.

Instructions

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

Input Schema

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

Implementation Reference

  • Core handler function that validates the note path and writes the new content to the Obsidian vault file.
    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}' を更新しました`;
  • Input schema defining parameters: notePath (string, vault-relative path) and content (string).
    inputSchema: { type: 'object', properties: { notePath: { type: 'string', description: 'ノートのパス(vault相対パス)', }, content: { type: 'string', description: '新しいノートの内容', }, }, required: ['notePath', 'content'],
  • src/server.ts:102-119 (registration)
    Tool registration in the listTools response, including 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 handler in the CallToolRequest 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