Skip to main content
Glama

restore_trash

Restore all trashed photos and videos back to the Immich library in one action. Undo accidental bulk deletions by moving everything from trash to active library.

Instructions

Restore ALL trashed assets back to the library. Use this to undo an accidental bulk deletion. For restoring specific assets only, use restore_assets instead. Side effect: moves all trashed assets back to the active library.

Returns: JSON with success confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for restore_trash - calls ImmichClient.restore_trash() and returns success JSON.
    @mcp.tool()
    async def restore_trash(ctx: Context) -> str:
        """Restore ALL trashed assets back to the library. Use this to undo an accidental
        bulk deletion. For restoring specific assets only, use restore_assets instead.
        Side effect: moves all trashed assets back to the active library.
    
        Returns: JSON with success confirmation.
        """
        await _client(ctx).restore_trash()
        return json.dumps({"success": True, "message": "All trashed assets have been restored."})
  • ImmichClient.restore_trash() - sends POST /trash/restore to the Immich API to restore all trashed assets.
    async def restore_trash(self) -> None:
        """Restore all trashed assets."""
        await self._request("POST", "/trash/restore")
Behavior4/5

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

No annotations provided, but description discloses side effect (moves all trashed assets back to active library) and return format (JSON success confirmation). Could mention if operation is reversible or requires permissions, but adequate.

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 concise sentences with no wasted words. First sentence states purpose, second provides usage guidance, third adds behavioral detail and return info.

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 parameterless tool with an output schema, the description covers purpose, use case, side effect, and return format. No obvious gaps.

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?

Input schema has no parameters; description clarifies that it acts on all trashed assets globally, implying no user choice. No param info needed, baseline high.

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?

Description clearly states 'Restore ALL trashed assets back to the library' with specific verb and resource, and distinguishes from sibling tool 'restore_assets' which restores specific assets only.

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 says when to use (undo accidental bulk deletion) and provides alternative (restore_assets for specific assets).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/drolosoft/immich-photo-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server