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 a paid plan, or an owner at its maximum (delete a workspace first). Restoring a live item does nothing; an id that names nothing is NOT_FOUND.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input 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

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?

Beyond the annotations, the description discloses critical behavior: folders and workspaces bring back their contents, files with trashed folders return unfiled, files with trashed workspaces are refused, workspace limits can block restoration, live items no-op, and unknown ids return NOT_FOUND. These are meaningful operational details that annotations alone do not provide.

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 description is front-loaded with the action and key parameter, and every clause appears to earn its place by covering a real behavioral edge case. It is dense and semicolon-heavy, which slightly hurts readability, but it is not padded.

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 tool's complexity, the rich annotations, 100% schema coverage, and the presence of an output schema, the description is complete enough to guide correct invocation. It covers authority, concurrency, cascade behavior, error conditions, and no-op cases.

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 description coverage is 100%, so the schema already documents `id`, `why`, and `expectedWorkspaceRevision`. The description mostly integrates those meanings into the restoration flow and does not add much parameter-specific syntax or semantics beyond what the schema states.

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 and resource: 'Bring an item back from the trash.' It clearly distinguishes restoring from sibling operations like trash_list and trash_purge by describing exactly what restoration means for artifacts, bundles, folders, and workspaces.

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 strong usage context: it explains authority requirements, workspace-only `why` requirements, optimistic concurrency via `expectedWorkspaceRevision`, and what to do when a workspace is deleted or over limit. It does not explicitly route the agent to `trash_purge` or name every alternative, so it falls slightly short of the highest usage-guideline score.

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.