playlist_dedupe_advanced
Remove duplicate songs from Spotify playlists by exact URI or track name, choosing which copy to keep, with a dry-run preview before applying.
Instructions
Remove duplicate items from a playlist, matching by URI (exact copies) OR by track name (catches re-adds of the same song from different albums/singles when combined with dedupe by uri). Choose keep-first or keep-last. Written as one atomic replace. Quota: 🟢 2 GETs + 1 PUT.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep | No | Which occurrence to keep. Default first | first |
| dry_run | No | Preview only: perform the read side and return a PLAN without changing anything. Pass false to commit. Default true | |
| match_by | No | Duplicate key: exact URI, or case-insensitive track name (catches same song from different releases). Default uri | uri |
| max_results | No | Max items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50) | |
| playlist_id | Yes | Playlist to dedupe, as ID or spotify:playlist: URI | |
| response_format | No | 'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object | concise |