Skip to main content
Glama

clangd_diagnostics

Read-only

Retrieve fresh diagnostics for a file across selected clangd configurations to surface C++ errors and warnings; omit configurations to check all available contexts.

Instructions

Get fresh file diagnostics 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>"
    },
    "name": "clangd_diagnostics"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
timeoutNo
configurationsNo

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

A3.5/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds useful behavior with 'fresh' (implying diagnostics are recomputed rather than cached) and explains the default configuration scope, but it omits timeout behavior, latency implications, and what happens on failure.

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

Conciseness5/5

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

Two short sentences, front-loaded with the core purpose and followed by the key defaulting rule. There is no redundant or filler text.

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?

The definition is adequate for a read-only diagnostics tool with read-only annotations and an output schema that covers return values. Still missing are meaningful details about what diagnostics include, how timeout affects the call, and what path formats are accepted.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It does explain that omitted or empty configurations mean all available contexts, which adds meaning beyond the schema default of [], but it leaves the timeout parameter's units and behavior undocumented and only implicitly identifies path as the target file.

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: getting fresh file diagnostics in selected configurations. This clearly distinguishes it from other clangd operations such as hover, definition, and references, though it does not explicitly name or contrast those siblings.

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?

Usage is implied by the purpose and by the note that omitted or empty configurations select all contexts. However, there is no explicit guidance on when to use this versus clangd_configurations or other clangd tools, nor any stated exclusions or prerequisites.

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