get_playlist
Retrieve comprehensive Spotify playlist information including tracks, metadata, creator details, and content analysis for discovery, curation, and planning purposes.
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 |
|---|---|---|---|
| token | Yes | Spotify access token for authentication | |
| playlistId | Yes | Spotify playlist ID or URI |
Implementation Reference
- src/mcp/tools/playlists.ts:6-47 (handler)MCP tool definition for 'get_playlist' including handler, schema, title, and description. The handler delegates to SpotifyService.getPlaylist.get_playlist: { title: "Get Playlist", description: `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`, schema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }), handler: async (args: any, spotifyService: SpotifyService) => { const { token, playlistId } = args; return await spotifyService.getPlaylist(token, playlistId); }, },
- src/mcp/tools/playlists.ts:39-42 (schema)Input schema validation for get_playlist tool using Zod: requires token and playlistId.schema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }),
- src/mcp/tools/index.ts:22-36 (registration)Registration of playlistTools (including get_playlist) into the central allTools registry used by ToolRegistrar for MCP tool definitions and handlers.export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
- src/spotify.ts:504-510 (helper)SpotifyService.getPlaylist method: extracts ID and makes API request to fetch playlist details from Spotify API.async getPlaylist( token: string, playlistId: string ): Promise<SpotifyPlaylist> { const id = this.extractId(playlistId); return await this.makeRequest<SpotifyPlaylist>(`playlists/${id}`, token); }