Skip to main content
Glama

get_neighbors

Retrieve all entities directly connected to a given entity in the fact graph, showing relationship predicate and direction.

Instructions

Get immediate neighbors of an entity in the fact graph.

Returns all entities directly connected by a single fact.

Args: entity: Entity name to get neighbors for entity_type: Type filter (optional, for disambiguation)

Returns: List of neighbors with: - entity: Neighbor entity name - type: Neighbor entity type - predicate: Relationship predicate - direction: 'outgoing' (entity is subject) or 'incoming' (entity is object) - fact_id: UUID of connecting fact

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityYes
entity_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the return structure (entity, type, predicate, direction, fact_id) and explains direction semantics (outgoing/incoming). This is adequate for a read-only query tool, though no rate limits or permissions are mentioned.

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 with a brief summary, then separate Args and Returns sections. Every sentence serves a purpose; no redundant or missing information. Ideal structure for a tool with two parameters.

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?

For a simple graph query tool with two parameters, the description is complete. It covers purpose, parameters, and return format in detail. The output schema is effectively documented in the Returns section, so no gaps remain.

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?

The description adds meaning beyond the input schema by explaining that entity is the name to look up and entity_type is an optional filter for disambiguation. This fully compensates for any low schema coverage and provides clear parameter semantics.

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 it gets immediate neighbors of an entity in the fact graph, explicitly saying 'all entities directly connected by a single fact'. This is specific and differentiates from sibling tools like find_connections or get_entity.

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

Usage Guidelines3/5

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

The description provides basic usage info (entity required, entity_type optional for disambiguation) but does not guide when to use this tool vs alternatives like find_connections or query_facts. No explicit when-to-use or when-not-to-use guidance.

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/michaelkrauty/mcp-notes'

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