Skip to main content
Glama
grafeo-mcp

grafeo-mcp

Official
by GrafeoDB

get_neighbors

Read-only

Lists nodes one hop from a specified node with each connecting edge's ID and type; supports direction, edge-type, and limit filters for graph traversal.

Instructions

List the nodes one hop from node_id, each with the edge that links it (edge_id, edge_type).

For longer paths use execute_gql.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "node_id": "<node_id>"
    },
    "name": "get_neighbors"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMost edges to follow.
node_idYes
directionNo"outgoing", "incoming" or "both".both
edge_typeNoFollow only this edge type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.3.0
    • addedInput schema / properties / direction / description
      Added value: +"\"outgoing\", \"incoming\" or \"both\"."
    • removedInput schema / properties / direction / title
      Removed value: -"Direction"
    • removedInput schema / properties / edge_type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / edge_type / default
      Removed value: -null
    • addedInput schema / properties / edge_type / description
      Added value: +"Follow only this edge type."
    • removedInput schema / properties / edge_type / title
      Removed value: -"Edge Type"
    • addedInput schema / properties / edge_type / type
      Added value: +"string"
    • addedInput schema / properties / limit / description
      Added value: +"Most edges to follow."
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / node_id / title
      Removed value: -"Node Id"
    • removedInput schema / title
      Removed value: -"get_neighborsArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "get_neighborsOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.2.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds the pairing of each neighbor with its connecting edge, which the annotations cannot express. It says nothing about the limit default (50) truncating results or what happens when node_id does not exist, which are the behavioral details an agent would still want.

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?

Two short sentences: the operation plus return shape first, the escalation path second. No filler and no repeated structured fields.

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?

There is no output schema, so the description's note that each result carries its linking edge is important and present. The only meaningful gaps are truncation behavior under limit and error behavior for an unknown node_id, which are secondary for a read-only one-hop lookup.

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 75%: direction, limit and edge_type are documented in the schema, while node_id has no schema description. The description clarifies that node_id is the hop origin and that edge_id/edge_type appear in results, but adds no filter or format detail beyond the schema.

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?

States a specific verb and resource (list nodes one hop from node_id) and the scope constraint (one hop) that distinguishes it from traversal tools. It also names the shape of each returned item (edge_id, edge_type), which is more than the name conveys.

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?

Explicitly routes longer-path queries to execute_gql, giving a concrete when-to-use-elsewhere rule. It does not address other borderline cases, such as when a paged one-hop scan plus client-side filtering is preferable to a chained search, but the alternative is clearly identified.

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