Skip to main content
Glama

clangd_hover

Read-only

Provides hover information for a C++ symbol at a given line and character position. Omit configurations to query all available contexts.

Instructions

Describe the symbol at a one-based line and zero-based code-point position.

Omitted or empty configurations select all available contexts.

Input Schema

NameRequiredDescriptionDefault
pathYes
timeoutNo
positionYes
configurationsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2

TDQS

C2.9/5.0
Behavior2/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 elsewhere. The description adds only the configurations default semantics ('omitted or empty ... select all available contexts'), which merely restates the schema default of [] and gives no insight into response shape, source context shown, or failure modes.

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, no filler, and the core operation is front-loaded. The second sentence is a bit orphaned from the first and would read better attached to the configurations parameter, but nothing is wasted.

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-value explanation is not required. Still, for a position-based query the description leaves the 'path' anchor and timeout behavior unspecified, and offers no routing against sibling position-query tools, so an agent must infer how to call it correctly.

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 reported at 0%, so the description carries a real burden. It does clarify the position convention (one-based line, zero-based code point) and the meaning of omitted configurations, but says nothing about 'path' (which file the position refers to) or 'timeout', leaving two of four parameters unexplained in both schema and prose.

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?

The description states a specific verb and resource ('Describe the symbol at a ... position'), which is clearly distinct from read/write workspace tools. However, it never differentiates itself from closely related siblings such as clangd_definition, clangd_references, or clangd_diagnostics, which also answer questions about a code position.

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 at all. An agent cannot tell from this text whether hover is the right call versus clangd_definition or clangd_references when it simply wants to know what a symbol is, and no prerequisites (e.g. a language server/project being configured) are mentioned.

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