List Directory with Sizes
list_directory_with_sizesList files and directories in a path with each entry's size and [FILE] or [DIR] marker, sorted by name or largest-first, plus totals. Use when file sizes matter, like finding the biggest files.
Instructions
List the files and directories directly inside a path with each file's size, marked [FILE] or [DIR], sorted by name or by size, largest first (sortBy). Use it when sizes matter, such as finding the largest files; for names only, use list_directory, which returns less text. Returns one line per entry, followed by the totals. Only works within allowed 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": {
"path": "<path>"
},
"name": "list_directory_with_sizes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The directory to list. Absolute, or relative to an allowed directory; it must resolve inside the allowed directories. | |
| sortBy | No | Sort entries by name or size | name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |