get_disk_usage
Lists what fills a drive or folder: a folder tree with entries by size, files by size, and file types ranked by space. Use it when a drive is full or to find what to clean up.
Instructions
Lists what fills a drive or folder, as Anabolic's Disk space page reads it: its folders as a tree (the largest entries of each level with their size and share, the rest summed into one line), the largest files under it and the file types taking the most room. Use it when a drive is full or to find what to clean up; get_disks gives the drives' size and activity, not their contents. On Windows an NTFS drive is read from its master file table when Anabolic runs as administrator (seconds for millions of files, and the whole drive even for a folder of it), otherwise folder by folder, which takes longer; progress is reported while it reads. A scan is kept for ten minutes, so asking next about a folder inside it is instant (rescan=true reads again). It only reads: nothing is deleted, the user deletes from the page.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_disk_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | The largest entries of each folder (1 to 50, default 8); the rest of a folder is summed into one line. | |
| path | No | The drive or folder ("C:\\", "D:\\Games", "/home/you"). Default: the system drive on Windows, the home folder on Linux. | |
| depth | No | Folder levels to return below it (1 to 4, default 2). | |
| types | No | How many file types to list, the most room first (0 to 50, default 10). | |
| rescan | No | True reads it again instead of using a scan of it (or of a folder above it) from the last ten minutes. | |
| largest | No | How many of the largest files under it to list (0 to 200, default 20). |