Navigation
On this page

Library Tools

Tools for managing Jellyfin libraries, files, episode naming, and subtitle conversion.

These four tools handle library management, file operations, batch episode renaming, and subtitle conversion within your media server.


manage_library

Create a library, trigger a scan, or refresh metadata for an item.

Parameters

NameTypeRequiredDescription
actionstringYesAction to perform. One of: scan, create, refresh_metadata.
namestringConditionalLibrary name. Required when action is create.
typestringConditionalLibrary type. Required when action is create. One of: movies, tvshows, music, mixed.
folderstringConditionalFolder path (e.g. '/data/anime'). Required when action is create.
itemIdstringConditionalJellyfin item ID. Required when action is refresh_metadata.

Usage Example

“Create a new mixed library called ‘Anime’ pointed at /data/anime.”

“Scan the library for new content.”

“Refresh metadata for item abc123.”


manage_files

List, move, or delete files and folders. Paths starting with downloads/ access the downloads folder. All other paths are relative to the media volume.

Parameters

NameTypeRequiredDescription
actionstringYesAction to perform. One of: list, move, delete.
pathstringNoPath for listing or deleting (e.g. 'anime/Show', 'downloads/', 'movies/').
sourcePathsstring[]ConditionalArray of source paths for move (e.g. ['downloads/file.mkv', 'tv/Show1']). Required when action is move.
destFolderstringConditionalDestination folder for move (e.g. 'movies/Movie Name'). Required when action is move.
jellyfinItemIdstringNoJellyfin item ID to delete. Also removes files from disk and cleans up Sonarr/Radarr entries. Used when action is delete.

Usage Example

“List all files in the downloads folder.”

“Move downloads/movie.mkv and downloads/subs.srt to movies/Movie (2024).”

“Delete the Jellyfin item with ID abc123.”


rename_episodes

Rename episode files to Jellyfin standard format (ShowName - S01E01.ext). Searches the show folder recursively. You can pass jellyfinItemId instead of showPath — the tool resolves the path from Jellyfin automatically.

Parameters

NameTypeRequiredDescription
showNamestringYesCorrect show name for renamed files (e.g. 'Rurouni Kenshin').
showPathstringNoPath to show folder (e.g. 'anime/Samurai X'). Optional if jellyfinItemId is provided.
jellyfinItemIdstringNoJellyfin item ID — resolves the file path automatically. Optional if showPath is provided.
seasonNumbernumberNoSeason number to use in filenames. Defaults to 1.
dryRunbooleanNoPreview changes without applying. Defaults to true.

Usage Example

“Preview renaming episodes in anime/Samurai X to ‘Rurouni Kenshin’.”

“Rename all episodes of item abc123 to ‘Breaking Bad’ season 3, apply changes.”


fix_subtitles

Convert ASS/SSA subtitles to SRT in MKV files to prevent transcoding. Works on a single file or an entire folder (searched recursively). Large batches (more than 3 files) run as a background job.

Parameters

NameTypeRequiredDescription
mediaPathstringYesPath to a media file or folder (e.g. 'anime/Show' or '/data/anime/Show').
dryRunbooleanNoList files that would be processed without making changes. Defaults to true.

Usage Example

“Do a dry run of subtitle conversion for anime/Show.”

“Fix the subtitles in all MKV files under anime/Show, apply changes.”