Skip to main content
Glama

screenshot_gc

Reclaims disk space by removing cached screenshots under retention limits; defaults to a dry run that lists deletion candidates and requires dryRun:false plus confirm:true to delete.

Instructions

Reclaim disk space from cached screenshots by retention policy. By DEFAULT this is a dry run: it returns the captures that WOULD be deleted (candidates) plus a count/size of leftover orphan files, and deletes nothing. To actually delete, pass BOTH dryRun:false AND confirm:true. Retention caps (all optional): maxCount (keep newest N), maxTotalBytes (keep newest under a byte budget), maxAgeMs (delete older than). When you pass none, the cache's env defaults apply (newest 200 / 256 MiB). Scope to a single tag with tag (other tags are never touched); includeOrphans (default true) also reclaims leftover on-disk files with no index entry. The newest capture is always kept by the count/byte caps. Only ever touches files inside the screenshot cache — never any other path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoLimit deletion to captures under this tag (case-insensitive). Other tags are never touched.
dryRunNoDefault true: only LIST what would be deleted, delete nothing. Set false (with confirm:true) to actually delete.
confirmNoSafety gate: deletion happens ONLY when dryRun:false AND confirm:true. Otherwise the call is forced to a dry run.
includeNoOptional response-shape opt-in. `['envelope']` returns the self-documenting envelope (`_version` / `data` / `as_of` / `confidence`). `['raw']` forces raw shape (overrides DESKTOP_TOUCH_ENVELOPE=1 server default). Default behaviour is raw shape (compat with existing clients).
maxAgeMsNoDelete captures older than this many milliseconds (opt-in; can clear even the newest).
maxCountNoKeep only the newest N captures; delete the rest. The single newest is always kept.
maxTotalBytesNoKeep the newest captures under this total byte budget; delete older ones beyond it. The newest is always kept.
includeOrphansNoDefault true: also reclaim leftover on-disk image files that are not tracked in the cache index (e.g. files left behind by a crash).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.3.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / maxAgeMs / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / maxCount / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / maxTotalBytes / maximum
      Added value: +9007199254740991
  2. Addedv1.12.0

TDQS

A4.8/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 behavioral burden and discharges it: it discloses the destructive safety gate (dual-flag), what a dry run returns (candidate captures plus orphan count/size), that includeOrphans reclaims files with no index entry, that the newest capture survives count/byte caps, and the hard scope guarantee that only files inside the screenshot cache are ever touched.

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?

Dense but well front-loaded: the default-safe dry run and the deletion gate come first, then retention caps, then scoping. It repeats the dryRun/confirm pairing and re-explains orphan reclaiming that the schema also covers, so a little trimming is possible.

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 an 8-parameter, annotation-free mutation tool with no output schema, this is close to complete: deletion semantics, safety gating, defaults, scoping, and even the dry-run return shape are all covered. Only permission/auth requirements are left unstated.

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 already 100%, so the baseline is 3, but the description adds genuine meaning beyond the schema: the concrete env defaults (newest 200 / 256 MiB) applied when no caps are given, the interplay of dryRun and confirm, and that maxAgeMs can clear even the newest capture. It does not explain the `include` response-shape parameter at all.

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: 'Reclaim disk space from cached screenshots by retention policy.' It is unmistakably distinct from the read-oriented siblings (screenshot, screenshot_query) and the browser_* family, and the retention-policy scope further narrows what it does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when/when-not rules: the call is a dry run by DEFAULT and deletes nothing, and real deletion requires BOTH dryRun:false AND confirm:true. It also states the fallback behavior when no retention caps are passed (env defaults of newest 200 / 256 MiB) and the tag-scoping condition.

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