Skip to main content
Glama

Get Graph Neighbors

get_graph_neighbors
Read-onlyIdempotent

Traverse the wikilink graph from a starting note to find all reachable notes within N hops, grouped by depth with direction tags. Use to explore topic clusters or map a note's local neighborhood.

Instructions

Traverse the wikilink graph outward from a starting note and return every note reachable within N hops, grouped by depth level with an indented tree visualization. Each neighbor is tagged with its hop distance and direction (inbound = reached via backlink, outbound = reached via outlink). Use to explore a topic cluster, map a note's local neighborhood, or find related notes beyond direct links. Accepts paths with or without .md extension.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesStarting note path relative to vault root (e.g., 'projects/alpha.md'). Extension optional; falls back to basename match.
depthNoMaximum link-hops to traverse from the start note (1-3, default: 1). Higher values explore exponentially more notes.
directionNoTraversal direction: 'outbound' follows outlinks the start note points to, 'inbound' follows backlinks pointing at the start note, 'both' follows either (default)both
maxResultsNoMaximum neighbor notes to return (1-1000, default: 200). Traversal stops early when this cap is reached and a truncation notice is appended.
Behavior5/5

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

Annotations already indicate readOnlyHint and idempotentHint. Description adds specific behaviors: early truncation at maxResults with a notice, neighbor tagging with hop distance and direction, and traversal stopping at depth cap. 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?

Concise two-sentence description plus a bullet list of use cases. Front-loaded with main action. Every sentence adds value, no fluff.

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 explains return format (grouped by depth, tree visualization, tagging with hop distance and direction). Covers all necessary aspects for a complex graph traversal tool.

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% with descriptions for all 4 parameters. Description adds extra meaning: path accepts .md extension or not, depth range and exponential growth warning, direction clarification, maxResults early stop behavior.

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 traverses the wikilink graph outward from a starting note, returning reachable notes grouped by depth with visualization and tagging. This distinguishes it from siblings like get_backlinks or get_outlinks which handle single-hop links.

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

Usage Guidelines4/5

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

It explicitly mentions use cases: exploring topic clusters, mapping neighborhoods, finding related notes beyond direct links. It also clarifies path handling with or without .md extension. Lacks explicit when-not-to-use but provides sufficient context.

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/rps321321/obsidian-mcp-pro'

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