Check disk space
check_disk_spaceCheck disk space usage for a filesystem path, report total, used, and available space, and validate against optional free space thresholds to return a status of ok or warning.
Instructions
Report total, used, and available disk space for the filesystem containing a path, and validate it against optional free-space thresholds. Read-only: reads filesystem stats via statfs, never runs a shell. Returns a status of "ok" or "warning".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Filesystem path to inspect. Stats apply to the filesystem that contains this path. Defaults to the user home directory. | |
| minFreeGb | No | Minimum free space in GiB. When available space is below this, status becomes "warning". | |
| minFreePercent | No | Minimum available space as a percentage of total. Defaults to 10. When available space is below this, status becomes "warning". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The resolved absolute path that was inspected. | |
| totalBytes | Yes | Total filesystem size in bytes. | |
| usedBytes | Yes | Used bytes (total minus free). | |
| freeBytes | Yes | Free bytes including space reserved for root. | |
| availableBytes | Yes | Bytes available to unprivileged users (the real usable free space). | |
| usedPercent | Yes | Used bytes as a percentage of total. | |
| availablePercent | Yes | Available bytes as a percentage of total. | |
| status | Yes | "warning" when available space is below a threshold, otherwise "ok". | |
| message | Yes | Human-readable one-line summary. |