get_dir_size
Calculate the total size of a folder and everything below it, including file and folder counts, to answer how much space a directory uses on your Synology NAS.
Instructions
Calculate the total size of a folder, including everything below it: total size, file count and folder count. This is the tool for 'how much space does X use' questions. Counts only what this DSM user can read: a subfolder it can't read is left out without notice. A very large tree can take minutes, and the call gives up after a timeout (120 s unless the server is configured otherwise).
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": "get_dir_size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The folder to measure (`/video/TV Shows`). |