Get Structural Code Hierarchy
get_hierarchyRetrieve nested directory-to-file-to-symbol tree structure up to a specified depth. Use when constructing an overview of codebase layout and file organization across directory levels.
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": {
"namespace": "<namespace>"
},
"name": "get_hierarchy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Starting directory root (defaults to repository root). | |
| max_depth | No | Maximum tree depth (default 4). | |
| namespace | Yes | Logical workspace namespace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | Yes | ||
| tree | Yes | ||
| namespace | Yes | ||
| file_count | Yes | ||
| symbol_count | Yes |