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 — captures [[wikilinks]], markdown, ![[embeds]], wikilinks inside properties (e.g.

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: a link typed in a text card, or a file card showing 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.

Behavior: Results can lag a file change by a few seconds. A path nothing links to returns an empty result (count 0), not an error; if you expected links, find valid paths with vault_search, vault_list_notes, or vault_list_files.

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

  • "[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 readOnly/idempotent/non-destructive, and the description still adds genuine behavior: index lag of a few seconds, self-links appearing in their own backlinks, code-block links ignored, heading anchors and aliases resolving to the base note, and empty result rather than error for unlinked paths. It also pre-empts two specific error strings. Loses a point only because the guidance after an unexpected empty result is slightly roundabout.

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 with labeled sections (Examples, When to use, Parameters, Behavior, Returns, Errors), so an agent can skim. It is on the long side and the link-type enumeration is dense, but nearly every clause carries information the schema and annotations do not.

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?

For a single-parameter read tool this is complete: it defines the result shape (path, backlinks array of {path, title, bytes} sorted by title, count), the staleness window, the empty-result contract, and the two errors an agent is likely to hit, with recovery advice.

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 the schema already states vault-relative, extension-included, case-sensitive. The description adds non-obvious semantics the schema cannot express: pass the target's own path, never the link's text, since [[Note]], ../Note.md, and full paths all resolve to the same base note. That is real added meaning, not repetition.

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?

Opens with a specific verb and resource: find all notes and canvases that link to a given note or canvas. It then enumerates exactly which link syntaxes count (wikilinks, markdown links, embeds, property wikilinks, canvas cards/text cards), which makes it impossible to confuse with the outgoing-links sibling.

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?

There is an explicit 'When to use' block naming three concrete scenarios (assessing connectivity before editing/deleting, understanding references, graph exploration) plus two named alternatives with the condition that selects each: vault_get_outgoing_links for the reverse 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.