Skip to main content
Glama

restore_trash_item

Idempotent

Restore a trashed file or folder to its original path. If that path is missing, place it in the root folder, and resolve name conflicts with a numeric suffix.

Instructions

Restore a file or folder from the trash bin to its original location.

The item is restored to its original path. If the original path no longer exists, it is restored to the user's root folder. If a file with the same name already exists, a numeric suffix is added.

Args: trash_path: The trash path identifier from list_trash (e.g. "document.txt.d1711000000").

Returns: Confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trash_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description adds valuable behavioral context: restoration to original path, fallback to root folder if path missing, and numeric suffix on name conflicts. This goes beyond annotations and helps the agent understand side effects. It doesn't mention permissions or reversibility, but the idempotentHint and non-destructive annotation cover the safety profile.

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 is concise and well-structured. It front-loads the core action, then explains fallback behaviors, then documents the parameter and return value. Every sentence earns its place with no 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?

Given the tool's simplicity (1 parameter, no nested objects, output schema present), the description is complete. It covers the action, edge cases (missing original path, name conflicts), parameter semantics, and return value. It doesn't mention permissions or error cases, but for a straightforward restore operation this is adequate.

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 description coverage is 0%, so the description must compensate. It explains the parameter 'trash_path' as 'The trash path identifier from list_trash' with an example. This adds meaning beyond the schema's bare 'Trash Path' title. It doesn't detail format constraints beyond the example, but for a single simple parameter this is sufficient.

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 description clearly states the verb 'Restore' and the resource 'a file or folder from the trash bin to its original location.' It distinguishes itself from siblings like delete_trash_item and empty_trash by specifying the restoration action and behavior.

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?

The description provides clear context on when to use this tool: to restore a trashed item. It doesn't explicitly name alternatives or exclusions, but the behavior of restoring to original path or root folder gives enough context. Sibling tools like delete_trash_item and empty_trash are implicitly alternatives, but no explicit when-not-to-use guidance is given.

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

Deploy Server

Other Tools