search_artists
Search for artists by name, genre, or keywords to discover new music, build playlists, or research talent. Returns ranked results with names, images, genres, popularity scores, and links to explore artists' catalogs.
Instructions
Search for artists using names, genres, or keywords to discover new music and talent.
🎯 USE CASES: • Finding artists when you only remember partial names • Discovering artists within specific genres or styles • Locating emerging or independent artists • Building diverse playlists with multiple artists • Researching artists for events or collaborations
📝 WHAT IT RETURNS: • Ranked artist results based on search relevance • Artist names, images, and genre classifications • Popularity scores and follower counts • Links to explore each artist's catalog • External URLs and social media links
🔍 EXAMPLES: • "Search for 'jazz pianist' artists" • "Find artists named 'John'" • "Look for 'indie rock' bands" • "Search for artists from 'Nashville'" • "Find 'female rapper' artists"
💡 SEARCH STRATEGIES: • Use genre keywords: "progressive metal", "folk acoustic" • Include location: "Seattle grunge", "Detroit techno" • Try instrument-specific searches: "saxophone", "violin" • Use descriptive terms: "soulful", "experimental", "classical"
⚠️ REQUIREMENTS: • Valid Spotify access token • Meaningful search keywords for best results
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Search query for artists (artist name, keywords) | |
| token | Yes | Spotify access token for authentication |
Implementation Reference
- src/mcp/tools/artists.ts:180-183 (handler)The handler function for the 'search_artists' tool. It destructures the arguments and calls the SpotifyService's searchArtists method to perform the search.handler: async (args: any, spotifyService: SpotifyService) => { const { token, query, limit = 20 } = args; return await spotifyService.searchArtists(token, query, limit); },
- src/mcp/tools/artists.ts:175-179 (schema)The input schema for the 'search_artists' tool, defining parameters token, query, and optional limit using common schema builders.schema: createSchema({ token: commonSchemas.token(), query: commonSchemas.searchQuery("artists (artist name, keywords)"), limit: commonSchemas.limit(1, 50, 20), }),
- src/mcp/tools/index.ts:22-36 (registration)Registration of all tools including artistTools (which contains search_artists) into the central allTools registry used by ToolRegistrar for MCP integration.export const allTools: ToolsRegistry = { ...albumTools, ...artistTools, ...trackTools, ...playlistTools, ...playbackTools, ...userTools, ...searchTools, };
- src/mcp/server.ts:13-14 (registration)Instantiation of ToolRegistrar with SpotifyService in the MCP server, which provides the tool definitions and handlers to the MCP protocol.const spotifyService = new SpotifyService(); const toolRegistrar = new ToolRegistrar(spotifyService);
- src/spotify.ts:415-426 (helper)The supporting SpotifyService method that implements the artist search by calling Spotify's /search API endpoint with type=artist.async searchArtists( token: string, query: string, limit: number = 20 ): Promise<SearchResult> { const params = { q: query, type: "artist", limit: Math.min(limit, 50), }; return await this.makeRequest<SearchResult>("search", token, params); }