read_note
Retrieve content from a specific note in your Obsidian vault by providing its file path.
Instructions
Read the content of a single note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the note relative to vault root |
Implementation Reference
- src/index.ts:542-550 (handler)Handler function that resolves the full path to the note, checks if it exists, and returns its content as a string.async function handleReadNote(args: { path: string }): Promise<string> { const fullPath = resolvePath(args.path); if (!(await fileExists(fullPath))) { throw new Error(`Note not found at ${args.path}`); } return await fs.readFile(fullPath, "utf-8"); }
- src/index.ts:149-162 (schema)Tool definition including name, description, and input schema requiring a 'path' string.{ name: "read_note", description: "Read the content of a single note", inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the note relative to vault root", }, }, required: ["path"], }, },
- src/index.ts:893-895 (registration)Registration in the switch statement dispatching tool calls to the handleReadNote function.case "read_note": result = await handleReadNote(args as { path: string }); break;