Skip to main content
Glama
j-shelfwood

Obsidian Local REST API MCP Server

by j-shelfwood

find_related_notes

Discover notes connected to a specific note by analyzing shared tags, links, or backlinks within your Obsidian vault.

Instructions

Find notes related to a given note based on shared tags, links, or backlinks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the source note
onNoRelationship criteria to use for finding related notes

Implementation Reference

  • The handler function in ObsidianApiClient class that implements find_related_notes by making an HTTP request to the Obsidian API endpoint for related notes based on tags or links.
    async findRelatedNotes(path: string, on: string[] = ["tags", "links"]) { const params = new URLSearchParams({ on: on.join(","), }); return this.request(`/vault/notes/related/${encodeURIComponent(path)}?${params}`); }
  • Input schema definition for the find_related_notes tool, specifying parameters path (required) and on (optional array of 'tags' or 'links').
    inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the source note" }, on: { type: "array", items: { type: "string", enum: ["tags", "links"] }, description: "Relationship criteria to use for finding related notes", default: ["tags", "links"] }, }, required: ["path"], },
  • src/index.ts:500-505 (registration)
    Tool registration in the MCP CallToolRequestSchema handler switch statement, dispatching calls to the client handler.
    case "find_related_notes": result = await this.client.findRelatedNotes( args?.path as string, args?.on as string[] ); break;
  • src/index.ts:380-396 (registration)
    Tool definition and registration in the ListTools response, including name, description, and schema.
    { name: "find_related_notes", description: "Find notes related to a given note based on shared tags, links, or backlinks", inputSchema: { type: "object", properties: { path: { type: "string", description: "Path to the source note" }, on: { type: "array", items: { type: "string", enum: ["tags", "links"] }, description: "Relationship criteria to use for finding related notes", default: ["tags", "links"] }, }, required: ["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