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.

Input Schema

TableJSON 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: the artifacts and folders deleted in it (an external member sees shared items only).
deletedBeforeNoWith all: only entries deleted at or before this instant (ISO 8601).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
purgedYes
skippedYes
nextCursorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Well beyond the destructiveHint/idempotentHint annotations, it discloses irreversibility, storage reclamation, specific error codes (NOT_IN_TRASH, NOT_FOUND, INVALID_CURSOR, FORBIDDEN), the full skipped-outcome taxonomy (forbidden/restored/gone/failed), and cascade semantics for folders/workspaces. Minor gap: no explicit note on partial-failure atomicity beyond the failed bucket.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded correctly with the irreversible nature and the approval gate, and no sentence is pure filler. However, it is a single sprawling semicolon-chained paragraph covering selection, paging, skipped outcomes, authority, and cascade in one block; breaking these into distinct clauses would make it far easier to parse.

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, the description covers everything an agent needs: mode selection, paging loop termination, error handling per skipped item, permission prerequisites, and why-parameter requirements. Return values are covered by the output schema, so nothing essential is missing.

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

Parameters5/5

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

Schema coverage is already 100%, yet the description still adds cross-parameter meaning the schema cannot express: id-vs-all selection, type filtering to a single type, deletedBefore applying only with all, and the cursor rule that the same inputs must accompany nextCursor. This is genuine value over structured fields.

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 precise verb+resource pair: permanently delete from trash, explicitly contrasting with restore ('no restore afterwards'). An agent can immediately distinguish this from trash_list and trash_restore, and the following clauses specify scope and cascade behavior.

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 permission gate ('Purge only when your person asks or approves it') and spells out the two invocation modes (single id vs all:true) with scope selection by workspaceId/team/account. It also names the required authority level ('same authority as deleting each item'), leaving little to inference.

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.