scan_library
Start a Tdarr library file scan to add new files, rescan from scratch, or scan specific paths; use it to refresh library contents, then poll scanner status for progress.
Instructions
Start a file scan on a library (POST /api/v2/scan-files). 'scanFindNew' adds files not yet in the database, 'scanFresh' rescans everything from scratch, and 'scanFolderWatcher' scans a specific list of file paths. Scanning is asynchronous — poll get_scanner_status for progress.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"library_id": "<library_id>",
"mode": "<mode>"
},
"name": "scan_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Scan mode. scanFresh discards existing scan results for the library. | |
| path | No | Folder to scan, for scanFresh and scanFindNew. Defaults to the library's own folder. | |
| paths | No | Explicit list of file paths, required for scanFolderWatcher | |
| library_id | Yes | Library ID (dbID), from list_libraries |