Skip to main content
Glama

get_user_playlists

Retrieve and organize all Spotify playlists a user owns, follows, or has access to. Ideal for playlist management, analytics, backups, and creating search or filtering systems. Supplies playlist details, metadata, and ownership status.

Instructions

Retrieve all playlists that the user owns, follows, or has access to in their Spotify library.

🎯 USE CASES: • Display user's complete playlist collection in applications • Create playlist management interfaces and organizers • Backup playlist metadata and track relationships • Build playlist analytics and listening habit insights • Implement playlist search and filtering systems

📝 WHAT IT RETURNS: • Complete list of user's playlists (owned and followed) • Playlist names, descriptions, and artwork • Creator information and follower counts • Track counts, durations, and last modification dates • Public/private status and collaborative permissions

🔍 EXAMPLES: • "Show me all my playlists" • "Get my playlist collection with 50 items" • "List all playlists I follow and created" • "What playlists do I have in my library?"

📊 PLAYLIST ORGANIZATION: • Includes both created and followed playlists • Shows ownership and collaboration status • Perfect for playlist management dashboards • Great for discovering forgotten playlists • Useful for library cleanup and organization

💡 MANAGEMENT TIPS: • Regular review helps maintain organized library • Check for duplicate or outdated playlists • Identify collaborative playlists for group management • Monitor follower growth on public playlists

⚠️ REQUIREMENTS: • Valid Spotify access token with playlist-read-private scope • User must have at least one playlist in their library

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
tokenYesSpotify access token for authentication

Implementation Reference

  • Defines the MCP tool 'get_user_playlists' with title, detailed description, input schema (token and optional limit), and handler that calls SpotifyService.getUserPlaylists.
    get_user_playlists: { title: "Get User Playlists", description: `Retrieve all playlists that the user owns, follows, or has access to in their Spotify library. 🎯 USE CASES: • Display user's complete playlist collection in applications • Create playlist management interfaces and organizers • Backup playlist metadata and track relationships • Build playlist analytics and listening habit insights • Implement playlist search and filtering systems 📝 WHAT IT RETURNS: • Complete list of user's playlists (owned and followed) • Playlist names, descriptions, and artwork • Creator information and follower counts • Track counts, durations, and last modification dates • Public/private status and collaborative permissions 🔍 EXAMPLES: • "Show me all my playlists" • "Get my playlist collection with 50 items" • "List all playlists I follow and created" • "What playlists do I have in my library?" 📊 PLAYLIST ORGANIZATION: • Includes both created and followed playlists • Shows ownership and collaboration status • Perfect for playlist management dashboards • Great for discovering forgotten playlists • Useful for library cleanup and organization 💡 MANAGEMENT TIPS: • Regular review helps maintain organized library • Check for duplicate or outdated playlists • Identify collaborative playlists for group management • Monitor follower growth on public playlists ⚠️ REQUIREMENTS: • Valid Spotify access token with playlist-read-private scope • User must have at least one playlist in their library`, schema: createSchema({ token: commonSchemas.token(), limit: commonSchemas.limit(1, 50, 20), }), handler: async (args: any, spotifyService: SpotifyService) => { const { token, limit = 20 } = args; return await spotifyService.getUserPlaylists(token, limit); }, },
  • The core handler logic in SpotifyService that makes the HTTP request to Spotify API endpoint '/me/playlists' to fetch the current user's playlists with pagination support.
    async getUserPlaylists( token: string, limit: number = 20 ): Promise<PagingObject<SpotifyPlaylist>> { return await this.makeRequest<PagingObject<SpotifyPlaylist>>( "me/playlists", token, { limit } ); }
  • Registers all individual tool modules including playlistTools (which contains get_user_playlists) into the central allTools registry used by ToolRegistrar for MCP server.
    export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };

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