Skip to main content
Glama

clangd_references

Read-only

Find all references to a C++ symbol at a specified file position, optionally filtered by build configuration and including its declaration.

Instructions

Find references to the symbol in selected configurations.

Omitted or empty configurations select all available contexts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "position": "<position>"
    },
    "name": "clangd_references"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
timeoutNo
positionYes
configurationsNo
include_declarationNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • addedInput schema / additionalProperties
      Added value: +false
  2. 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 by structured data. The description adds a small behavioral note about configuration scoping, but says nothing about what happens on timeout, whether results are capped, or how unresolved symbols are reported.

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 short sentences, front-loaded with the verb and resource, with zero filler. The second sentence is useful but narrow, addressing only one of five parameters, which keeps it just shy of ideal structural balance.

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?

An output schema exists, so return values needn't be explained, but the tool has 5 parameters at 0% coverage and the description documents only one. For a code-intelligence tool whose results depend on build configuration and timeouts, an agent is left guessing about include_declaration and timeout behavior.

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% across 5 parameters, and the description only clarifies the semantics of one of them (configurations). path, position, timeout, and especially include_declaration (default true, a meaningful behavioral switch) are left entirely to the schema titles.

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 and resource ('Find references to the symbol'), which an agent can distinguish from clangd_definition, clangd_hover, or workspace_text_search. It does not name a sibling or explicitly contrast itself with definition lookup, so it stops short of a 5.

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?

The only guidance given concerns the configurations parameter default ('Omitted or empty configurations select all available contexts'), not when to choose this tool over clangd_definition, clangd_hover, or workspace_text_search. No prerequisites (e.g., an indexed compilation database or open document) are mentioned.

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