Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

get_similar_artists

Find artists with similar musical styles to expand your listening preferences within the TIDAL music streaming service.

Instructions

Get artists similar to the specified artist.

Args: artist_id: ID of the seed artist limit: Maximum artists to return (default: 10, max: 50)

Returns: List of similar artists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artist_idYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of artists returned
queryNoSearch query used (for search results)
statusYesOperation status (success/error)
artistsYesList of artist objects

Implementation Reference

  • The main handler function for the 'get_similar_artists' tool. It fetches the seed artist using tidalapi, retrieves similar artists via artist.get_similar(), limits the results, maps them to structured Artist models, and returns an ArtistList.
    @mcp.tool()
    async def get_similar_artists(artist_id: str, limit: int = 10) -> ArtistList:
        """
        Get artists similar to the specified artist.
    
        Args:
            artist_id: ID of the seed artist
            limit: Maximum artists to return (default: 10, max: 50)
    
        Returns:
            List of similar artists
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            limit = min(max(1, limit), 50)
    
            artist = await anyio.to_thread.run_sync(session.artist, artist_id)
            if not artist:
                raise ToolError(f"Artist with ID '{artist_id}' not found")
    
            similar = await anyio.to_thread.run_sync(artist.get_similar)
            limited_similar = similar[:limit] if similar else []
    
            artists = []
            for a in limited_similar:
                artists.append(
                    Artist(
                        id=str(a.id),
                        name=a.name,
                        url=f"https://tidal.com/browse/artist/{a.id}",
                    )
                )
    
            return ArtistList(
                status="success",
                count=len(artists),
                artists=artists,
            )
        except ToolError:
            raise
        except Exception as e:
            raise ToolError(f"Failed to get similar artists: {str(e)}")
  • Pydantic model defining the output schema for the tool: a list of similar artists with status, count, and Artist objects.
    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")
  • Pydantic model for individual Artist objects used in the ArtistList output.
    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")
  • Helper function used by the tool to ensure the user is authenticated with TIDAL before executing the logic.
    async def ensure_authenticated() -> bool:
        """
        Check if user is authenticated with TIDAL.
        Automatically loads persisted session if available.
        """
        if await anyio.Path(SESSION_FILE).exists():
            try:
                async with await anyio.open_file(SESSION_FILE, "r") as f:
                    content = await f.read()
                    data = json.loads(content)
    
                # Load OAuth session
                result = await anyio.to_thread.run_sync(
                    session.load_oauth_session,
                    data["token_type"]["data"],
                    data["access_token"]["data"],
                    data["refresh_token"]["data"],
                    None,  # expiry time
                )
    
                if result:
                    is_valid = await anyio.to_thread.run_sync(session.check_login)
                    if not is_valid:
                        await anyio.Path(SESSION_FILE).unlink()
                    return is_valid
                return False
            except Exception:
                await anyio.Path(SESSION_FILE).unlink()
                return False
    
        return await anyio.to_thread.run_sync(session.check_login)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a list of similar artists but doesn't cover critical aspects like whether this is a read-only operation (implied by 'Get'), potential rate limits, authentication requirements, error conditions, or data freshness. For a tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the purpose stated clearly in the first sentence. The 'Args' and 'Returns' sections are structured efficiently, providing essential information without redundancy. Every sentence earns its place, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is reasonably complete. It covers the purpose, parameters, and return value. Since an output schema exists, it doesn't need to detail return values further. However, it lacks usage guidelines and behavioral context, which slightly reduces completeness for a tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful semantics beyond the input schema, which has 0% description coverage. It explains that 'artist_id' is the 'ID of the seed artist' and 'limit' is the 'Maximum artists to return' with default and max values. This compensates well for the schema's lack of descriptions, providing clear context for both parameters, though it doesn't detail format specifics (e.g., what constitutes a valid artist_id).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get artists similar to the specified artist.' It uses a specific verb ('Get') and resource ('artists similar to the specified artist'), making the function immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_artist' or 'search_artists', which is why it doesn't achieve a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. For example, it doesn't explain when to use 'get_similar_artists' compared to 'get_artist', 'search_artists', or 'get_artist_radio' from the sibling list. There's no mention of prerequisites, context, or exclusions, leaving the agent with no usage direction beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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