Skip to main content
Glama

Restore a deleted document

tp_restore_document
Idempotent

Puts a deleted document back from the Trash of the user's TransformPipe account, with its text, its folder, its sharing and its earlier versions. Use it when the user asks to undo a deletion, restore or recover a document, or see what was deleted. Deleted documents are kept for 14 days. Without id it lists what is in the Trash, newest first, with ids and how long each has left; with id it restores that one. A document whose folder was deleted with it comes back outside any folder. A document that was shared comes back shared: its link opens again for anyone who has it, and the people it was shared with can read it again.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
idNoId of a document in the Trash, from this tool without an id or from tp_delete_document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses the 14-day retention window, newest-first Trash listing with ids and remaining time, and the fallback location when the original folder was deleted. The sharing disclosure is especially useful: restoration reactivates links and restores access for previous recipients, making an externally visible consequence explicit.

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?

The description front-loads the core action, then moves logically through triggers, retention, mode selection, and restoration edge cases. Despite covering substantial behavior, every sentence contributes actionable information and there is no filler.

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 one-parameter, dual-mode tool with no output schema, it supplies the key invocation behavior and enough listing-output detail to use both modes correctly. It also covers the non-obvious folder and sharing outcomes, leaving only minor API error details unspecified.

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?

The schema already documents `id` and where to obtain it, so parameter coverage is complete. The description adds meaningful operational semantics by explaining that omitting `id` lists the Trash while supplying it restores one document, including the listing's order and returned 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?

The opening sentence gives a specific verb and resource—putting a deleted document back from the TransformPipe Trash—and enumerates the restored text, folder, sharing, and versions. It also identifies the distinct Trash-listing mode, making its scope clear relative to general document retrieval, listing, and deletion tools.

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?

It explicitly says to use it for undoing a deletion, restoring or recovering a document, or seeing what was deleted, and explains how `id` selects listing versus restoration. It does not provide when-not guidance or route version-recovery requests to `tp_document_versions`, so alternative-based selection is not fully explicit.

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.