Skip to main content
Glama

clangd_references

Read-only

Find all references to a C++ symbol at a given file position, optionally filtering by build configurations and setting whether to include its declaration.

Instructions

Find references to the symbol at the supplied position. Empty configurations selects all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
timeoutNo
positionYes
configurationsNo
include_declarationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2

TDQS

C2.9/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 the safety profile is covered. The description adds one useful behavioral default (empty configurations = all), but omits whether the declaration itself is included, timeout semantics, or result limits.

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?

Two tight sentences with the core action front-loaded and no filler. The second sentence is slightly awkwardly phrased ("Empty configurations selects all") but still earns its place as a default-behavior note.

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

Completeness2/5

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

With five parameters at 0% schema coverage and no annotation detail on defaults, the description leaves too much undocumented for an agent to call this confidently. The existence of an output schema excuses it from explaining return values, but not from the parameter gaps.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden, yet it only glosses 'position' and 'configurations'. The required 'path', plus 'timeout' and 'include_declaration' (which defaults to true and materially changes results), are never explained.

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?

States a specific verb+resource ("Find references to the symbol") with a clear scope anchor ("at the supplied position"). It is distinct from clangd_definition/hover/document_symbols, though it does not explicitly name those siblings to differentiate.

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

Usage Guidelines2/5

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

Only the note that an empty configurations list selects all is offered; there is no guidance on when to prefer this tool over clangd_definition or the workspace_* search tools, and no prerequisites are stated.

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