Skip to main content
Glama

Get entity neighbors

get_entity_neighbors
Read-onlyIdempotent

List the entities directly connected to an entity (one hop), by any relation in either direction, including relations that have since ended. Read-only. Returns a list of entity records (id, type, attributes, aliases), de-duplicated, without saying which relation links each one; an entity with no relations returns [].

Use it to see who or what an entity is linked to at a glance. When you
need the relation types, direction or validity dates, use
get_entity_relations; for relations, neighbors and recent episodes in
one call, use get_entity_graph_context; for current state only, use
query_world_model.

Args:
    entity_id: UUID of the entity whose neighbors you want, e.g. the
        `id` returned by search_entities.

Input Schema

NameRequiredDescriptionDefault
entity_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered, yet the description still adds substantive behavior: results are de-duplicated, relation provenance is deliberately omitted, and an entity with no relations returns []. It even enumerates the returned record fields (id, type, attributes, aliases), which matters since no output schema exists. Minor gap: nothing about volume, truncation, or ordering of the neighbor list.

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?

Front-loaded with the traversal semantics, then usage routing, then the argument hint. Three short blocks, no restated boilerplate, and every sentence carries either scope, a routing alternative, or argument guidance.

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 single-parameter, annotation-covered, no-output-schema tool, the description covers what it returns, its edge case (empty list), the de-duplication caveat, and the alternatives. An agent has everything needed to decide and invoke correctly.

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

Parameters4/5

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

Schema coverage is 0% (entity_id has no description), so the description must compensate and largely does: it specifies the format (UUID) and the provenance of the value (the `id` returned by search_entities). It stops short of stating what happens with an unknown or non-UUID id.

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 the entities directly connected to an entity") plus the exact traversal semantics: one hop, any relation, either direction, including ended relations. It also explicitly disclaims what it does not do (no relation types returned), which lets an agent distinguish it from get_entity_relations and get_entity_graph_context without opening a schema.

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?

The second paragraph routes the agent by need: get_entity_relations when relation types/direction/validity dates matter, get_entity_graph_context for a combined relations+neighbors+episodes call, and query_world_model for current state only. Each named alternative comes with the condition that selects it, leaving nothing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources