Skip to main content
Glama

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

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

Implementation Reference

  • 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); },
  • Zod-based input schema defining required parameters: Spotify access token and playlist ID.
    schema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }),
  • 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" ); }
  • 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, };
  • 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);

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