empty_trash
Permanently delete all assets currently in the trash to free storage space. This action is destructive and irreversible.
Instructions
Permanently delete ALL assets currently in trash. DESTRUCTIVE and IRREVERSIBLE. Use this only after confirming the user wants to purge all trashed items. For deleting specific assets, use delete_assets instead. Side effect: permanently destroys all trashed assets and frees storage.
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 'empty_trash'. Calls the Immich client to POST /trash/empty and returns a JSON success response. Decorated with @mcp.tool().
@mcp.tool() async def empty_trash(ctx: Context) -> str: """Permanently delete ALL assets currently in trash. DESTRUCTIVE and IRREVERSIBLE. Use this only after confirming the user wants to purge all trashed items. For deleting specific assets, use delete_assets instead. Side effect: permanently destroys all trashed assets and frees storage. Returns: JSON with success confirmation. """ await _client(ctx).empty_trash() return json.dumps({"success": True, "warning": "All trashed assets have been permanently deleted."}) - Client helper method that makes the actual API call to empty the trash. Sends a POST request to the Immich '/trash/empty' endpoint.
async def empty_trash(self) -> None: """Permanently empty the trash.""" await self._request("POST", "/trash/empty")