Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

get_similar_albums

Discover music albums similar to a specified TIDAL album to expand your listening experience based on musical style and artist connections.

Instructions

Get albums similar to the specified album.

Args: album_id: ID of the seed album limit: Maximum albums to return (default: 10, max: 50)

Returns: List of similar albums

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
album_idYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of albums returned
queryNoSearch query used (for search results)
albumsYesList of album objects
statusYesOperation status (success/error)

Implementation Reference

  • The main handler function implementing get_similar_albums tool. Fetches the seed album via session.album, retrieves similar albums using album.similar(), limits the results, maps to Album models, and returns AlbumList.
    @mcp.tool()
    async def get_similar_albums(album_id: str, limit: int = 10) -> AlbumList:
        """
        Get albums similar to the specified album.
    
        Args:
            album_id: ID of the seed album
            limit: Maximum albums to return (default: 10, max: 50)
    
        Returns:
            List of similar albums
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            limit = min(max(1, limit), 50)
    
            album = await anyio.to_thread.run_sync(session.album, album_id)
            if not album:
                raise ToolError(f"Album with ID '{album_id}' not found")
    
            similar = await anyio.to_thread.run_sync(album.similar)
            limited_similar = similar[:limit] if similar else []
    
            albums = []
            for a in limited_similar:
                release_date = None
                if hasattr(a, "release_date") and a.release_date:
                    release_date = str(a.release_date)
    
                albums.append(
                    Album(
                        id=str(a.id),
                        title=a.name,
                        artist=a.artist.name if a.artist else "Unknown Artist",
                        release_date=release_date,
                        num_tracks=getattr(a, "num_tracks", 0),
                        duration_seconds=getattr(a, "duration", 0),
                        url=f"https://tidal.com/browse/album/{a.id}",
                    )
                )
    
            return AlbumList(
                status="success",
                count=len(albums),
                albums=albums,
            )
        except ToolError:
            raise
        except Exception as e:
            raise ToolError(f"Failed to get similar albums: {str(e)}")
  • Pydantic BaseModel defining the structured output schema AlbumList returned by the get_similar_albums tool.
    class AlbumList(BaseModel):
        """List of albums 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 albums returned")
        albums: List[Album] = Field(description="List of album objects")
  • Pydantic BaseModel defining the Album entity used within the AlbumList output schema.
    class Album(BaseModel):
        """Structured representation of a TIDAL album."""
    
        id: str = Field(description="Unique TIDAL album ID")
        title: str = Field(description="Album title")
        artist: str = Field(description="Primary artist name")
        release_date: Optional[str] = Field(None, description="Release date (YYYY-MM-DD)")
        num_tracks: int = Field(description="Number of tracks in album")
        duration_seconds: int = Field(description="Total album duration in seconds")
        url: str = Field(description="TIDAL web URL for the album")
  • Tool description in server instructions, indicating registration and purpose.
    - get_similar_albums: Find albums similar to a given album
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 albums but doesn't explain how similarity is determined (e.g., based on genre, artist, or user data), whether it requires authentication, rate limits, error handling, or the structure of returned albums. For a read operation with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 front-loaded with the core purpose in the first sentence, followed by structured sections for 'Args' and 'Returns'. Every sentence earns its place by providing essential information without redundancy. It's appropriately sized for a simple tool with two parameters and a clear output.

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

Completeness3/5

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

Given the tool's low complexity (2 parameters, no nested objects) and the presence of an output schema (which handles return value documentation), the description is mostly complete. However, it lacks behavioral details (e.g., how similarity is computed) and usage guidelines, which are important for a tool with siblings like 'get_similar_artists'. With no annotations, it should do more to compensate, making it adequate but with gaps.

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 'album_id' is the 'ID of the seed album' and 'limit' is the 'Maximum albums to return' with default and max values. This compensates well for the schema's lack of descriptions, though it doesn't detail the format of 'album_id' (e.g., numeric or string). With 2 parameters and low schema coverage, this is strong but not perfect.

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 albums similar to the specified album.' It uses a specific verb ('Get') and resource ('albums similar to the specified album'), making the function immediately understandable. However, it doesn't explicitly distinguish itself from sibling tools like 'get_similar_artists' or 'search_albums' beyond the inherent difference in resource type, which is why it doesn't reach a 5.

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. It doesn't mention sibling tools like 'get_similar_artists' (for artist-based similarity) or 'search_albums' (for keyword-based discovery), nor does it specify prerequisites (e.g., needing a valid album ID). The usage is implied by the purpose but lacks explicit context or exclusions.

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