get_playlist
Retrieve detailed Spotify playlist data including tracks, metadata, and creator insights for analysis, discovery, or event planning. Requires Spotify access token and playlist ID.
Instructions
Retrieve comprehensive information about any Spotify playlist including tracks, metadata, and creator details.
🎯 USE CASES: • Analyze playlist contents before following or copying • Check playlist length and total duration for events • View track listing to discover new music • Research playlist themes and genre consistency • Export playlist information for backup or sharing
📝 WHAT IT RETURNS: • Complete playlist metadata (name, description, creator) • Full track listing with artist and album information • Playlist artwork, follower count, and popularity metrics • Track order, durations, and explicit content flags • Public/private status and collaborative settings
🔍 EXAMPLES: • "Get details for Today's Top Hits playlist" • "Show me the tracks in playlist ID: 37i9dQZF1DXcBWIGoYBM5M" • "What songs are in my workout playlist?" • "Analyze this collaborative playlist my friends made"
💡 PLAYLIST INSIGHTS: • Perfect for playlist curation and discovery • Check before adding to your library • Great for party planning and event music selection • Useful for understanding music trends and preferences
⚠️ REQUIREMENTS: • Valid Spotify access token • Playlist must be public or user must have access
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:43-46 (handler)The MCP tool handler for get_playlist that delegates to SpotifyService.getPlaylisthandler: async (args: any, spotifyService: SpotifyService) => { const { token, playlistId } = args; return await spotifyService.getPlaylist(token, playlistId); },
- src/mcp/tools/playlists.ts:39-42 (schema)Zod schema for get_playlist tool inputs: token and playlistIdschema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }),
- src/mcp/tools/index.ts:22-36 (registration)Aggregation of all tools including playlistTools (with get_playlist) into allTools registry used by ToolRegistrarexport const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
- src/spotify.ts:504-510 (helper)SpotifyService.getPlaylist implementation that performs the actual Spotify API requestasync getPlaylist( token: string, playlistId: string ): Promise<SpotifyPlaylist> { const id = this.extractId(playlistId); return await this.makeRequest<SpotifyPlaylist>(`playlists/${id}`, token); }