Skip to content

library_edit

LibraryFull

Change items and folders in the library as the gallery's menus do. Items are ids (from any result; a path or name works too); every one must resolve before anything changes. Each change is undoable from the Activity view. What a document holds is doc_edit's; deleting for good is library_delete's.

Needs the Full level, which is the default for any client holding the bearer token.

Parameters

NameTypeRequiredDescription
actionstring one of "rename", "move", "copy", "duplicate", "tag", "untag", "set_tags", "trash", "restore", "mark_read", "mark_unread", "inbox", "uninbox", "remove_duplicates", "create_folder", "rename_folder", "move_folder", "delete_folder"yesWhat to do. rename: Rename one item (its file, kept beside it; name is the new name without extension). The id doesn't change. (ids, name) move: Move items into a folder: '' the save root (Inbox), 'Reader' the reader root, else a folder's rel path from library_find folders. A folder under Reader shows in Reader mode. (ids, folder) copy: Copy items into a folder as new, independent items (Copy to Folder). Not a video or audio recording. (ids, folder) duplicate: A copy of each item beside it in the library, to change while keeping the original (Duplicate). Not a video or audio recording. (ids) tag: Add tags to items. (ids, tags) untag: Remove tags from items. (ids, tags) set_tags: Replace items' tags ([] removes them all). (ids, tags) trash: Move items to the Trash (library_find trash lists it; restore takes them back). (ids) restore: Take items back out of the Trash. (ids) mark_read: Mark bookmarks read. (ids) mark_unread: Mark bookmarks unread. (ids) inbox: Add items to the Inbox where they are filed, without moving them (Add to Inbox): the triage pile shows them until they're dismissed. (ids) uninbox: Take items off the Inbox without filing them (Remove from Inbox); they stay where they are. (ids) remove_duplicates: Keep one item of each duplicate group (library_find duplicates), the newest or the oldest, and move the rest to the Trash. With query, only the groups that search finds. (keep, query) create_folder: Make a folder: parent '' (default) the save root, 'Reader' a reading folder, else a folder's rel path. An existing folder there is returned. (name, parent) rename_folder: Rename a folder (its rel path from library_find folders). (folder, name) move_folder: Move a folder under another (parent: a rel path, '' for the top level). (folder, parent) delete_folder: Delete a folder: everything in it goes to the Trash. (folder)
idsstring[]noThe items: ids, or paths.
namestringnorename: the item's new name, without extension. create_folder / rename_folder: the folder's name.
folderstringnomove / copy: where to (a rel path, '' the save root, 'Reader' the reader root). rename_folder / move_folder / delete_folder: which folder (its rel path).
parentstringnocreate_folder / move_folder: the folder it goes in (a rel path, '' the top level).
tagsstring[]notag / untag / set_tags: the tags.
keepstring one of "newest", "oldest"noremove_duplicates: which of each group stays.
querystringnoremove_duplicates: only the groups this search finds.

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_edit",
"arguments": {
"action": "rename"
}
}
}

See the MCP server overview for how to connect a client and where the token lives.