get_artist_radio
Generate a radio station of tracks similar to a specified artist's style using TIDAL's native recommendations. Input an artist ID to discover music that matches their sound.
Instructions
Get tracks similar to an artist's style (artist radio).
This returns TIDAL's native recommendations based on the specified artist, useful for discovering music in a similar style.
Args: artist_id: ID of the seed artist limit: Maximum tracks to return (default: 20, max: 100)
Returns: List of similar tracks with seed artist info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| artist_id | Yes | ||
| limit | No |
Implementation Reference
- src/tidal_mcp/server.py:889-945 (handler)The core implementation of the get_artist_radio tool. Decorated with @mcp.tool() for automatic MCP registration. Handles authentication, fetches artist via tidalapi, retrieves radio tracks, maps to Track models, and returns structured RadioTracks response.@mcp.tool() async def get_artist_radio(artist_id: str, limit: int = 20) -> RadioTracks: """ Get tracks similar to an artist's style (artist radio). This returns TIDAL's native recommendations based on the specified artist, useful for discovering music in a similar style. Args: artist_id: ID of the seed artist limit: Maximum tracks to return (default: 20, max: 100) Returns: List of similar tracks with seed artist info """ if not await ensure_authenticated(): raise ToolError("Not authenticated. Please run the 'login' tool first.") try: limit = min(max(1, limit), 100) # Get the seed artist first artist = await anyio.to_thread.run_sync(session.artist, artist_id) if not artist: raise ToolError(f"Artist with ID '{artist_id}' not found") # Get radio tracks radio_tracks = await anyio.to_thread.run_sync( lambda: artist.get_radio(limit=limit) ) tracks = [] for t in radio_tracks: tracks.append( Track( id=str(t.id), title=t.name, artist=t.artist.name if t.artist else "Unknown Artist", album=t.album.name if t.album else "Unknown Album", duration_seconds=t.duration, url=f"https://tidal.com/browse/track/{t.id}", ) ) return RadioTracks( status="success", seed_id=artist_id, seed_type="artist", seed_name=artist.name, count=len(tracks), tracks=tracks, ) except ToolError: raise except Exception as e: raise ToolError(f"Failed to get artist radio: {str(e)}")
- src/tidal_mcp/models.py:209-218 (schema)Pydantic BaseModel defining the output schema for the get_artist_radio tool (shared with get_track_radio). Specifies structure including seed info and list of Track objects.class RadioTracks(BaseModel): """Radio/recommendation tracks based on a seed track or artist.""" status: str = Field(description="Operation status (success/error)") seed_id: str = Field(description="ID of the seed track or artist") seed_type: str = Field(description="Type of seed (track/artist)") seed_name: str = Field(description="Name of the seed track or artist") count: int = Field(description="Number of tracks returned") tracks: List[Track] = Field(description="List of recommended tracks")