Skip to main content
Glama

get_neighbors

Retrieve all direct neighbors of a graph node with edge details, optionally filtering by relation type and limiting output tokens for focused context.

Instructions

Get all direct neighbors of a node with edge details.

Input Schema

NameRequiredDescriptionDefault
labelNo
node_idNoAlias for label (node id)
project_pathNoAbsolute path to a project directory containing graphify-out/graph.json. Optional — defaults to the graph this server was started with.
token_budgetNoMax output tokens
relation_filterNoOptional: filter by relation type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses that edge details are returned, but says nothing about read-only nature, truncation behavior from token_budget, what happens on missing nodes, or permissions. For a parameterless-required traversal tool with zero annotation coverage this is a real gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One front-loaded sentence with no filler. It is efficient, though the brevity borders on under-specification rather than pure conciseness.

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

Completeness2/5

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

No annotations and no output schema, with 5 parameters whose interactions (label vs node_id alias, default graph resolution, token_budget truncation) go unexplained in the description. An agent can guess at invocation but cannot predict return shape limits or edge-case behavior.

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 coverage is 80%, so the schema already documents label, node_id, project_path, token_budget, and relation_filter. The description adds only the implied notion of 'direct' traversal depth and edge detail richness, and does not clarify the label vs node_id aliasing ambiguity — but baseline 3 is warranted given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Get') and resource ('all direct neighbors of a node'), plus the payload characteristic ('with edge details'). It is distinguishable from siblings like get_node (single node) and shortest_path (multi-hop), though it doesn't explicitly contrast with query_graph.

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

Usage Guidelines2/5

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

No guidance on when to use this versus get_node, query_graph, or shortest_path, and no exclusions or prerequisites. The agent must infer that 'direct' means depth-1 traversal from the name alone.

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