Skip to main content
Glama

Empty agent trash

empty_trash
DestructiveIdempotent

Permanently delete an agent's trashed files to free up disk space. Use when the agent is idle, since it returns an error if the agent recently ran.

Instructions

Permanently empty one agent's trash. Deleting a file moves it into a trash that keeps counting against the account's disk until this is called — get_disk's trash_bytes says how much a call would free. Only works while the agent's pod is asleep: while it has run recently this returns an error asking you to wait for it to go idle (about two minutes with no run) or cancel the run first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent's UUID whose trash to empty.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
diskYesThe account's disk state right after emptying, the same shape get_disk returns.
bytes_freedYesBytes freed from the account's shared disk by this call: the account's trash total before minus after when both get_disk reads reported one, otherwise the account's used_bytes before minus after. 0 when nothing was freed or when neither figure was available to diff — the storage worker's own purge result is an entry count, not a byte count, so it cannot supply this number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.16.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, but the description adds substantial behavioral nuance: it explains that trash counts against disk until emptied, how to predict the freed space via get_disk, and the error condition when the pod is active. This goes far beyond the annotations, providing a clear mental model of side effects and preconditions. No contradiction with annotations.

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 three sentences, each earning its place: the core purpose, the disk-impact rationale, and the operational constraint. It is front-loaded with the verb and resource, and the technical detail about pod-sleep state is presented immediately. No redundancy or 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?

For a single-parameter destructive tool with an output schema, the description covers all necessary context: what it does, why it matters (disk space), how to check recoverable space, and the exact precondition (pod asleep) with a fallback instruction. An agent has everything needed to call it correctly and understand consequences.

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

Parameters3/5

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

The single parameter agent_id is fully documented in the schema (100% coverage) with a clear description ('The agent's UUID whose trash to empty'). The description does not add extra parameter-level meaning, but given the schema already covers it, a baseline 3 is appropriate. The description's context about the tool's behavior does not extend parameter semantics.

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?

The description opens with a specific verb+resource ('Permanently empty one agent's trash') that precisely identifies the tool's action. It distinguishes itself from siblings like delete_agent and get_disk by explaining the trash mechanism and how get_disk reports the recoverable space. No ambiguity about what this tool does.

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?

The description gives clear context on when to use it (when trash is counting against disk, so you want to free space) and explicitly states a critical constraint: it only works while the agent's pod is asleep, with a concrete wait time (about two minutes) and an alternative (cancel the run). It does not explicitly list alternative tools to use instead, but the get_disk reference provides a natural alternative for checking before calling. This is strong enough guidance.

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