Skip to main content
Glama

Restore from trash

trash_restore
Idempotent

Bring an item back from the trash: id is a trash_list entry's id (an artifact's alias or your own bundle's slug works too); the server finds its type. It returns to its folder, workspace and name; a folder or workspace brings back everything that went with it. Needs the same authority as deleting it. why is required for a workspace item. expectedWorkspaceRevision (the entry's workspaceRevision) is optional and refuses (CONFLICT) if it changed since. A file whose folder is still in the trash comes back unfiled; one whose workspace is in the trash is refused (WORKSPACE_DELETED): restore the workspace first. A restored workspace counts toward its owner again, so restoring one is refused WORKSPACE_LIMIT_REACHED when the owner has no room: a team without the Team plan (details.billingUrl is where the person subscribes), or an owner at its maximum (delete a workspace first). Restoring a live item does nothing; an id that names nothing is NOT_FOUND.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe 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.
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.
expectedWorkspaceRevisionNoOptional: the entry's workspaceRevision; refuses CONFLICT if the item changed since.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
typeYes
unfiledNo
restoredYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it names the authority requirement ('same authority as deleting it'), the side effects of restoring a folder or workspace (children come back, owner quota is re-consumed), and the specific failure codes CONFLICT, WORKSPACE_DELETED, WORKSPACE_LIMIT_REACHED and NOT_FOUND. The idempotent-when-live statement is consistent with idempotentHint=true and destructiveHint=false.

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?

The core action and the id contract are front-loaded, then error behavior follows in a logical order. It is dense but nearly every clause carries operational information; the parenthetical about details.billingUrl and Team plan is the one bit that could be trimmed.

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?

An output schema exists so return values need no explanation, and the description still covers authorization, ordering prerequisites, conflict handling, and quota failures — everything an agent needs before invoking a restore.

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 each parameter already carries a detailed description, so the description largely restates it: why being required for workspace items and expectedWorkspaceRevision refusing with CONFLICT both appear verbatim in the schema. The added framing of id (alias/slug accepted, type auto-detected) matches the schema wording rather than extending it.

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+resource: 'Bring an item back from the trash'. It also defines the id space (a trash_list entry's id, an alias, or a bundle slug) and states the server resolves the type, which separates it cleanly from trash_list and trash_purge.

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?

Usage is made concrete through conditions: restores of live items are no-ops, workspace items need a why, and a file whose workspace is trashed must be preceded by restoring the workspace. It routes the agent to trash_list for ids but never explicitly contrasts itself with trash_purge or the artifact_* family, so it stops short of full alternative routing.

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.