Skip to main content
Glama

restore_from_trash

Restore a deleted document, database row, or database to its original path along with its registry entry. Refuses the restore if the path is occupied, so nothing is overwritten.

Instructions

Put a deleted document, database row or database back where it was, together with its registry entry (emoji, pin, position, links). Never overwrites: if something now exists at the original path the restore is refused and nothing moves. When the same path was deleted more than once, the most recent delete is restored.

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": {
      "workspace": "<workspace>",
      "path": "<path>"
    },
    "name": "restore_from_trash"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe item to restore: the path it was deleted from (e.g. "documents/Old Draft.md", as list_trash reports it), its trashPath, or just its name ("Old Draft")
workspaceYesWorkspace path/name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.19.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the no-overwrite guarantee, the atomic refusal ('nothing moves'), the registry metadata restored, and the resolution rule for multiple deletes of the same path. It omits anything about permissions or failure surfaces beyond the path conflict.

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?

Three tight sentences, front-loaded with the core action, followed by the safety guarantee and the edge-case rule. No filler or redundancy.

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?

For a two-parameter mutation with no annotations and no output schema, the description covers the critical behavior: what is restored, non-destructiveness, and conflict resolution. Only the return value and any permission prerequisites are 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 coverage is 100% and the path parameter already enumerates the accepted forms (original path, trashPath, or bare name), so the description adds nothing about parameters. The baseline of 3 applies since the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource set ('Put a deleted document, database row or database back where it was') plus the scope of what is restored (registry entry: emoji, pin, position, links). It is clearly the inverse of the delete tools, though it never names a sibling to differentiate against.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied rather than stated: the tool is for undo-after-delete, and the conflict rule ('if something now exists at the original path the restore is refused') tells the agent what will not work. There is no explicit instruction to call list_trash first or guidance on handling the refusal case.

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