Skip to main content
Glama

wm_clean

Plan and execute policy-driven cleanup: dry-run returns the exact files to move to the recycle area with SHA-256 hashes, while execution applies the plan and journals every action for rollback.

Instructions

Plan or execute a policy-driven cleanup. By default it is a dry-run: returns the exact plan (what would be moved to the recycle area, with per-file SHA-256 hashes) and changes nothing. Pass execute=true to apply the plan: items are moved to a recycle area, never deleted by pattern, and every action lands in the hash-chained journal so rollback is possible. Use it when the workspace has accumulated policy-expired byproducts. Do NOT set execute=true without first running a dry-run and confirming the plan; G3 execution additionally requires approve=true and an approver.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gradesNoComma-separated grades to clean, e.g. 'G4' or 'G3,G4'. Defaults to G4, the most aggressive auto-cleanable grade.G4
approveNoHuman approval gate; required together with 'approver' for G3-grade execution.
executeNoWhen false (default) this is a dry-run and nothing changes; set true to actually move files to the recycle area.
approverNoName of the person or system approving G3 execution; required when grades include G3 and is recorded in the audit journal.
decision_idNoLink this run to a prior wm_govern decision_id so the journal shows intent -> decision -> execution. Optional.
Behavior5/5

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

With no annotations, the description carries the full burden and fully discloses behavioral traits: dry-run default changes nothing, execution moves items to a recycle area rather than deleting by pattern, actions are hash-chained in a journal allowing rollback, and G3 execution requires approval. This is unusually transparent for a cleanup/mutation tool.

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?

Four dense sentences, each earning its place: the main action, the default behavior and output, the safety properties, and the usage condition with warnings. It is front-loaded with the purpose and avoids filler.

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?

Despite having no annotations and no output schema, the description covers what happens, what changes, what execution does, when it should be used, and the approval prerequisites. An agent has enough context to select and safely invoke the tool.

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?

Since the schema covers all 5 parameters with descriptions, the baseline is 3. The description adds extra meaning by tying execute, approve, and approver to the G3 approval workflow and journal/rollback guarantees, and by clarifying that execute=false is a dry-run. It does not duplicate schema details unnecessarily.

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?

Opens with a specific verb and resource: 'Plan or execute a policy-driven cleanup' and immediately defines the dry-run vs execute modes. This makes it distinguishable from the sibling wm_audit/wm_rollback/wm_govern tools, which concern history, rollback, and governance decisions.

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?

States a clear trigger condition ('workspace has accumulated policy-expired byproducts') and gives explicit safety instructions: do not set execute=true without first running a dry-run, and G3 requires approve=true and an approver. It does not explicitly name sibling tools that should be used instead, but the use case is scoped well enough to route an agent.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/metabolism-tools/workspace-metabolism'

If you have feedback or need assistance with the MCP directory API, please join our Discord server