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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
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")