clangd_document_symbols
Retrieve a hierarchical symbol outline for a single C/C++ source file, preserving parent-child relationships and flagging truncated results when the node limit is exceeded.
Instructions
获取单个文件内的符号大纲(textDocument/documentSymbol)。clangd 返回层次结构时保留父子关系;超过 limit 时按 DFS 截断并标记 truncated。
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>"
},
"name": "clangd_document_symbols"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | 源文件路径:绝对路径,或相对 projectRoot 的路径 | |
| limit | No | 最多返回多少个符号节点(含子节点),默认 maxResults |