Skip to main content
Glama

restore_trashed_document

Restore a single document from trash to the active library using its ID. Use batch restore when you need to recover multiple documents at once.

Instructions

Return one document from trash to the active library; use batch_documents(action=restore) for multiple explicit IDs. This restores the document itself, unlike restore_document_version which changes content.

Input Schema

NameRequiredDescriptionDefault
idYesUUID returned by the corresponding list or read operation.
workspaceIdNoWorkspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.

Output Schema

NameRequiredDescriptionDefault
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.4
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
      +  "format": "uuid",
      +  "pattern": "^([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)$",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv0.1.2
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / id / description
      Previous value: -"UUID of the target object, obtained from the corresponding list tool."New value: +"UUID returned by the corresponding list or read operation."
  3. Addedv0.1.1

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare the safety profile (destructiveHint=false, openWorldHint=false, idempotentHint=false), so the description needn't restate it. The description adds the useful scope distinction that only the document itself is restored, but says nothing about what happens if the document is not in trash or whether a second call fails — relevant given idempotentHint=false.

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

Conciseness5/5

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

Two sentences, no wasted words, and the primary behavior comes before the sibling disambiguations. Every clause carries routing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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 not be described, and annotations cover the safety profile. The description is nearly complete for a single-entity mutation; only failure/edge-case behavior (document not in trash) is unaddressed.

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 both the id and workspaceId parameters are fully documented in the schema itself, including where to obtain each UUID. The description adds no parameter-level detail, which is the expected baseline when the schema does the work.

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+resource ('Return one document from trash to the active library') and immediately distinguishes itself from two siblings by name. An agent can tell it apart from restore_document_version and batch_documents without opening either schema.

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 routes the agent: use batch_documents(action=restore) for multiple explicit IDs, and restore_document_version if the goal is to change content rather than un-trash. Both the alternative and the selection condition are stated outright.

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