Skip to main content
Glama
Vault Cortex Obsidian MCP Server

Vault Cortex Obsidian MCP Server

Get Backlinks

vault_get_backlinks
Read-onlyIdempotent

Find all notes and canvases that link to a given note or canvas, including wikilinks, markdown links, embeds, property links, and canvas cards, to assess connectivity before editing or deleting.

Instructions

Find all notes and canvases that link to a given note or canvas — captures [[wikilinks]], markdown, ![[embeds]], wikilinks inside properties (e.g. related:), and canvas cards that embed the file. Heading anchors ([[note#heading]]) and aliases ([[note|alias]]) resolve as backlinks to the base note. Links inside code blocks are ignored; a note linking to itself appears in its own backlinks.

Example: vault_get_backlinks({ path: "Projects/vault-cortex.md" }) Example: vault_get_backlinks({ path: "Diagrams/architecture.canvas" })

When to use: Understanding what references a note or canvas, assessing its connectivity before editing or deleting, or finding related notes via the graph. For outgoing links (what a note links TO), use vault_get_outgoing_links. To find notes nothing else links to, use vault_find_orphans.

Parameters:

  • path: pass the target's own path, never a link's text: a link written as [[Note]], as a relative ../Note.md, or as a full path counts toward the note it resolves to.

Returns: JSON with path (the queried note or canvas), backlinks (array of { path, title, bytes } sorted by title; bytes is the source's on-disk size), and count.

Errors:

  • "path must end in …" — add the .md or .canvas extension

  • A path nothing links to returns an empty result (count 0), not an error; links from a note written or changed in the last few seconds may not appear yet. If you expected links, find valid paths with vault_search, vault_list_notes, or vault_list_files.

  • "[SqliteError]: …" — the index failed, not the call; the message says what to do

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "vault_get_backlinks"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesExact vault-relative path including .md or .canvas extension (e.g. "Projects/vault-cortex.md"). Case-sensitive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.54.16
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed1 schema field changedv0.36.0
    • changedInput schema / properties / path / description
      Previous value: -"Exact vault-relative path including .md extension (e.g. \"Projects/vault-cortex.md\"). Case-sensitive."New value: +"Exact vault-relative path including .md or .canvas extension (e.g. \"Projects/vault-cortex.md\"). Case-sensitive."
  3. Changed1 schema field changedv0.23.6
    • changedInput schema / properties / path / description
      Previous value: -"Vault-relative path to the note (e.g. \"Projects/vault-cortex.md\")"New value: +"Exact vault-relative path including .md extension (e.g. \"Projects/vault-cortex.md\"). Case-sensitive."
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare this as a safe, idempotent read, so the bar is lower, yet the description still adds real behavior: heading anchors and aliases resolve to the base note, links in code blocks are ignored, self-links appear in their own backlinks, and recently written links may not be indexed yet. The only gap is no mention of pagination or result-size limits, though this is an inherently bounded query.

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

Conciseness4/5

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

Well front-loaded and organized into purpose, examples, when-to-use, parameters, returns, and errors. It is on the long side, and the parameter paragraph restates extension and case-sensitivity details the schema already covers, which is minor duplication rather than waste.

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

Completeness5/5

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

Covers everything an agent needs for a single-parameter read tool with no output schema: the exact return shape (path, backlinks array of {path, title, bytes}, count), sort order, the empty-result-not-an-error distinction, stale-index caveat, and two named error modes with remedies.

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

Parameters4/5

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

Schema coverage is 100% and already documents the path format, so the baseline is 3. The description earns above baseline by clarifying that path is the target's own vault path, never the link's text, and that [[Note]], ../Note.md, and full-path forms all resolve to the same target.

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?

States a specific verb and resource ("Find all notes and canvases that link to a given note or canvas") and enumerates exactly which link forms are captured: wikilinks, markdown links, embeds, property wikilinks, and canvas cards. It is unambiguously distinguishable from the sibling vault_get_outgoing_links.

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

Usage Guidelines5/5

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

A dedicated "When to use" clause gives three concrete scenarios (understanding references, assessing connectivity before edit/delete, graph exploration) and explicitly routes to alternatives: vault_get_outgoing_links for the inverse direction and vault_find_orphans for unlinked notes.

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