unsave_playlist
Remove user-created playlists from your Spotify library to organize and clean up your music collection. Confirm unfollow status and manage collaborative or personal playlist follows.
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 |
|---|---|---|---|
| playlistId | Yes | Spotify playlist ID or URI | |
| token | Yes | Spotify access token for authentication |
Implementation Reference
- src/mcp/tools/playlists.ts:543-546 (handler)The MCP tool handler function for 'unsave_playlist' that destructures validated arguments and delegates execution to the SpotifyService.unsavePlaylist method.handler: async (args: any, spotifyService: SpotifyService) => { const { token, playlistId } = args; return await spotifyService.unsavePlaylist(token, playlistId); },
- src/mcp/tools/playlists.ts:539-542 (schema)Zod-based input schema defining required parameters: Spotify access token and playlist ID.schema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }),
- src/spotify.ts:747-755 (helper)Core helper function in SpotifyService that extracts the playlist ID and sends a DELETE request to the Spotify API's /playlists/{id}/followers endpoint to unfollow (unsave) 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" ); }
- src/mcp/tools/index.ts:22-36 (registration)Aggregation and registration of all tool sets, including playlistTools (containing unsave_playlist), into the central allTools registry used by ToolRegistrar for MCP tool exposure.export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
- src/mcp/server.ts:13-14 (registration)Initialization of SpotifyService and ToolRegistrar in the MCP server, enabling dynamic registration and handling of all tools including unsave_playlist via ListTools and CallTool request handlers.const spotifyService = new SpotifyService(); const toolRegistrar = new ToolRegistrar(spotifyService);