Skip to main content
Glama

disk_cleanup

Free disk space on Linux hosts by clearing apt cache, vacuuming journald, removing unused Docker images and build cache, and deleting rotated logs. Dry-run first to preview reclaimed space.

Instructions

Free disk space on hosts: apt cache, journald vacuum to a size, unused docker images and build cache (never volumes), rotated logs. The dry run shows what takes space now.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNofalse (default) = dry run: show what will happen on which hosts and a planHash. true = run it; needs planHash
batchNohosts at a time (rolling). Default depends on the action: 1 for disruptive ones
targetNohosts: all | <host> | <glob nl-*> | <group> | role:<edge|remnanode|panel|docker> | tag:<tag>; comma-separated, !x excludesall
planHashNoplanHash from the dry run of the very same call, good for one apply; refused if targets or their state changed since
journalSizeNo300M
dockerImagesNodocker image prune -a (images not used by any container)
continueOnErrorNokeep going after a host fails (default: stop the rollout at the first failure)
skipUnreachableNoskip hosts that do not answer over ssh instead of refusing the whole plan (they show as skipped)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden and does much of it: it names exactly what gets removed, explicitly guarantees volumes are never touched, and signals a dry-run/plan workflow. It does not mention irreversibility, permission requirements, or the planHash single-use constraint, but the destructive-scope disclosure is solid.

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 tight sentences with zero filler. The action scope is front-loaded, followed by the dry-run behavior, so an agent reads the key facts first.

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

Completeness4/5

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

For a destructive multi-host mutation with no annotations and no output schema, the description covers what is deleted, what is protected, and the dry-run entry point. Remaining gaps (permissions, irreversibility, rollout behavior) are partially covered by the detailed schema, leaving it nearly 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?

Schema coverage is 88%, so the schema already documents nearly all parameters, including apply, planHash, batch, and target semantics. The description only hints at journalSize ('journald vacuum to a size') and the dockerImages scope ('never volumes'). Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

States a specific verb (free) and resource (disk space) and enumerates the exact cleanup categories: apt cache, journald vacuum, unused docker images/build cache, rotated logs. The parenthetical '(never volumes)' sharpens the scope. It does not explicitly differentiate from siblings, but the specificity makes its function unambiguous.

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

Usage Guidelines3/5

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

The closing sentence implies a dry-run-first workflow ('The dry run shows what takes space now'), which hints at how to start. However, it never states when to prefer this over alternatives like host_exec or host_docker, nor any prerequisites. Usage is only implied.

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