Skip to main content
Glama

Get Backlinks

vault_get_backlinks
Read-onlyIdempotent

Find all notes and files that link to a specific note or canvas, including wikilinks, embeds, and canvas references. Use it to assess connectivity before editing or deleting.

Instructions

Find all notes and files that link to a given note or canvas — captures [[wikilinks]], markdown, ![[embeds]], wikilinks inside frontmatter properties (e.g. related:), and canvas file-node references. 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 with no backlinks at all, use vault_find_orphans.

Parameters:

  • path: exact vault-relative path including .md or .canvas extension, case-sensitive.

Returns: JSON with path (the queried note or canvas), backlinks (array of { path, title, bytes } sorted by title), and count. Backlink sources may be notes (.md) or canvas files (.canvas).

Errors: Rejects paths that don't end in .md or .canvas. A non-indexed path returns an empty result (count 0), not an error — use vault_list_notes or vault_search to discover valid paths.

Input Schema

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

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

Discloses numerous behavioral nuances: handles heading anchors/aliases, ignores code blocks, self-links appear, return format and error behavior. This goes well beyond the annotations (read-only, idempotent) and gives the agent a solid understanding of edge cases.

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?

Though lengthy, the description is tightly organized with clear sections (summary, examples, when to use, parameters, returns, errors). Each sentence provides operational value, and the main purpose is stated upfront. No redundancy or unnecessary filler.

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 tool with no output schema, the description fully documents return structure (path, backlinks, count, item fields), link resolution rules, and error handling. It also covers both .md and .canvas inputs, making the description complete and self-sufficient.

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

Parameters5/5

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

Despite 100% schema coverage, the description adds meaning: emphasizes case-sensitivity, exact path format, file extensions, and provides explicit examples. The Errors section clarifies path rejection and non-indexed path behavior, enriching schema semantics.

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 tool's function: finding all notes and files linking to a given note or canvas. It enumerates specific link types (wikilinks, markdown links, embeds, frontmatter, canvas references), which distinguishes it from any sibling tool.

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?

Explicitly provides 'When to use' context, listing use cases like assessing connectivity before edits. It names alternative tools (vault_get_outgoing_links, vault_find_orphans) with clear differentiation, satisfying the when/alternatives criteria fully.

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/aliasunder/vault-cortex'

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