Skip to main content
Glama

find_references

Read-onlyIdempotent

Find direct callers, importers, and references for a code entity to see what depends on it. Use for one hop; for full chains, use trace_data_flow.

Instructions

Find who depends on one entity: direct callers, importers and references, one row each with id, name, kind, file and the lines it references from. Call it for one hop. For a whole chain, use trace_data_flow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoExact symbol name to resolve. Optional if entity_id is provided.
entity_idNoExact entity UUID. Optional if query is provided.
max_charsNoSerialized characters this response may occupy; what was cut is named in `elisions`.
relation_kindsNoFilter to calls, imports or references. Defaults to all three.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.16

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: the response is one row per dependent with id, name, kind, file and referenced lines, and it is deliberately one-hop rather than transitive. It does not discuss ordering, pagination, or the case of zero dependents, which keeps it below a 5.

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 sentences plus a routing clause, all front-loaded: the capability comes first, the scope constraint and alternative follow. No filler sentences and each clause carries information the agent needs.

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?

There is no output schema, so the description carries the return-shape burden and does so by naming the per-row fields. Combined with the one-hop scope statement and the sibling routing, an agent has everything needed to call this correctly against a deep sibling list.

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 all four parameters (query, entity_id, max_chars, relation_kinds) are already documented in structured form. The description's mention of callers/importers/references loosely maps to relation_kinds but adds no syntax or format detail 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?

Names a specific verb and resource (find who depends on one entity) and enumerates the exact scope: direct callers, importers, references, one row per dependent. It also distinguishes itself from trace_data_flow by declaring one-hop semantics, so an agent can tell it apart from siblings 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?

Explicitly states the selection condition ('Call it for one hop') and names the alternative ('For a whole chain, use trace_data_flow'), giving an unambiguous when-to-use vs when-to-use-something-else rule.

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