Skip to main content
Glama

Clean up old drafts

media_cleanup

Delete outdated drafts from a project's .ai-media folder to stop it growing; a dry run lists what would be removed first. Final project assets are never touched.

Instructions

Removes old drafts from /.ai-media to stop it growing: rejected drafts after a few days, drafts already used for a final file after a couple of weeks, and untouched drafts after a month. Only files inside .ai-media are ever considered, final assets in the project are never touched, and a used draft goes only if its final file still exists. dry_run is true by default: it lists what would be removed and how much space it frees. Pass dry_run: false to delete. The server also does this on its own once per session unless auto_cleanup is off.

Input Schema

NameRequiredDescriptionDefault
dry_runNo
used_daysNoDefault 14
draft_daysNoDefault 30
rejected_daysNoDefault 3

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses deletion scope, safety boundaries (only .ai-media, final assets untouched), conditional deletion of used drafts, dry-run default, and automatic cleanup. It does not explicitly state irreversibility or permissions, leaving some destructive-action context implicit.

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?

The description is front-loaded with purpose and retention rules, then safety boundaries, then dry_run behavior, then automatic cleanup. Every sentence adds useful information without waste.

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

Completeness4/5

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

For a mutation/cleanup tool with no annotations and no output schema, the description covers scope, safety, defaults, deletion mode, and automatic behavior well. It could be more complete by stating irreversibility or what a non-dry-run call returns, but the core operational context is present.

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 75%, and the description adds meaningful semantics for dry_run and the three age thresholds in prose. It explains what the thresholds represent (rejected, used, untouched drafts) and default behavior. It does not directly map parameter names to each threshold, but the meaning is clear.

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 description states a specific verb and resource: removes old drafts from <project>/.ai-media. It also defines the three cleanup categories, making the purpose much clearer than the title alone. It does not explicitly differentiate itself from any sibling tool, so it falls short of the top score under the rubric.

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 clearly explains default behavior (dry_run true lists candidates) and how to actually delete (dry_run false). It also notes automatic cleanup once per session unless auto_cleanup is off, which is important usage context. It does not name explicit alternatives or when-not-to-use conditions, so 4 rather than 5.

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