playlist_keep_only
Prune a playlist by keeping only items that match specified URIs, artist, type, or name query and removing all others in a single atomic replace.
Instructions
Inverse removal: keep only matching items (by uri / artist / type / query) and drop everything else — one atomic replace, no N+1 deletes. Quota: 🟢 GET + 1 PUT.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | type mode: keep only this playable type | |
| query | No | query mode: keep items whose name contains this substring | |
| artist | No | artist mode: keep tracks by this artist (ID/URI or name) | |
| values | No | uris mode: track uris to keep | |
| dry_run | No | Preview only: perform the read side and return a PLAN without changing anything. Default true — pass false to commit. | |
| keep_by | Yes | Match mode for what to KEEP | |
| max_results | No | Max items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50) | |
| playlist_id | Yes | Playlist to prune (ID or spotify:playlist: URI) | |
| response_format | No | 'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object | concise |