Skip to main content
Glama

Purge from trash

trash_purge
DestructiveIdempotent

Delete for good from the trash: permanent (no restore afterwards), and it frees the storage the items used. Purge only when your person asks or approves it. Pass one entry by its id (a trash_list entry's id; the server finds its type; it must be in the trash, a live item is refused NOT_IN_TRASH, an id that names nothing NOT_FOUND), or all: true to empty a whole trash: your own by default, or one of workspaceId, team, or a platform admin's account, as trash_list scopes it; type takes one type only, deletedBefore only what was deleted at or before that instant. all takes what was in the trash when the first call began and works in pages: while nextCursor is not null, call again with the same inputs and cursor: nextCursor, until it is null (a cursor sent with other inputs is refused INVALID_CURSOR). skipped lists each entry left in the trash and why: forbidden (you may not remove it), restored (it left the trash or was deleted again after the purge began), gone (already purged), failed (its purge failed; it is left in the trash, a new call tries it again, and if it keeps failing it stays). Needs the same authority as deleting each item. why is required for a workspace item and a workspace scope; their purge is recorded in the workspace history. Purging a folder or workspace takes everything in it.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "trash_purge"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe entry's id as the trash list shows it (an artifact's or bundle's id, a folder's or workspace's id); an artifact's alias or your own bundle's slug works too. The server finds its type.
allNoEmpty a whole trash instead of one entry.
whyNoRequired for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters.
teamNoA team's trash, by slug or id: its folders and workspaces.
typeNoOnly entries of this type. Your own trash holds all four; a team's folders and workspaces; a workspace's artifacts and folders.
cursorNoWith all: the nextCursor of the previous call, sent with the same inputs.
accountNoAnother account's own trash, by account id or alias (platform admins only; anyone else is refused FORBIDDEN).
workspaceIdNoA workspace's trash, by its id or its slug: the artifacts and folders deleted in it.
deletedBeforeNoWith all: only entries deleted at or before this instant (ISO 8601).

Output Schema

NameRequiredDescriptionDefault
purgedYes
skippedYes
nextCursorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / workspaceId / description
      Previous value: -"A workspace's trash, by its id or its slug: the artifacts and folders deleted in it (an external member sees shared items only)."New value: +"A workspace's trash, by its id or its slug: the artifacts and folders deleted in it."
  2. Changed5 schema fields changed
    • changedInput schema / properties / workspaceId / description
      Previous value: -"A workspace's trash: the artifacts and folders deleted in it (an external member sees shared items only)."New value: +"A workspace's trash, by its id or its slug: the artifacts and folders deleted in it (an external member sees shared items only)."
    • removedInput schema / properties / workspaceId / format
      Removed value: -"uuid"
    • addedInput schema / properties / workspaceId / maxLength
      Added value: +64
    • addedInput schema / properties / workspaceId / minLength
      Added value: +1
    • removedInput schema / properties / workspaceId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, yet the description adds substantial context: permanence, storage reclamation, the NOT_IN_TRASH/NOT_FOUND/INVALID_CURSOR refusals, the requirement for matching delete authority, why being mandatory for workspace items and recorded in workspace history, and the fact that purging a folder or workspace takes everything inside. The skipped-entry taxonomy (forbidden/restored/gone/failed, with retry semantics for failed) is unusually thorough. It stops short of describing rate limits or concurrency beyond the 'restored' case.

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?

Front-loaded with the consequence (permanent, frees storage) and the approval gate before any mechanics. It is dense and heavily parenthetical, with a very long single sentence covering paging and skipped reasons, so a reader has to work harder than necessary, but no sentence is 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 9-parameter destructive tool with an output schema, the description covers the decisions an agent must make: whether to purge at all, single vs bulk, how to page, and how to interpret skipped entries. Return-value detail is correctly left to the output schema.

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 100%, so the baseline is 3, but the description adds real meaning on top: it explains that id and all are alternative modes, that the server resolves the entry's type from the id, that type accepts only one value, that deletedBefore is inclusive, and that all scopes default to the caller's own trash unless workspaceId, team, or account is given. The cursor-must-match-inputs rule is spelled out rather than left to the schema.

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 and resource ('Delete for good from the trash'), then immediately qualifies the operation as permanent with no restore and a storage payoff. That framing cleanly separates it from trash_restore and trash_list without needing to name them.

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 an explicit gating condition ('Purge only when your person asks or approves it'), plus the two invocation modes (single id vs all: true) and the scoping options that mirror trash_list. It also states the paging protocol — keep calling with the same inputs while nextCursor is not null — so the agent knows how to drive a full purge.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.