Skip to main content
Glama

Clean up duplicates and empty folders

drive_cleanup

Trash duplicate files and empty folders under a Proton Drive path: preview a plan first, then apply confirmed cleanup; items go to trash and can be restored with undo.

Instructions

Trash redundant duplicate copies and empty folders under a path; nothing is deleted and drive_undo restores them. The server lists the items from a fresh, complete scan: you name no files; kept copies, shared items and names already in the trash are left out. Without confirmed: plan (counts, bytes, 10 samples, skipped, remaining). With confirmed=true the server first asks the user to approve the exact list, and trashes nothing if Drive changed meanwhile. Max 50 per call; call again while remaining > 0.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "fixes": "<fixes>"
    },
    "name": "drive_cleanup"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFolder under /my-files.
fixesYesWhat to clean.
verifyNosha256-verify duplicates first (needed for shared items; slower).
confirmedNoPlan/apply switch: false or absent returns the plan only and changes nothing; true applies it after the server has asked the user to approve the exact list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the single destructiveHint annotation: explains the fresh complete scan, what is excluded (kept copies, shared items, already-trashed names), the exact plan payload, the server-side user approval gate, the guard that trashes nothing if Drive changed, and the 50-item batch cap with a re-call loop.

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 action and effect, then scan semantics, then plan/apply, then limits — a sensible order with no filler. It is telegraphic in places ('Without confirmed: plan (counts, bytes, 10 samples, skipped, remaining)'), which costs a little readability but saves space.

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 recoverable-destructive tool with only a destructiveHint annotation and no output schema, the description covers reversibility, exclusions, dry-run contents, the approval gate, concurrency safety, and batching. An agent has everything needed to call it correctly and safely.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds real meaning by spelling out the plan/apply contract for confirmed, the path scoping, and the operational reason for verify (shared items, slower). It does not add anything beyond the schema for fixes, but the enum values are restated in prose.

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 ('Trash') plus the two exact resources ('redundant duplicate copies and empty folders') and the scope ('under a path'). It also distinguishes the scope from drive_find_duplicates by noting the server does the listing and the user names no files.

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?

Gives clear operating guidance: call without confirmed to get a plan, set confirmed=true to apply, max 50 per call, loop while remaining > 0, and drive_undo restores. It stops short of an explicit 'use drive_find_duplicates instead when you only want to inspect', but the plan-mode behavior already provides that inspection path.

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