Refresh and scan a library
trigger_scanRescan a Radarr, Sonarr, Jellyfin or Plex library to fix files that downloaded but won't play, reconcile stale scan reports, or refresh a single item's metadata.
Instructions
Asks a service to reconcile itself with what is on disk: the "it downloaded but will not play" fix, and the usual fix for a stale scan diagnose reports. No id rescans the whole library of Radarr, Sonarr, Whisparr, Lidarr, Jellyfin, Plex or Grimmory; on Prowlarr it pushes the indexer list to the apps. An id refreshes and rescans one item. On Jellyfin and Plex a scan only finds changed files; wrong metadata is fix_metadata. action: rename (files to the service's naming, needs id), import (a finished download stuck at importBlocked, with mapping to correct a wrong match; not on Lidarr), remap (which episode an imported Sonarr file really is), postprocess (rerun NZBGet post-processing by downloadId), bookdrop (Grimmory). For an import refused over a "TBA" episode title, scan the series, wait, then import again. Most actions queue and return; follow them in stack_health commands. Previews first; confirm to run. Field reference: arr://docs/trigger_scan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | One movie, series or Lidarr artist id — `acquisition.id` on a get_library record. Omit with action: "scan" to scan the whole library. | |
| action | No | scan rescans the library, or just one item when `id` is given (on Lidarr only the refresh narrows to one artist: the rescan still reads every root folder); on Radarr, Sonarr, Whisparr and Lidarr it refreshes metadata from the provider first. rename renames one item's files to the service's own naming scheme, and requires `id`. import takes a finished download the service never picked up, and requires `download_id`; add `mapping` when the service cannot tell what a file is. remap reassigns already-imported Sonarr files to the episodes a person has confirmed they are, and requires `id` and `reassignments`. postprocess reruns NZBGet's post-processing on a finished download, and requires `download_id`. bookdrop rescans Grimmory's Bookdrop folder for new files. | scan |
| confirm | No | The token from this tool's preview, passed back verbatim to apply it. Single-use and bound to the previewed arguments. | |
| dry_run | No | Preview without a confirm token, for "what would happen if" questions; not the first step of a real change. | |
| library | No | Grimmory only: one library, by name or by id as stack_health and get_library show it. Omit to rescan every library. | |
| mapping | No | For action: "import", ignored otherwise. What each named file really is, for a download the service matched wrongly or not at all. The service judges each mapped file again with that answer and imports it only if it then accepts it; files left out keep the service's own match. | |
| service | Yes | prowlarr syncs its indexers to the apps; nzbget only with action: "postprocess". | |
| instance | No | Which instance (e.g. "4k") when several of this service exist. Omit it when there is one. | |
| download_id | No | The download client's own id, as `downloadId` on a get_queue row (or, for nzbget, on a get_history row). Required for action: "import" and action: "postprocess", ignored otherwise. | |
| reassignments | No | Required for action: "remap", ignored otherwise. Include every file the change touches: a file moved onto an episode that already has one must say where that one goes too, or the call is refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noop | Yes | ||
| tier | Yes | ||
| tool | Yes | ||
| result | No | ||
| target | Yes | ||
| applied | Yes | ||
| dry_run | Yes | ||
| effects | Yes | ||
| service | Yes | ||
| summary | Yes | ||
| audit_id | No | ||
| warnings | No | ||
| operation | Yes | ||
| unchecked | No | ||
| next_steps | No | ||
| permission | Yes | ||
| confirm_error | No | ||
| confirm_token | No |