Skip to main content
Glama

trash_restore

Restore deleted files and folders to their original locations by checking path conflicts and app locks before queuing restore operations.

Instructions

Bring trash entries back to where they were (node_ids = the id of trash_list entries, at most 1000). Every entry is checked first - files.create where it came from, app locks - and nothing is queued unless all pass. A place that is taken meanwhile is reported on the operation. Answers 202 {ops: […], done, summary} (one op per storage); follow them with op_get, whose summary says how each ended.

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": {
      "node_ids": "<node_ids>"
    },
    "name": "trash_restore"
  }
}

Input Schema

NameRequiredDescriptionDefault
node_idsYesthe trash entries to bring back: the id field of trash_list entries (at most 1000)

Output Schema

NameRequiredDescriptionDefault
resultYesthe operation's JSON answer - the body its REST twin under /api/ai answers (an object)
statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and it does well: it discloses pre-validation of every entry, all-or-nothing queuing, conflict handling for a place that gets taken meanwhile, and an asynchronous 202 with one op per storage. Missing are auth/permission requirements and whether restoration preserves shares or versions, which keeps it short of a 5.

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 action and parameter clarification, then behavior, then response shape. Every sentence earns its place, though the arrow/parenthetical notation makes it slightly dense to parse.

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 complex asynchronous mutation, the description covers validation semantics, conflict reporting, the 202 response envelope, and the op_get follow-up — enough to call it correctly. It does describe the return shape even though an output schema exists, which is minor redundancy rather than a gap.

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 schema already states 'the id field of trash_list entries (at most 1000)', so the description's parenthetical largely restates it. It adds no type, ordering, or duplicate-handling detail beyond the schema, so the baseline 3 applies.

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 and resource ('Bring trash entries back to where they were') and immediately grounds the single parameter in the sibling it comes from ('node_ids = the id of trash_list entries'). An agent can distinguish this from trash_list 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 Guidelines4/5

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

Gives clear context: pull ids from trash_list, then follow the returned operations with op_get. It doesn't state explicit exclusions (e.g. when to use file_version_restore instead of trash_restore), but the workflow routing is otherwise unambiguous.

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