library_delete
LibraryFull
What can't be undone, so the user approves every call: deleting items in the Trash for good, emptying it, unlinking a linked folder, rebuilding the index. To remove items undoably, library_edit trash.
Needs the Full level, which is the default for any client holding the bearer token.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | string one of "delete_forever", "empty_trash", "unlink", "rebuild_index" | yes | What to do. delete_forever: Delete items that are in the Trash, for good: their files too. (ids) empty_trash: Delete everything in the Trash for good. unlink: Unlink a linked folder (library_find linked): its items leave the library with their tags; the files stay on disk. (linked_id) rebuild_index: Rebuild the library's index from the files and their sidecars (a repair). |
ids | string[] | no | delete_forever: items in the Trash (ids, or paths). |
linked_id | integer | no | unlink: the linked folder's id from library_find linked. |
Example
A JSON-RPC call to POST http://localhost:21516/mcp with the bearer token, filling in the required parameters:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "library_delete", "arguments": { "action": "delete_forever" } }}See the MCP server overview for how to connect a client and where the token lives.