clangd_hover
Retrieves hover information for a C/C++ symbol at a given 1-based line and column, including its type, declaration, and comments.
Instructions
查询某个位置符号的悬停信息(textDocument/hover):类型、声明、注释。输入 1-based line/column,返回 contents 文本及其 markdown/plaintext 类型。
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": {
"file": "<file>",
"line": "<line>",
"column": "<column>"
},
"name": "clangd_hover"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | 源文件路径:绝对路径,或相对 projectRoot 的路径 | |
| line | Yes | 1-based 行号 | |
| column | Yes | 1-based 列号(UTF-16) |