Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

create_playlist

Create a new playlist in your TIDAL account by specifying a name and optional description. This tool helps organize your music collection with custom playlists.

Instructions

Create a new playlist in user's TIDAL account.

Args: name: Name for the playlist description: Optional description

Returns: Created playlist details including ID and URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesOperation status (success/error)
messageYesStatus message
playlistNoCreated playlist details

Implementation Reference

  • The @mcp.tool()-decorated handler function that implements the create_playlist tool logic, authenticates the session, calls the underlying tidalapi session.user.create_playlist, constructs a Playlist object, and returns a CreatePlaylistResult.
    @mcp.tool()
    async def create_playlist(name: str, description: str = "") -> CreatePlaylistResult:
        """
        Create a new playlist in user's TIDAL account.
    
        Args:
            name: Name for the playlist
            description: Optional description
    
        Returns:
            Created playlist details including ID and URL
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            playlist = await anyio.to_thread.run_sync(
                session.user.create_playlist, name, description
            )
    
            return CreatePlaylistResult(
                status="success",
                playlist=Playlist(
                    id=str(playlist.id),
                    name=playlist.name,
                    description=playlist.description or "",
                    track_count=0,
                    creator=None,
                    url=f"https://tidal.com/browse/playlist/{playlist.id}",
                ),
                message=f"Created playlist '{name}'",
            )
        except Exception as e:
            raise ToolError(f"Failed to create playlist: {str(e)}")
  • Pydantic BaseModel defining the return schema for the create_playlist tool, including status, playlist details, and message.
    class CreatePlaylistResult(BaseModel):
        """Result of creating a new playlist."""
    
        status: str = Field(description="Operation status (success/error)")
        playlist: Optional[Playlist] = Field(None, description="Created playlist details")
        message: str = Field(description="Status message")
  • The @mcp.tool() decorator registers this function as an MCP tool named 'create_playlist'.
    @mcp.tool()
    async def create_playlist(name: str, description: str = "") -> CreatePlaylistResult:
        """
        Create a new playlist in user's TIDAL account.
    
        Args:
            name: Name for the playlist
            description: Optional description
    
        Returns:
            Created playlist details including ID and URL
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            playlist = await anyio.to_thread.run_sync(
                session.user.create_playlist, name, description
            )
    
            return CreatePlaylistResult(
                status="success",
                playlist=Playlist(
                    id=str(playlist.id),
                    name=playlist.name,
                    description=playlist.description or "",
                    track_count=0,
                    creator=None,
                    url=f"https://tidal.com/browse/playlist/{playlist.id}",
                ),
                message=f"Created playlist '{name}'",
            )
        except Exception as e:
            raise ToolError(f"Failed to create playlist: {str(e)}")
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 this is a creation operation but doesn't mention authentication requirements, rate limits, error conditions, or whether the operation is idempotent. For a mutation tool 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.

Conciseness4/5

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

The description is well-structured with clear sections (purpose, args, returns) and uses minimal sentences that each add value. It's appropriately sized for a simple creation tool, though the 'Args' and 'Returns' formatting could be slightly more integrated into natural language.

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, mutation operation) and the presence of an output schema (implied by 'Returns' statement), the description is reasonably complete. It covers the core purpose, parameters, and return value, though it lacks behavioral context like authentication needs which would be important for this type of tool.

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 explicitly documents both parameters ('name' and 'description') with brief explanations, adding meaningful context beyond the schema which has 0% description coverage. It clarifies that 'description' is optional, which aligns with the schema's default value. This effectively compensates for the schema's lack of descriptions.

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 ('Create a new playlist') and resource ('in user's TIDAL account'), distinguishing it from sibling tools like 'update_playlist' or 'delete_playlist'. It uses precise language that leaves no ambiguity about what the tool does.

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 'update_playlist' or 'get_user_playlists'. There's no mention of prerequisites (e.g., authentication via 'login'), appropriate contexts, or exclusions. The agent must infer usage from the tool name 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