Skip to main content
Glama

search_playlists

Search for public Spotify playlists by keywords, themes, or criteria to find curated music collections for specific moods, activities, or genres. Returns relevant playlists with names, descriptions, creator info, and popularity metrics.

Instructions

Search for public playlists using keywords, themes, or specific criteria to discover curated music collections.

🎯 USE CASES: • Discover playlists for specific moods, activities, or genres • Find curated music collections for events or occasions • Explore community-created playlists and music trends • Research popular playlist themes and curation styles • Find inspiration for creating your own playlist collections

📝 WHAT IT RETURNS: • Ranked playlist results based on search relevance • Playlist names, descriptions, and creator information • Follower counts, track counts, and playlist popularity • Playlist artwork and last modification dates • Links to explore and follow discovered playlists

🔍 EXAMPLES: • "Search for 'workout motivation' playlists" • "Find playlists with 'indie rock' in the title" • "Look for 'chill studying' playlist collections" • "Search for 'party music' playlists with many followers"

🔍 SEARCH STRATEGIES: • Use activity keywords: "running", "studying", "party" • Include genre terms: "jazz", "electronic", "country" • Try mood descriptors: "chill", "upbeat", "melancholy" • Combine terms: "indie folk acoustic", "90s hip hop" • Search for seasonal themes: "summer", "holiday", "spring"

💡 DISCOVERY BENEFITS: • Access to expertly curated music collections • Discover new artists through themed playlists • Find music for specific activities or moods • Learn about playlist curation and organization • Connect with music communities and trends

⚠️ REQUIREMENTS: • Valid Spotify access token • Results limited to public playlists only

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYesSearch query for playlists (name, keywords)
tokenYesSpotify access token for authentication

Implementation Reference

  • MCP tool handler for 'search_playlists' that validates arguments and calls the Spotify service method.
    handler: async (args: any, spotifyService: SpotifyService) => { const { token, query, limit = 20 } = args; return await spotifyService.searchPlaylists(token, query, limit); },
  • Input schema definition for the 'search_playlists' tool using Zod schemas for token, query, and limit parameters.
    schema: createSchema({ token: commonSchemas.token(), query: commonSchemas.searchQuery("playlists (name, keywords)"), limit: commonSchemas.limit(1, 50, 20), }),
  • Registration of playlistTools (containing search_playlists) into the central allTools registry used by ToolRegistrar for MCP tools.
    export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
  • SpotifyService helper method that implements the core playlist search logic by calling Spotify's search API endpoint.
    async searchPlaylists( token: string, query: string, limit: number = 20 ): Promise<SearchResult> { const params = { q: query, type: "playlist", limit: Math.min(limit, 50), }; return await this.makeRequest<SearchResult>("search", token, params); }

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