Skip to main content
Glama

cross_references

Read-only

Find where a symbol is defined and all places it is referenced, including calls, imports, and attribute accesses, to trace usage and resolve naming collisions.

Instructions

Find where a symbol is defined and each place that references it: calls, imports and attribute accesses.

Args: file_path: When names collide, select the definition in this repository-relative file. line: Select the definition by its start line. cursor: Continue a paged result. page_size: References per page, 1 to 100 (default 20).

Input Schema

NameRequiredDescriptionDefault
lineNo
cursorNo
file_pathNo
page_sizeNo
workspaceNoProject path (default: this project)
max_tokensNo
symbol_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds pagination behavior (cursor continuation, page_size range 1-100, default 20), which is genuinely beyond the annotations. It does not describe result ordering, whether the definition is included in the page, or the response shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence is front-loaded and the per-argument notes are terse, one line each. The Args block is slightly more structured than the single-sentence prose it needs to be, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with 14% schema coverage and no output schema, the description covers the disambiguation and paging story well but leaves max_tokens (default 2000, max 32000) entirely unexplained and says nothing about what the result contains or how a paged result terminates.

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 only 14%, so the description must compensate, and it largely does: it explains file_path's disambiguation role, line's meaning, cursor as a paging continuation, and page_size's range and default. Three parameters (symbol_name, workspace, max_tokens) are left to the schema, with max_tokens undocumented anywhere.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource: locate a symbol's definition plus every reference (calls, imports, attribute accesses). That is clearly distinct from siblings like symbols or call_graph. It stops short of naming those siblings, so the differentiation is inferred rather than stated.

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 Args notes imply when the disambiguation parameters matter ("When names collide..."), which is useful selection logic within the tool. But there is no guidance on when to reach for cross_references versus impact_analysis, call_graph, or search_symbols — an agent must infer that from the sibling names alone.

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