Skip to main content
Glama

graph_neighborhood

Read-onlyIdempotent

Explore what a code entity depends on and what depends on it, to a chosen depth and direction, to orient in unfamiliar code before making changes.

Instructions

Get what one entity depends on and what depends on it, to a depth you choose, as summaries with ids. Call it to orient in unfamiliar code. Use find_references for callers only, trace_data_flow for an ordered path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoTraversal depth
limitNoMax entities to return (default 30)
directionNo`out` for what the focal depends on, `in` for what depends on it, `both` merges.both
entity_idYesEntity UUID
max_charsNoSerialized characters this response may occupy; what was cut is named in `elisions`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.16

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description usefully spends its words on the return shape: "summaries with ids" with a chosen depth. This adds real value since there is no output schema. It stops short of describing truncation behavior, but the schema's max_chars/elisions entry covers that.

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?

Three tight sentences with the core purpose front-loaded and routing to siblings at the end. Every clause earns its place; nothing is redundant.

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?

For a read-only orientation tool with full schema coverage and annotations covering safety, the description supplies the purpose, return character, and sibling disambiguation. Nothing critical is missing, though it leaves pagination/truncation handling entirely to schema fields rather than noting it.

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 description coverage is 100%, so depth, limit, direction, entity_id, and max_chars are already documented. The description reinforces depth ("to a depth you choose") and the summarized output but adds no syntax or format beyond the schema, so the baseline 3 applies.

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 (get) and resource (an entity's dependencies and dependents), with scope modifiers: traversal depth and summarized-with-ids output. It explicitly distinguishes itself from find_references and trace_data_flow, so an agent can select it without opening the 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?

"Call it to orient in unfamiliar code" gives the when, and the next sentence names two alternatives with the conditions that select them (callers only vs. an ordered path). Both usage and exclusion are explicit.

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