Skip to main content
Glama
dsh-mcp-server-clangd

dsh-mcp-server-clangd

by Rcyc-1025

clangd_health

Read-onlyIdempotent

Checks clangd readiness by verifying the executable/version, compile_commands.json, process status, and risk warnings; optionally starts and initializes a resident process.

Instructions

自检 clangd 桥:检查 clangd 可执行文件/版本、compile_commands.json、进程状态与风险警告。默认不启动常驻进程(start:false);start:true 会预热并完成 initialize。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "clangd_health"
  }
}

Input Schema

NameRequiredDescriptionDefault
startNo是否启动常驻 clangd 并完成 initialize,默认 false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior2/5

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

The description usefully discloses that start:true spawns a resident clangd process and runs initialize, which is real behavioral context. However, this side effect conflicts with the supplied readOnlyHint=true annotation, since starting a long-lived process and warming an index changes the runtime environment rather than leaving it untouched. No information is given about failure modes or the shape of the self-check report.

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?

A single dense sentence front-loads what gets checked and then explains the parameter's branching behavior; nothing is wasted. It is compact rather than padded, though the two ideas could be split for easier scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter diagnostic tool with no output schema, listing the concrete items inspected gives the agent a reasonable expectation of the report contents (version info, compile_commands.json presence, process state, warnings). Return structure and failure signaling are left implicit, which is the primary remaining gap.

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 coverage is 100% and the single start parameter is already documented in the schema as "whether to start resident clangd and complete initialize, default false." The description adds only the nuance of preheating/warming, which largely restates the schema, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb+resource ("自检 clangd 桥") and enumerates exactly what is inspected: the clangd executable/version, compile_commands.json, process status, and risk warnings. That scope distinguishes it cleanly from the sibling tools, which are all code-intelligence queries (definition, hover, references, diagnostics, symbols).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete usage context by stating the default behavior (start:false, no resident process) and the consequence of the opposite choice (start:true preheats and completes initialize). What is missing is an explicit directive on when to reach for this instead of the clangd query siblings, e.g. "call this first to verify the bridge is healthy before issuing definition/hover requests."

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