Skip to main content
Glama

plan_cleanup

Scan a MemDrive library and generate a read-only cleanup plan that proposes archiving empty files, exact duplicates, and orphan attachments without modifying or deleting anything.

Instructions

Generate a read-only cleanup plan for the library (two-step confirmation). Scans the library and proposes file actions — archiving empty files, duplicate files and orphan attachments — but changes nothing. Returns a plan ID and a human-readable preview. The plan is also saved as JSON in the per-library cache dir (plan-.json) for the apply_plan tool or the memdrive-mcp apply <plan-id> command. Empty files, duplicates and orphan attachments are all proposed for archiving (recoverable); nothing is ever permanently deleted. Broken image references are listed as notes, not actions. Similar content is never proposed — only exact SHA-256 duplicates. This tool never modifies any file.

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": "plan_cleanup"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it declares read-only behavior, explains that archiving is recoverable and nothing is permanently deleted, that broken image references become notes rather than actions, that only exact SHA-256 duplicates qualify, and that a plan JSON is written to the per-library cache dir as plan-<id>.json.

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 action and the two-step framing, and every paragraph adds new information. There is mild redundancy among 'changes nothing', 'nothing is ever permanently deleted', and 'This tool never modifies any file', which repeats the safety point three ways.

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 zero-parameter planning tool with no output schema, the description covers action scope, return value, persistence location, and downstream consumption path. Nothing an agent needs in order to call it and route the result correctly is missing.

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?

The tool takes no parameters, so there is nothing for the description to disambiguate; the baseline of 4 applies. It does add value by describing what the call returns (a plan ID and a human-readable preview).

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 and resource ('Generate a read-only cleanup plan for the library') plus the scope of what is scanned and proposed (empty files, duplicates, orphan attachments). An agent can distinguish it from apply_plan purely from this sentence.

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?

Explicitly frames the tool as step one of a two-step confirmation flow and names both follow-up routes (the apply_plan tool and the memdrive-mcp apply CLI command). It lacks an explicit 'do not use when' clause, so it falls just short of a 5.

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