Skip to main content
Glama

clangd_definition

Read-only

Locate the definition of a symbol at a given position in C++ code. Provide a file path and position to retrieve the definition location.

Instructions

Find definitions of the symbol at the supplied position.

External locations use root/. Empty configurations select all.

Input Schema

NameRequiredDescriptionDefault
pathYes
timeoutNo
positionYes
configurationsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2

TDQS

B3/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 safe-read profile is covered. The description adds real behavioral context for configurations ('Empty configurations select all') and external-path resolution, but says nothing about return shape, failures, or timeouts beyond what annotations cover.

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, purpose front-loaded with no filler. 'External locations use root/.' is terse but cryptic, which slightly undercuts the structure.

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?

An output schema exists so return values needn't be described, and annotations cover safety. However, for a 4-parameter tool with 0% schema description coverage, the description leaves path and timeout behavior unexplained, so it is only minimally complete.

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?

Top-level schema description coverage is 0% across four parameters, so the description carries the burden. It vaguely touches position ('supplied position') and configurations ('Empty configurations select all'), but leaves path semantics and timeout entirely undocumented, failing to compensate for the coverage gap.

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 definitions of the symbol at the supplied position.' An agent can distinguish this from clangd_references (references, not definitions) and clangd_hover by the LSP semantics, though it never names those siblings explicitly.

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?

No explicit when-to-use guidance, no exclusions, and no alternatives named despite several overlapping LSP siblings (clangd_references, clangd_hover). The 'External locations use root/' line is configuration behavior, not usage guidance.

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