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
| Name | Required | Description | Default |
|---|---|---|---|
| on | No | Relationship criteria to use for finding related notes | |
| path | Yes | Path to the source note |
Implementation Reference
- src/index.ts:163-168 (handler)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}`); }
- src/index.ts:383-395 (schema)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"], }, },
- src/index.ts:500-505 (handler)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;