Skip to main content
Glama

disks/usage

Calculate the disk space used by a directory, returning total size in bytes or human-readable format. Supports exclusions, depth limits, and apparent sizes for precise storage analysis.

Instructions

Calculates the disk space used by a directory, like du -s - in bytes, or like du -sh with human_readable. Use disks/free for overall partition stats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoWrite counts for all files, not just directories (-a)
pathYesTarget directory to measure
excludeNoPatterns to exclude
max_depthNoHow deep to recurse (0 for summarize only)
thresholdNoExclude entries smaller than SIZE if positive, or greater than SIZE if negative (-t)
privilegedNoSet to true to run as root
apparent_sizeNoPrint apparent sizes rather than device usage (--apparent-size)
output_formatNoDesired output format (e.g. json, yaml, table, wide). Defaults to text
separate_dirsNoFor directories do not include size of subdirectories (-S)
human_readableNoSizes like du -h (4.0 KiB); default is bytes
one_file_systemNoSkip directories on different file systems (-x)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states the calculation and gives a command analogy; it does not disclose permission requirements, the effects of the privileged parameter, default recursion behavior, or output format. For a tool with several behavior-affecting parameters, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and a useful analogy, then a pointer to the sibling. No fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (11 parameters, no output schema, no annotations), the description is adequate for a basic understanding but omits important behavioral context such as privileges and recursion semantics. The sibling pointer helps, but not enough to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents all parameters with 100% coverage, so the baseline is 3. The description adds little beyond the schema—it repeats the human_readable/bytes behavior and the du analogy, but doesn't clarify other parameters like threshold or exclude. It doesn't degrade, but also doesn't compensate much.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Calculates the disk space used by a directory') and explicitly differentiates from disks/free by pointing out its use for overall partition stats. The du analogy also clarifies the exact command it mimics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit guidance on when to use the sibling disks/free for partition-level stats, implying this tool is for per-directory usage. It doesn't enumerate all possible alternatives, but the main confusion is resolved.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.