Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

get_user_playlists

Retrieve your personal TIDAL playlists to access and manage your music collections directly from the streaming service.

Instructions

Get list of user's own playlists from TIDAL.

Args: limit: Maximum playlists to return (default: 50)

Returns: List of user's playlists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of playlists returned
queryNoSearch query used (for search results)
statusYesOperation status (success/error)
playlistsYesList of playlist objects

Implementation Reference

  • The handler function implementing the get_user_playlists tool logic using tidalapi to fetch and format user's playlists.
    @mcp.tool()
    async def get_user_playlists(limit: int = 50) -> PlaylistList:
        """
        Get list of user's own playlists from TIDAL.
    
        Args:
            limit: Maximum playlists to return (default: 50)
    
        Returns:
            List of user's playlists
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            all_playlists = await anyio.to_thread.run_sync(session.user.playlists)
            limited_playlists = all_playlists[:limit] if limit else all_playlists
    
            playlists = []
            for playlist in limited_playlists:
                playlists.append(
                    Playlist(
                        id=str(playlist.id),
                        name=playlist.name,
                        description=getattr(playlist, "description", "") or "",
                        track_count=getattr(playlist, "num_tracks", 0),
                        creator=None,  # User's own playlists
                        url=f"https://tidal.com/browse/playlist/{playlist.id}",
                    )
                )
    
            return PlaylistList(status="success", count=len(playlists), playlists=playlists)
        except Exception as e:
            raise ToolError(f"Failed to get playlists: {str(e)}")
  • Pydantic BaseModel defining the output schema (PlaylistList) returned by the tool.
    class PlaylistList(BaseModel):
        """List of playlists 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 playlists returned")
        playlists: List[Playlist] = Field(description="List of playlist objects")
  • Pydantic BaseModel defining the Playlist entity used within the tool's output schema.
    class Playlist(BaseModel):
        """Structured representation of a TIDAL playlist."""
    
        id: str = Field(description="Unique playlist ID (UUID)")
        name: str = Field(description="Playlist name")
        description: str = Field(description="Playlist description")
        track_count: int = Field(description="Number of tracks in playlist")
        creator: Optional[str] = Field(None, description="Playlist creator name")
        url: str = Field(description="TIDAL web URL for the playlist")
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 it returns a list but doesn't mention authentication requirements, rate limits, pagination, error handling, or whether it's read-only (implied by 'Get' but not explicit). This leaves significant gaps for a tool that likely requires user authentication and has operational constraints.

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 efficiently structured with a clear main sentence followed by brief 'Args' and 'Returns' sections. Every sentence adds value without redundancy, making it easy to parse and front-loaded with the core purpose.

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 (1 parameter, no nested objects) and the presence of an output schema (implied by 'Returns'), the description is moderately complete. However, with no annotations and missing details on authentication and behavioral traits, it falls short of being fully adequate for safe and effective use by an agent.

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 'limit', specifying it as 'Maximum playlists to return' with a default of 50, which goes beyond the input schema's basic type and default. Since schema description coverage is 0% and there's only one parameter, this adequately compensates, though it could note constraints like minimum/maximum values.

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 action ('Get list') and resource ('user's own playlists from TIDAL'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_playlists' or 'get_playlist_tracks', which would require mentioning this specifically retrieves only the authenticated user's playlists rather than searching or fetching tracks from a playlist.

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 like 'search_playlists' or 'get_playlist_tracks'. It mentions the user's own playlists but doesn't clarify prerequisites (e.g., authentication via 'login') or exclusions, leaving the agent to infer usage from context alone.

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