Skip to main content
Glama
j-shelfwood

Obsidian Local REST API MCP Server

by j-shelfwood

read_file

Retrieve content from files in your Obsidian vault to access notes and data for processing or analysis.

Instructions

Read content of a specific file from the vault

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file

Implementation Reference

  • MCP tool call handler for 'read_file' tool: extracts path argument and delegates execution to the ObsidianApiClient.readFile method.
    case "read_file": result = await this.client.readFile(args?.path as string); break;
  • src/index.ts:290-300 (registration)
    Registration of the 'read_file' tool in the ListTools response, including name, description, and input schema definition.
    { name: "read_file", description: "Read content of a specific file from the vault", inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the file" }, }, required: ["path"], }, },
  • Core helper method in ObsidianApiClient that performs the HTTP GET request to retrieve file content from the Obsidian REST API.
    async readFile(path: string) { return this.request(`/files/${encodeURIComponent(path)}`); }

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/j-shelfwood/obsidian-local-rest-api-mcp'

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