Skip to main content
Glama
jagoff

obsidian-mcp-complete

by jagoff

obsidian_get_backlinks

Read-only

List all notes that link to a target note, showing line numbers and raw link targets.

Instructions

List notes that link to a target note, with line numbers and raw link targets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vaultNoOptional configured vault name. Defaults to the server default vault.
pathYesVault-relative path. Absolute paths and traversal are rejected.

Implementation Reference

  • Handler for the obsidian_get_backlinks tool. It loads all notes, builds the graph, and calls the backlinks() function.
    tool(
      "obsidian_get_backlinks",
      "List notes that link to a target note, with line numbers and raw link targets.",
      { vault: vaultArg, path: pathArg },
      async (args) => ({ backlinks: backlinks(buildGraph(await loadNotes(vaults, args.vault)), args.path) }),
      { readOnlyHint: true },
    );
  • Input schema for the tool: optional vault name and required vault-relative path.
    { vault: vaultArg, path: pathArg },
  • src/tools.ts:743-749 (registration)
    Registration of the obsidian_get_backlinks tool via the local tool() helper which wraps McpServer.tool().
    tool(
      "obsidian_get_backlinks",
      "List notes that link to a target note, with line numbers and raw link targets.",
      { vault: vaultArg, path: pathArg },
      async (args) => ({ backlinks: backlinks(buildGraph(await loadNotes(vaults, args.vault)), args.path) }),
      { readOnlyHint: true },
    );
  • The backlinks() helper function that filters graph edges for resolved inbound links to the target node.
    export function backlinks(graph: VaultGraph, targetPath: string): GraphEdge[] {
      const target = resolveGraphPath(graph, targetPath);
      if (!target) return [];
      return graph.edges.filter((edge) => !edge.unresolved && edge.target === target.path);
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description adds modest value by specifying the return format (line numbers, raw link targets). However, it does not disclose limits, performance characteristics, or whether backlinks from all file types are included.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence of 13 words, front-loaded with the core action. No unnecessary words; every part conveys essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read operation with no output schema, the description is mostly complete: it explains what the tool does and what the output contains. Minor gap: it does not explicitly state that the tool only returns notes that have at least one backlink, but this is implied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema provides 100% coverage with clear descriptions for 'vault' and 'path'. The description adds no additional semantic information beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('notes that link to a target note'), and specifies output details ('with line numbers and raw link targets'). This differentiates it from sibling tools like obsidian_links (which lists outgoing links) or obsidian_find_broken_links.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., obsidian_search, obsidian_links). No mention of prerequisites or exclusions. The agent must infer use cases from the description alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/jagoff/obsidian-mcp'

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