Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesSpotify access token for authentication
playlistIdYesSpotify playlist ID or URI

Implementation Reference

  • 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); },
  • The Zod input schema definition for the 'unsave_playlist' tool, validating token and playlistId parameters.
    schema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }),
  • 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, };
  • 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" ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/latiftplgu/Spotify-OAuth-MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server