Skip to main content
Glama

Empty agent trash

empty_trash
DestructiveIdempotent

Permanently delete one agent's trashed files to free account disk space; only works while that agent is idle, otherwise wait or cancel its run.

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. Changed1 schema field changedv0.17.0
    • addedOutput schema / properties / disk / properties / agents
      Added value: +{
      +  "description": "The account's Agents that have a disk, largest used_bytes first: where the account's usage is and how much of each Agent's is trash.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "agent_id": {
      +        "description": "The Agent's UUID.",
      +        "type": "string"
      +      },
      +      "agent_name": {
      +        "description": "The Agent's name.",
      +        "type": "string"
      +      },
      +      "asleep": {
      +        "description": "True when the Agent has no running session, which emptying its trash requires.",
      +        "type": [
      +          "null",
      +          "boolean"
      +        ]
      +      },
      +      "trash_bytes": {
      +        "description": "How much of used_bytes emptying this Agent's trash would free. Absent when it has not been measured.",
      +        "type": [
      +          "null",
      +          "integer"
      +        ]
      +      },
      +      "used_bytes": {
      +        "description": "Bytes this Agent's disk holds, trash included.",
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "agent_id",
      +      "agent_name",
      +      "used_bytes"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  2. Addedv0.16.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, but the description adds the key operational context: permanent deletion, trash still consumes disk until called, and the asleep/idle precondition. This is beyond what the annotations carry.

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?

Two dense sentences with no waste. It front-loads the action, then the disk-accounting rationale, then the precondition in a single clause.

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?

Given the output schema exists, return values needn't be explained. The description covers the destructive nature, the precondition, and where to check freed bytes, leaving nothing an agent needs to call it correctly.

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?

Schema coverage is 100% and the single parameter is documented as the agent's UUID, so the schema does the heavy lifting. The description adds no additional parameter detail, making the baseline 3 correct.

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 ('Permanently empty') and resource ('one agent's trash'), and scopes it to a single agent. Distinguishes it from delete_agent by clarifying that deleted files go to trash and are only reclaimed here.

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?

Explicitly names the precondition (agent's pod must be asleep) and the failure mode (error asking you to wait ~two minutes of idle or cancel the run first). Routes the agent to get_disk's trash_bytes to see what a call would free.

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