Skip to main content
Glama
GrafeoDB

grafeo-mcp

Official
by GrafeoDB

get_neighbors

Retrieve connected nodes and edges for a given node ID. Explore graph neighborhoods with options for direction, edge type, and limit.

Instructions

Get neighboring nodes connected to a given node.

This is the primary tool for graph traversal. Use it to explore the neighborhood of a known node. Returns connected nodes with the edges that link them.

Use this tool when: you have a node ID and want to see what it connects to. Do NOT use this for: finding nodes by property (use search_nodes_by_label) or running complex multi-hop queries (use execute_gql).

Args: node_id: The ID of the node to get neighbors for. direction: "outgoing" (node-->neighbor), "incoming" (neighbor-->node), or "both" (default). Controls which direction of edges to follow. edge_type: Filter by relationship type (e.g. "KNOWS"). None returns all edge types. limit: Maximum neighbors to return (default 50).

Returns: JSON with the center node, a list of neighbors (with connecting edge info), and counts.

Examples: get_neighbors(0) get_neighbors(42, direction="outgoing") get_neighbors(1, edge_type="KNOWS", limit=10) get_neighbors(5, direction="incoming", edge_type="WORKS_AT")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYes
directionNoboth
edge_typeNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Without annotations, the description carries the full burden. It details the return format (center node, list of neighbors, connecting edge info, counts) and explains parameter behavior (direction options, edge_type filtering, limit). However, it omits behaviors like error handling when the node_id is missing or a default limit of 50, but overall provides substantial transparency.

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?

The description is well-structured with clear sections (purpose, usage guidelines, args, returns, examples). It is somewhat lengthy but every sentence adds value, and the most critical information is front-loaded.

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 tool's complexity (4 params, no annotations, presence of an output schema) the description is sufficiently complete: it covers purpose, parameter semantics, usage boundaries, return format, and provides multiple examples. The absence of error behavior or rate limits is a minor gap.

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?

Despite 0% schema description coverage, the description explains all four parameters in the 'Args' section with intent, default values, and examples, adding significant meaning beyond the schema property titles and types.

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 verb and resource: 'Get neighboring nodes connected to a given node.' It prominently distinguishes itself from sibling tools like `search_nodes_by_label` and `execute_gql`, making its purpose unmistakable.

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?

Explicitly provides when-to-use ('when you have a node ID and want to see what it connects to') and when-not-to-use ('finding nodes by property' or 'complex multi-hop queries'), with clear alternatives named.

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/GrafeoDB/grafeo-mcp'

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