clean_all_playlists
Scan all Spotify playlists for duplicate tracks by URI or name/artist, report findings, and optionally remove duplicates with a confirmation before deletion.
Instructions
Scan every playlist in your library for duplicate items (repeated URIs, and on opt-in same-song copies under different URIs when match_by=name_artist). Reports per-playlist findings by default; pass apply=true to remove them (keeps the first occurrence of each group). Bulk removals ask for one confirmation before anything is deleted. See the duplicate-matching vocabulary in SPEC section 4.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | Deprecated alias for dry_run — prefer dry_run. false (default): report only. true: execute the cleanup across all playlists with duplicates. If both are given, dry_run wins. | |
| dry_run | No | Preview only — when true, nothing is changed; when false via dry_run=false or apply=true, executes the cleanup | |
| match_by | No | Which rule decides that two items are the same: `uri` (exact URI, the default), `name_artist` (case-insensitive name + credited artists, catches relinks/remasters), or `name` (case-insensitive name only). The rule applied is echoed in the result as `match_by`. | |
| max_results | No | Max items to return (default: SPOTIFY_MCP_MAX_ITEMS env or 50) | |
| response_format | No | 'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API object | concise |
| include_relinked | No | Deprecated alias for `match_by`, kept for one release: true is `name_artist` and false is `uri`. It cannot express the `name` rule, which is why `match_by` replaced it. Sending both, where they mean different rules, is an error rather than a silent choice. |