Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

search_playlists

Find public TIDAL playlists by name or theme to discover curated music collections for any mood or activity.

Instructions

Search for public playlists on TIDAL.

Args: query: Search query - playlist name or theme limit: Maximum results (1-50, default: 10)

Returns: List of matching playlists with id, name, description, track count, and URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
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 core handler function implementing the search_playlists tool. It checks authentication, performs a search using tidalapi.session.search for Playlists, processes results into Playlist objects, and returns a structured PlaylistList response.
    @mcp.tool()
    async def search_playlists(query: str, limit: int = 10) -> PlaylistList:
        """
        Search for public playlists on TIDAL.
    
        Args:
            query: Search query - playlist name or theme
            limit: Maximum results (1-50, default: 10)
    
        Returns:
            List of matching playlists with id, name, description, track count, and URL
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            limit = min(max(1, limit), 50)
            results = await anyio.to_thread.run_sync(
                lambda: session.search(query, models=[tidalapi.Playlist], limit=limit)
            )
    
            playlists = []
            for playlist in results.get("playlists", []):
                creator_name = None
                if hasattr(playlist, "creator") and playlist.creator:
                    creator_name = getattr(playlist.creator, "name", None)
    
                playlists.append(
                    Playlist(
                        id=str(playlist.id),
                        name=playlist.name,
                        description=getattr(playlist, "description", "") or "",
                        track_count=getattr(playlist, "num_tracks", 0),
                        creator=creator_name,
                        url=f"https://tidal.com/browse/playlist/{playlist.id}",
                    )
                )
    
            return PlaylistList(status="success", query=query, count=len(playlists), playlists=playlists)
        except Exception as e:
            raise ToolError(f"Playlist search failed: {str(e)}")
  • Pydantic model defining the output schema returned by the search_playlists tool handler.
    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 model for the individual Playlist entities composing the output list of the search_playlists tool.
    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")
  • Tool description listed in server instructions for discovery and usage guidance.
    - search_playlists: Find public playlists
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool searches only public playlists (not user-specific), returns a list with specific fields, and mentions a default limit. However, it lacks details on authentication needs, rate limits, pagination, or error conditions that would be helpful for an agent.

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 purpose statement, followed by organized sections for Args and Returns. Every sentence adds value without redundancy, and it's appropriately sized for a simple search tool.

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 low complexity (2 parameters, no nested objects) and the presence of an output schema (implied by 'Returns' details), the description is reasonably complete. It covers purpose, parameters, and return structure. However, without annotations, it could better address behavioral aspects like authentication or error handling.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful context: 'query' is for 'playlist name or theme' (clarifying search scope), and 'limit' has a range (1-50) and default (10) not in the schema. This significantly enhances understanding beyond the bare schema types.

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

Purpose5/5

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

The description clearly states the specific action ('Search for public playlists') and resource ('on TIDAL'), distinguishing it from siblings like 'search_albums', 'search_artists', and 'search_tracks' which search different resource types. It specifies the scope is limited to public playlists, not user-specific ones.

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

Usage Guidelines4/5

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

The description implies usage context by specifying 'public playlists' and listing return fields, suggesting it's for discovery rather than management. However, it doesn't explicitly state when to use this versus alternatives like 'get_user_playlists' (for private/user-specific playlists) or other search tools for different media types.

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