Skip to main content
Glama

clangd_diagnostics

Read-only

Retrieve fresh C++ diagnostics for a file path, using selected configurations or all available contexts, to surface clangd issues in ForgeMCP.

Instructions

Get fresh file diagnostics in selected configurations.

Omitted or empty configurations select all available contexts.

Input Schema

NameRequiredDescriptionDefault
pathYes
timeoutNo
configurationsNo

Output 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 safety is covered. The description adds one genuine behavioral trait beyond the annotations: "fresh" implies results are recomputed rather than cached, which is meaningful for a language-server call. It does not mention latency/cost or that a timeout applies, which matters given the 30s default timeout parameter.

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 core action and with no filler. It is efficiently written, though its brevity borders on under-specification given the undocumented parameters.

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 need not be described, and the annotations cover the safety profile. However, with 3 parameters at 0% schema coverage, the description leaves key calling details (what 'path' points to, timeout units) unstated, which is not enough for an agent to invoke it confidently.

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 clarifies the semantics of one of three parameters (configurations: omitted or empty selects all contexts). The required 'path' parameter is never explained (file vs. directory, absolute vs. relative) and 'timeout' is unaddressed in both schema and description.

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 ("Get fresh file diagnostics"), which cleanly separates it from siblings like clangd_hover, clangd_definition, and clangd_references that return navigation data rather than diagnostics. It does not name an alternative or say how it relates to them, but the purpose itself is unambiguous.

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 when-to-use guidance, no prerequisites, and no mention of alternatives among the many clangd_* siblings. The sentence about omitted/empty configurations is parameter behavior, not usage guidance, so the agent must infer that this tool is for checking errors/warnings in a file.

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