Skip to main content
Glama

read_note

Retrieve content from Obsidian notes by specifying the note path within your vault.

Instructions

Obsidianノートの内容を読み込みます

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notePathYesノートのパス(vault相対パス)

Implementation Reference

  • The core handler function that validates the note path, checks if the file exists in the Obsidian vault, reads the file content using fs.readFile, and returns it as a string.
    async readNote(notePath: string): Promise<string> { if (!FileUtils.validatePath(this.config.vaultPath, notePath)) { throw new Error('無効なファイルパスです'); } const fullPath = path.join(this.config.vaultPath, notePath); if (!(await FileUtils.fileExists(fullPath))) { throw new Error(`ノート '${notePath}' が見つかりません`); } return await fs.readFile(fullPath, 'utf-8'); }
  • Input schema definition for the 'read_note' tool, requiring a 'notePath' string parameter describing the vault-relative path to the note.
    inputSchema: { type: 'object', properties: { notePath: { type: 'string', description: 'ノートのパス(vault相対パス)', }, }, required: ['notePath'], },
  • src/server.ts:88-100 (registration)
    Registration of the 'read_note' tool in the ListTools response, including name, description, and input schema.
    { name: 'read_note', description: 'Obsidianノートの内容を読み込みます', inputSchema: { type: 'object', properties: { notePath: { type: 'string', description: 'ノートのパス(vault相対パス)', }, }, required: ['notePath'], },
  • src/server.ts:281-285 (registration)
    Dispatch handler in the CallToolRequest switch statement that invokes the obsidianHandler.readNote method and formats the response as MCP content.
    case 'read_note': const noteContent = await this.obsidianHandler.readNote(args.notePath as string); return { content: [{ type: 'text', text: noteContent }], };

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