Skip to main content
Glama

clangd_definition

Read-only

Locate the definition of a C++ symbol at a specified source position, supporting external roots and multiple configurations.

Instructions

Find definitions of the symbol at the supplied position.

External locations use root/. Empty configurations selects all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
timeoutNo
positionYes
configurationsNo

Output Schema

TableJSON 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 safety profile is covered. The description adds two useful behavioral facts (external locations resolve against root/, empty configurations selects all), but says nothing about indexing prerequisites, failure modes, or latency/timeout behavior.

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, no filler. The second sentence is telegrammatic ('External locations use root/') and slightly cryptic, but it is compact rather than verbose.

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 need not be explained. However, for a 4-parameter tool with 0% schema description coverage, the description leaves path, timeout, and the position coordinate convention unaddressed, which is a real gap for correct invocation.

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% for the four top-level parameters. The description explains only 'configurations' (empty selects all); path and timeout are undocumented anywhere, and position is only implied by 'at the supplied position'. With low coverage the description should compensate more than it does.

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 definitions of the symbol at the supplied position'), which is unambiguous. It does not distinguish itself from near-siblings like clangd_references or clangd_hover, so an agent must infer the boundary from the names alone.

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?

There is no guidance on when to use this versus clangd_references, clangd_hover, or clangd_document_symbols, nor any prerequisites (e.g. that the file must be indexed by clangd). The only usage-like text concerns configuration resolution, which is parameter behavior rather than tool selection.

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