Skip to main content
Glama

Get Backlinks

vault_get_backlinks
Read-onlyIdempotent

Find all notes referencing a given note via wikilinks, markdown links, embeds, and frontmatter properties, enabling analysis of note connectivity before editing or deleting.

Instructions

Find all notes that link to a given note — captures [[wikilinks]], markdown, ![[embeds]], and wikilinks inside frontmatter properties (e.g. related:). 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" })

When to use: Understanding what references a note, 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 extension, case-sensitive. A non-indexed path returns an empty result (count 0), not an error — use vault_list_notes or vault_search to discover valid paths.

Returns: JSON with path (the queried note), backlinks (array of { path, title, bytes } sorted by title), and count.

Input Schema

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

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

Annotations (readOnlyHint, idempotentHint, destructiveHint) are consistent. The description adds critical behavioral details: non-indexed paths return empty result (not error), code block links are ignored, and self-links appear in results. No contradictions.

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?

Well-structured with logical sections: what it does, example, when to use, parameter detail, return format. No unnecessary words; every sentence serves a purpose. Front-loaded with core functionality.

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?

Despite no output schema, the description fully documents return format: JSON with path, backlinks array (each with path, title, bytes), and count, plus sorting. Covers all link types and edge cases, making it complete for this tool's complexity.

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?

Schema coverage is 100% for the single parameter, but the description adds significant value: example usage, emphasis on case-sensitivity, and behavior for non-indexed paths. This goes beyond the schema's minimal description.

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?

Description clearly states the tool finds all notes linking to a given note, specifying link types (wikilinks, markdown, embeds, frontmatter), handling of anchors and aliases, and exclusion of code blocks. This specificity differentiates it from siblings like vault_get_outgoing_links and vault_find_orphans.

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?

Explicit 'When to use' section describes contexts such as assessing connectivity before editing or finding related notes. Also provides direct alternatives: use vault_get_outgoing_links for outgoing links and vault_find_orphans for notes with no backlinks, offering clear when-not-to-use guidance.

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