Skip to main content
Glama

delete-empty-folders

Destructive

Removes a specified list of empty directories on a target host in deepest-first order, stopping if one cannot be removed; dry-run checks verify before deletion.

Instructions

dbabrain common.cli delete-empty-folders: A list of empty folders, each deleted as delete-empty-folder deletes one, in the order given (deepest first); the first not deleted stops the list (0.37.0). Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • host: Where the file is: {runtime (windows | linux | docker | k8s - stated), access (ssh | winrm), host, port, username, password | key_file, container, sudo}; left out, this machine.

  • folders (required): The folders, at most 20000, deepest first: each {path, must_be_under}. A parent before its child is refused as not empty and stops the list.

  • dry_run: Check every fact, delete nothing.

  • timeout_seconds: Seconds each item may take on the host (its hash runs at disk speed); default 3600.

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": "delete-empty-folders"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the destructiveHint/readOnlyHint annotations by disclosing that deletion proceeds in order and the first item that cannot be deleted stops the whole list (partial completion, no rollback), that a parent-before-child entry is rejected as not empty, the 20000-item cap, and the confirm/reason requirement. A default timeout of 3600s per item is also stated, which the annotations cannot express.

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

Conciseness4/5

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

Densely front-loaded: sequencing, halt behavior, and confirm requirement come before the field list, and every sentence carries information. Minor waste in the leading tool-path label and the awkward cross-reference phrasing, but nothing extraneous for a tool of this complexity.

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

Completeness5/5

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

For a destructive, confirmation-gated batch operation this covers the ordering contract, failure/halt semantics, size limit, dry-run escape hatch, per-item timeout, and host targeting — everything needed to call it correctly. An output schema exists, so return-shape detail is rightly omitted.

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

Parameters5/5

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

Schema coverage is 0% and the only parameter is a free-form request object, so the description carries the entire burden — and it does: host is broken into runtime/access/host/port/username/password|key_file/container/sudo with a default of this machine, folders is marked required with its cap, ordering rule and per-item {path, must_be_under} shape, and dry_run and timeout_seconds are explained with their defaults. This is meaning well beyond the bare schema.

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?

The first sentence conveys a specific verb and resource — deleting a supplied list of empty folders, deepest first — and explicitly contrasts it with the singular sibling delete-empty-folder. The indirect phrasing ('each deleted as delete-empty-folder deletes one') plus the 'dbabrain common.cli' prefix adds friction before the point lands, so it is strong but not maximally crisp.

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

Usage Guidelines4/5

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

Clear operating conditions: pass the folders deepest-first, a parent listed before its child is refused and halts the list, and the command requires confirm:"yes" plus a reason because it is on the emergency-operations list; dry_run is offered for a no-op check. It does not explicitly say when to prefer this over delete-empty-folder beyond the plurality implication, so no full when/when-not routing.

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

Deploy Server

Other Tools