import_from_sidecar
Restore missing saved Spotify items from a library.json sidecar: re-add tracks, albums, shows, episodes, and audiobooks, skip items already in the library, and dry-run by default.
Instructions
Additive restore from a library.json sidecar written by export_library_json: re-adds every missing saved item across all five collections (tracks, albums, shows, episodes, audiobooks) through the unified PUT /me/library endpoint, skipping items the library already holds. Rows whose uri is not a canonical spotify::<22-char id> URI are counted as invalid and never sent. Collections the file does not carry are named in absent_keys. The exporter's own truncated / cap_reached flags are surfaced as sidecar_truncated + truncated_collections: a capped sidecar restores only the rows it holds and says so, and a file with no flag reports completeness as UNKNOWN rather than complete. The prompt and the result both state the sidecar path, the date the file itself declares (exported_at, or the named reason it declares none — never the mtime), the row count, the one use being made of it, and whether a human confirmed that use (see consent_note). dry_run=true by default. Quota: local read + contains-check + chunked writes when dry_run=false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview only, making no API calls at all. Writes happen only when explicitly set to false. | |
| input_path | No | Path to sidecar JSON (default: <portability>/library.json) | |
| response_format | No | 'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object | concise |