unsave_playlist
Remove user-created playlists from your Spotify library to organize and clean up your music collection. This tool unfollows playlists you no longer listen to while preserving the original content for potential re-following later.
Instructions
Remove a user-created playlist from your Spotify library (unfollow playlist).
π― USE CASES: β’ Clean up library by unfollowing user-created playlists β’ Unfollow collaborative playlists that no longer match preferences β’ Remove personal playlist follows β’ Organize library by removing temporary follows
π WHAT IT RETURNS: β’ Confirmation of successful playlist unfollow β’ Updated library status β’ Status of the removal operation β’ Error details for any failed removals
π EXAMPLES: β’ "Unfollow this user-created playlist" β’ "Remove this collaborative playlist from my library" β’ "Stop following this personal playlist"
π‘ REMOVAL FEATURES: β’ Instantly unfollows playlist from your library β’ Doesn't delete the original playlist β’ You can re-follow the playlist anytime β’ Perfect for library maintenance
π« LIMITATIONS (as of November 27, 2024): β’ Cannot unfollow Spotify's official/editorial playlists β’ Cannot affect algorithmic playlists (they auto-appear) β’ Only works with user-created playlists you follow β’ Spotify-owned playlists are restricted
π§ TROUBLESHOOTING: β’ If you get 404 error: The playlist might be Spotify-owned β’ Ensure you're currently following the playlist β’ Only works with user-created playlists
π‘ MANAGEMENT TIPS: β’ Regular cleanup helps keep library organized β’ Unfollow playlists you no longer listen to β’ Consider creating your own versions of favorites β’ Use this for managing collaborative playlist follows
β οΈ REQUIREMENTS: β’ Valid Spotify access token with playlist-modify-public scope β’ Playlist must be user-created (not Spotify-owned) β’ You must currently be following the playlist
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Spotify access token for authentication | |
| playlistId | Yes | Spotify playlist ID or URI |
Implementation Reference
- src/mcp/tools/playlists.ts:543-546 (handler)The MCP tool handler function for 'unsave_playlist' that extracts arguments and delegates to SpotifyService.unsavePlaylist.handler: async (args: any, spotifyService: SpotifyService) => { const { token, playlistId } = args; return await spotifyService.unsavePlaylist(token, playlistId); },
- src/mcp/tools/playlists.ts:539-542 (schema)The Zod input schema definition for the 'unsave_playlist' tool, validating token and playlistId parameters.schema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }),
- src/mcp/tools/index.ts:22-36 (registration)Registration of playlistTools (containing unsave_playlist) into the central allTools registry used by ToolRegistrar for MCP server.export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
- src/spotify.ts:747-755 (helper)The SpotifyService helper method that makes the DELETE request to Spotify API to unsave/unfollow the playlist.async unsavePlaylist(token: string, playlistId: string): Promise<void> { const id = this.extractId(playlistId); return await this.makeRequest<void>( `playlists/${id}/followers`, token, {}, "DELETE" ); }