Skip to main content
Glama

get_track_radio

Discover similar tracks to any TIDAL song to expand playlists and find new music based on your current listening preferences.

Instructions

Get tracks similar to a seed track (track radio).

This returns TIDAL's native recommendations based on the specified track, useful for music discovery and creating "similar music" playlists.

Args: track_id: ID of the seed track limit: Maximum tracks to return (default: 20, max: 100)

Returns: List of similar tracks with seed track info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_idYes
limitNo

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_track_radio tool. It authenticates, fetches the seed track, calls tidalapi's get_track_radio, maps to Track models, and returns RadioTracks.
    @mcp.tool() async def get_track_radio(track_id: str, limit: int = 20) -> RadioTracks: """ Get tracks similar to a seed track (track radio). This returns TIDAL's native recommendations based on the specified track, useful for music discovery and creating "similar music" playlists. Args: track_id: ID of the seed track limit: Maximum tracks to return (default: 20, max: 100) Returns: List of similar tracks with seed track 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 track first track = await anyio.to_thread.run_sync(session.track, track_id) if not track: raise ToolError(f"Track with ID '{track_id}' not found") seed_name = f"{track.name} by {track.artist.name if track.artist else 'Unknown Artist'}" # Get radio tracks radio_tracks = await anyio.to_thread.run_sync( lambda: track.get_track_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=track_id, seed_type="track", seed_name=seed_name, count=len(tracks), tracks=tracks, ) except ToolError: raise except Exception as e: raise ToolError(f"Failed to get track radio: {str(e)}")
  • Pydantic BaseModel defining the structured output schema for the get_track_radio tool response, including seed info and list of recommended tracks.
    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")
  • The @mcp.tool() decorator registers the get_track_radio function as an MCP tool.
    @mcp.tool()
  • Helper lambda that calls the underlying tidalapi Track.get_track_radio method to fetch similar tracks.
    radio_tracks = await anyio.to_thread.run_sync( lambda: track.get_track_radio(limit=limit) )

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/keenanbass1/tidal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server