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 the goal this change serves, not a description of this edit. Every edit to workspace files, rows, folders and settings takes one (task operations need none); 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. Changed1 schema field changed
    • changedInput schema / properties / why / description
      Previous value: -"Required 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."New value: +"Required for workspace items: one sentence on the goal this change serves, not a description of this edit. Every edit to workspace files, rows, folders and settings takes one (task operations need none); sessions and summaries record themselves from it. At most 300 characters."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations: it discloses cascade semantics ('a folder or workspace brings back everything that went with it'), restoration targets (folder, workspace, name), the authority prerequisite ('Needs the same authority as deleting it'), and the exact failure codes CONFLICT, WORKSPACE_DELETED, WORKSPACE_LIMIT_REACHED, NOT_FOUND. The orphaned-file rule ('comes back unfiled') and the quota side effect for restored workspaces are behaviors an agent could not guess from readOnlyHint/idempotentHint.

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 core action and the id semantics, then failure modes in rough priority order — good ordering, no filler sentences. It is a dense paragraph, though; the several distinct refusal cases would scan faster as a short list.

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 mutation tool with three parameters, the description covers preconditions, cascade scope, quota side effects, and every refusal code, while an output schema exists to carry return-value detail. Nothing an agent needs to invoke it correctly (or to recover from a failure) is missing.

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; the description earns above that by tying parameters to outcomes — the conditional requirement of why for workspace items, and that expectedWorkspaceRevision triggers a CONFLICT refusal rather than a silent overwrite. It does not restate the 300-character limit or the integer bounds, but those are already fully documented in 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?

Opens with a specific verb+resource ('Bring an item back from the trash') and immediately scopes what 'item' and 'id' mean, including the alias/slug shortcut and that the server resolves the type. It is unmistakably distinct from trash_list (which enumerates entries) and trash_purge (which removes them permanently).

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 covers when the tool is a no-op ('Restoring a live item does nothing'), when an id is invalid (NOT_FOUND), and preconditions that force a different action order ('restore the workspace first', 'delete a workspace first'). The alternatives are named as concrete remediation steps rather than left 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.