Skip to main content
Glama

Get Graph Neighbors

get_graph_neighbors
Read-onlyIdempotent

Traverse the wikilink graph outward from a starting note within set hop depth. Returns notes grouped by depth with hop distance and direction (inbound/outbound) in indented tree. Explore topic clusters or map local neighborhoods.

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-5, default: 1). Higher values explore further but can return many notes.
directionNoTraversal direction: 'outbound' follows outlinks the start note points to, 'inbound' follows backlinks pointing at the start note, 'both' follows either (default)both
Behavior5/5

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

The description adds significant behavioral context beyond annotations: explains traversal direction, depth grouping, hop distance tagging, and path fallback. Annotations already declare readOnlyHint and idempotentHint, and the description does not contradict them. It fully discloses behavior without needing to infer from schema alone.

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?

The description is concise: two core sentences plus one for path handling, each earning its place. Front-loaded with the primary action and output format. 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?

The tool has 3 parameters and no output schema, but the description covers output format (grouped, tree visualization), edge cases (path extension), and default behaviors. For a graph traversal tool, this is fully contextualized.

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%, but the description enriches each parameter: explains path extension handling, depth range and trade-offs, and direction enum meanings. This adds practical guidance beyond the schema's minimal descriptions.

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 purpose: traverses the wikilink graph outward from a starting note, returns reachable notes within N hops grouped by depth with tree visualization. It distinguishes from sibling tools like get_backlinks or get_outlinks which are single-hop direct link retrievers.

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?

The description provides explicit use cases (explore topic cluster, map neighborhood, find related notes) and mentions path handling. It lacks explicit when-not-to-use or alternative tool references, but the context of sibling tools makes the intended usage reasonably clear.

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