Skip to main content
Glama

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

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

Implementation Reference

  • The MCP tool handler for get_playlist that delegates to SpotifyService.getPlaylist
    handler: async (args: any, spotifyService: SpotifyService) => { const { token, playlistId } = args; return await spotifyService.getPlaylist(token, playlistId); },
  • Zod schema for get_playlist tool inputs: token and playlistId
    schema: createSchema({ token: commonSchemas.token(), playlistId: commonSchemas.spotifyId("playlist"), }),
  • Aggregation of all tools including playlistTools (with get_playlist) into allTools registry used by ToolRegistrar
    export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
  • SpotifyService.getPlaylist implementation that performs the actual Spotify API request
    async getPlaylist( token: string, playlistId: string ): Promise<SpotifyPlaylist> { const id = this.extractId(playlistId); return await this.makeRequest<SpotifyPlaylist>(`playlists/${id}`, token); }

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