Skip to main content
Glama
j-shelfwood

Obsidian Local REST API MCP Server

by j-shelfwood

find_related_notes

Discover related notes in your Obsidian vault by analyzing shared tags or links from a specified note, enhancing connections and organization within your knowledge base.

Instructions

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

Input Schema

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

Implementation Reference

  • The core handler function in the ObsidianApiClient class that executes the logic for finding related notes by making an API request to the Obsidian REST API endpoint `/vault/notes/related/{path}` with parameters for 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 (array of 'tags' or 'links', defaulting to both).
    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:380-396 (registration)
    Registration of the 'find_related_notes' tool in the MCP server's tool list, provided via ListToolsRequestSchema handler.
    { 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"], }, },
  • Dispatch handler in the MCP CallToolRequestSchema that routes the tool call to the client method.
    case "find_related_notes": result = await this.client.findRelatedNotes( args?.path as string, args?.on as string[] ); break;

Other Tools

Related Tools

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