list_directory
List directory contents, showing file type, size, and child count. Support recursion and hidden file inclusion to navigate large codebases and data files.
Instructions
List the contents of a directory.
Each entry has a type field: 'dir' for directories, 'file' for files.
Use max_depth > 1 to recurse into subdirectories. Automatically ignores
__pycache__, node_modules, and .git. Returns entry type, size in bytes,
and child count for directories.
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": {
"absolute_dir_path": "<absolute_dir_path>"
},
"name": "list_directory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| absolute_dir_path | Yes | The absolute path to the directory to list. | |
| max_depth | No | How many levels deep to recurse (default: 1 = direct children only). | |
| max_entries | No | Maximum total entries to return. Defaults to server config (200). | |
| include_hidden | No | Include entries starting with '.' (default: false). |