Skip to main content
Glama

find_neighbors

Read-only

Retrieve the immediate graph neighborhood around a node, including outgoing, incoming, or both edges, with neighbor summaries to inspect a local subgraph in one call.

Instructions

Return the one-hop graph neighborhood around a node. Unlike find_backlinks, this is graph-frontmatter only and can include outgoing, incoming, or both directions. Returns canonical edges plus neighbor node summaries so agents can inspect a local subgraph in one call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesCenter node slug, unique tail slug, or frontmatter `slug` alias.
limitNoPositive integer max edges to return. Defaults to 100, max 500.
typesNoOptional relation types/frontmatter keys to include, e.g. ["domain", "depends_on", "contains"]. Public add_relation types are normalized to stored graph keys.
directionNoEdge direction to include. Defaults to both.
includeNodesNoWhen true (default), include neighbor node summaries for resolved edges.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgesYes
nodesNo
typesNo
centerYes
limitedYes
directionYes
requestedYes
totalEdgesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.2/5.0
Behavior4/5

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

With readOnlyHint=true and destructiveHint=false, the safety profile is already covered. The description adds meaningful behavioral context beyond annotations: it specifies the graph-frontmatter-only scope, supports outgoing/incoming/both directions, and describes the return composition (canonical edges plus neighbor node summaries). This is useful and consistent with the annotations.

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 two sentences with no filler. It front-loads the core purpose, distinguishes the tool from a sibling, and then describes the return value compactly. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the five-parameter schema and output schema, the description covers the important contextual pieces: graph scope, direction flexibility, and output composition. It could have added a bit more explicit guidance on when to choose this over find_backlinks, but the overall definition is sufficiently complete for an agent to invoke it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are already documented in the schema. The narrative description adds a bit of related context around direction options and output shape, but it does not materially explain individual parameters beyond what the schema already provides. Baseline 3 is appropriate.

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 uses a precise verb ('Return') and identifies a specific resource ('the one-hop graph neighborhood around a node'). It also explicitly contrasts itself with find_backlinks, making the tool's role clear relative to a likely sibling.

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 explicitly names find_backlinks as an alternative and states the key distinguishing factor: this tool is graph-frontmatter only. This effectively tells an agent when this tool applies, but it stops short of giving an explicit 'when not to use' condition or direct guidance for other sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.