search_artists
Find artists on TIDAL by name to access their profiles, music, and related content. Specify search terms and result limits to discover matching performers.
Instructions
Search for artists on TIDAL.
Args: query: Search query - artist name limit: Maximum results (1-50, default: 10)
Returns: List of matching artists with id, name, and URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| limit | No |
Implementation Reference
- src/tidal_mcp/server.py:316-350 (handler)The main handler function for the 'search_artists' tool, which performs the artist search using tidalapi and returns structured ArtistList.@mcp.tool() async def search_artists(query: str, limit: int = 10) -> ArtistList: """ Search for artists on TIDAL. Args: query: Search query - artist name limit: Maximum results (1-50, default: 10) Returns: List of matching artists with id, name, and URL """ if not await ensure_authenticated(): raise ToolError("Not authenticated. Please run the 'login' tool first.") try: limit = min(max(1, limit), 50) results = await anyio.to_thread.run_sync( lambda: session.search(query, models=[tidalapi.Artist], limit=limit) ) artists = [] for artist in results.get("artists", []): artists.append( Artist( id=str(artist.id), name=artist.name, url=f"https://tidal.com/browse/artist/{artist.id}", ) ) return ArtistList(status="success", query=query, count=len(artists), artists=artists) except Exception as e: raise ToolError(f"Artist search failed: {str(e)}")
- src/tidal_mcp/models.py:80-87 (schema)Pydantic model defining the output schema for search_artists tool response.class ArtistList(BaseModel): """List of artists with metadata.""" status: str = Field(description="Operation status (success/error)") query: Optional[str] = Field(None, description="Search query used (for search results)") count: int = Field(description="Number of artists returned") artists: List[Artist] = Field(description="List of artist objects")
- src/tidal_mcp/models.py:39-45 (schema)Pydantic model for individual Artist objects used in ArtistList.class Artist(BaseModel): """Structured representation of a TIDAL artist.""" id: str = Field(description="Unique TIDAL artist ID") name: str = Field(description="Artist name") url: str = Field(description="TIDAL web URL for the artist")