Skip to main content
Glama

delete-empty-folder

Destructive

Deletes a single folder only if it contains no entries, including hidden ones, and only when its path is strictly inside a specified safety folder; dry-run counts entries before deletion.

Instructions

dbabrain common.cli delete-empty-folder: ONE folder deleted only when it holds nothing at all - hidden entries count (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.

  • path (required): The one folder, in full; never a pattern, never a list.

  • must_be_under (required): The folder the path must be strictly inside; the fence itself is never deleted.

  • dry_run: Count its entries, delete nothing.

  • timeout_seconds: Seconds the host may take - the 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-folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true/openWorldHint=true, but the description goes well beyond them: hidden entries block deletion, a 'confirm': "yes" plus 'reason' are required for this emergency-operations command, and 'must_be_under' acts as a non-deletable safety fence. Those are exactly the preconditions an agent cannot infer from the annotation flags.

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?

Front-loaded with the core behavior, then a bulleted request-field list that is easy to scan; the 'pass them as request' note correctly explains the nesting. The generic filler 'Changes or removes something' and the CLI-prefix/version tag ('dbabrain common.cli', '(0.37.0)') add little for an agent.

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 remote command, the description covers the emptiness precondition, the safety fence, the confirm/reason authorization, dry-run behavior and a timeout default. An output schema exists, so no return-value explanation is needed, leaving no material gap.

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?

The schema is a single opaque 'request' object with zero description coverage, so the description carries the full burden and does so field by field: host and its sub-keys, path, must_be_under, dry_run, timeout_seconds. It also resolves a real ambiguity by declaring path and must_be_under required even though the schema marks nothing required.

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?

The description names a specific verb and resource ('ONE folder deleted only when it holds nothing at all') and immediately pins the cardinality and the emptiness precondition. The emphasis on 'ONE folder' and 'never a list' cleanly separates it from the plural sibling 'delete-empty-folders' without needing to open either schema.

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?

It states the exact condition for use (folder must be completely empty, hidden entries count) and offers 'dry_run' as the probe-before-delete path, which is clear contextual guidance. It does not explicitly route the agent away from 'delete-empty-folders' or 'smb-delete' by name, so the when-not guidance is implied rather than stated.

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