Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

get_favorite_albums

Retrieve a user's saved albums from TIDAL music streaming service. Specify a limit to control how many albums are returned.

Instructions

Get user's favorite (saved) albums from TIDAL.

Args: limit: Maximum albums to retrieve (default: 50)

Returns: List of favorite albums

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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

  • Core handler function for the get_favorite_albums tool. Fetches user's saved albums using tidalapi.session.user.favorites.albums(), transforms them into Album models, and returns an AlbumList.
    @mcp.tool()
    async def get_favorite_albums(limit: int = 50) -> AlbumList:
        """
        Get user's favorite (saved) albums from TIDAL.
    
        Args:
            limit: Maximum albums to retrieve (default: 50)
    
        Returns:
            List of favorite albums
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            favorites = await anyio.to_thread.run_sync(
                lambda: session.user.favorites.albums(limit=limit)
            )
    
            albums = []
            for album in favorites:
                release_date = None
                if hasattr(album, "release_date") and album.release_date:
                    release_date = str(album.release_date)
    
                albums.append(
                    Album(
                        id=str(album.id),
                        title=album.name,
                        artist=album.artist.name if album.artist else "Unknown Artist",
                        release_date=release_date,
                        num_tracks=getattr(album, "num_tracks", 0),
                        duration_seconds=getattr(album, "duration", 0),
                        url=f"https://tidal.com/browse/album/{album.id}",
                    )
                )
    
            return AlbumList(status="success", count=len(albums), albums=albums)
        except Exception as e:
            raise ToolError(f"Failed to get favorite albums: {str(e)}")
  • Pydantic schema for the AlbumList return type of get_favorite_albums.
    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 schema for individual Album objects contained in the AlbumList response.
    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")
  • FastMCP decorator that registers the get_favorite_albums function as a tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't address critical aspects like authentication requirements, rate limits, pagination, error handling, or data freshness. For a tool accessing user-specific data, this is a significant gap in transparency.

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 well-structured and concise, with zero wasted words. It front-loads the core purpose in the first sentence, followed by clear 'Args' and 'Returns' sections. Each sentence earns its place by providing essential information without redundancy.

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 (one optional parameter) and the presence of an output schema (which covers return values), the description is minimally adequate. However, it lacks context about authentication, error cases, and sibling tool relationships, which are important for a tool accessing user-specific data. It meets basic needs but has clear 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 context for the single parameter: it explains that 'limit' is the 'Maximum albums to retrieve' and provides the default value (50). Since schema description coverage is 0% and there's only one parameter, this effectively compensates for the schema's lack of descriptions, making the parameter's purpose clear.

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 user's favorite (saved) albums from TIDAL.' It specifies the verb ('Get'), resource ('favorite albums'), and source ('TIDAL'), making the action unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_favorite_artists' or 'get_favorite_tracks' beyond the resource name, which prevents 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. It doesn't mention prerequisites (e.g., user authentication), compare it to similar tools like 'get_favorite_artists', or specify scenarios where it's appropriate. This lack of context leaves usage decisions unclear.

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