Skip to main content
Glama
yuhuacheng

TIDAL MCP: My Custom Picks

create_tidal_playlist

Create a new playlist in your TIDAL account by adding specified tracks, with naming guidance based on your existing playlist style.

Instructions

Creates a new TIDAL playlist with the specified tracks.

USE THIS TOOL WHENEVER A USER ASKS FOR:
- "Create a playlist with these songs"
- "Make a TIDAL playlist"
- "Save these tracks to a playlist"
- "Create a collection of songs"
- Any request to create a new playlist in their TIDAL account

This function creates a new playlist in the user's TIDAL account and adds the specified tracks to it.
The user must be authenticated with TIDAL first.

NAMING CONVENTION GUIDANCE:
When suggesting or creating a playlist, first check the user's existing playlists using get_user_playlists()
to understand their naming preferences. Some patterns to look for:
- Do they use emoji in playlist names?
- Do they use all caps, title case, or lowercase?
- Do they include dates or seasons in names?
- Do they name by mood, genre, activity, or artist?
- Do they use specific prefixes or formatting (e.g., "Mix: Summer Vibes" or "[Workout] High Energy")

Try to match their style when suggesting new playlist names. If they have no playlists yet or you 
can't determine a pattern, use a clear, descriptive name based on the tracks' common themes.

When processing the results of this tool:
1. Confirm the playlist was created successfully
2. Provide the playlist title, number of tracks added, and URL
3. Always include the direct TIDAL URL (https://tidal.com/playlist/{playlist_id})
4. Suggest that the user can now access this playlist in their TIDAL account

Args:
    title: The name of the playlist to create
    track_ids: List of TIDAL track IDs to add to the playlist
    description: Optional description for the playlist (default: "")
    
Returns:
    A dictionary containing the status of the playlist creation and details about the created playlist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
track_idsYes
descriptionNo

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the core logic for creating a TIDAL playlist. It handles authentication check, input validation, API call to Flask backend, and formats the response with playlist URL.
    @mcp.tool()
    def create_tidal_playlist(title: str, track_ids: list, description: str = "") -> dict:
        """
        Creates a new TIDAL playlist with the specified tracks.
        
        USE THIS TOOL WHENEVER A USER ASKS FOR:
        - "Create a playlist with these songs"
        - "Make a TIDAL playlist"
        - "Save these tracks to a playlist"
        - "Create a collection of songs"
        - Any request to create a new playlist in their TIDAL account
        
        This function creates a new playlist in the user's TIDAL account and adds the specified tracks to it.
        The user must be authenticated with TIDAL first.
    
        NAMING CONVENTION GUIDANCE:
        When suggesting or creating a playlist, first check the user's existing playlists using get_user_playlists()
        to understand their naming preferences. Some patterns to look for:
        - Do they use emoji in playlist names?
        - Do they use all caps, title case, or lowercase?
        - Do they include dates or seasons in names?
        - Do they name by mood, genre, activity, or artist?
        - Do they use specific prefixes or formatting (e.g., "Mix: Summer Vibes" or "[Workout] High Energy")
        
        Try to match their style when suggesting new playlist names. If they have no playlists yet or you 
        can't determine a pattern, use a clear, descriptive name based on the tracks' common themes.
        
        When processing the results of this tool:
        1. Confirm the playlist was created successfully
        2. Provide the playlist title, number of tracks added, and URL
        3. Always include the direct TIDAL URL (https://tidal.com/playlist/{playlist_id})
        4. Suggest that the user can now access this playlist in their TIDAL account
        
        Args:
            title: The name of the playlist to create
            track_ids: List of TIDAL track IDs to add to the playlist
            description: Optional description for the playlist (default: "")
            
        Returns:
            A dictionary containing the status of the playlist creation and details about the created playlist
        """
        try:
            # First, check if the user is authenticated
            auth_check = requests.get(f"{FLASK_APP_URL}/api/auth/status")
            auth_data = auth_check.json()
            
            if not auth_data.get("authenticated", False):
                return {
                    "status": "error",
                    "message": "You need to login to TIDAL first before creating a playlist. Please use the tidal_login() function."
                }
            
            # Validate inputs
            if not title:
                return {
                    "status": "error",
                    "message": "Playlist title cannot be empty."
                }
                
            if not track_ids or not isinstance(track_ids, list) or len(track_ids) == 0:
                return {
                    "status": "error",
                    "message": "You must provide at least one track ID to add to the playlist."
                }
            
            # Create the playlist through the Flask API
            payload = {
                "title": title,
                "description": description,
                "track_ids": track_ids
            }
            
            response = requests.post(f"{FLASK_APP_URL}/api/playlists", json=payload)
            
            # Check response
            if response.status_code != 200:
                error_data = response.json()
                return {
                    "status": "error",
                    "message": f"Failed to create playlist: {error_data.get('error', 'Unknown error')}"
                }
                
            # Parse the response
            result = response.json()
            playlist_data = result.get("playlist", {})
            
            # Get the playlist ID
            playlist_id = playlist_data.get("id")
            
            # Format the TIDAL URL
            playlist_url = f"https://tidal.com/playlist/{playlist_id}" if playlist_id else None        
            playlist_data["playlist_url"] = playlist_url
            
            return {
                "status": "success",
                "message": f"Successfully created playlist '{title}' with {len(track_ids)} tracks",
                "playlist": playlist_data            
            }
            
        except Exception as e:
            return {
                "status": "error",
                "message": f"Failed to create playlist: {str(e)}"
            }
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing authentication requirements, naming convention guidance, and post-creation processing steps. However, it doesn't mention potential failure modes, rate limits, or whether the operation is idempotent, leaving some behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is appropriately front-loaded with purpose and usage, but contains verbose sections like the detailed naming convention guidance and post-processing steps that could be streamlined. While all content is relevant, some sentences could be more concise.

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?

For a mutation tool with no annotations and no output schema, the description does well by covering authentication, parameters, usage context, and post-creation expectations. However, it lacks explicit information about return value structure and error handling, which would help complete the context.

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?

With 0% schema description coverage, the description compensates by explaining all three parameters in the Args section, adding meaning about track IDs being TIDAL-specific, description being optional with default, and title being the playlist name. It doesn't specify format constraints for track IDs, leaving a minor gap.

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 tool's purpose with specific verb ('Creates') and resource ('new TIDAL playlist'), and distinguishes it from sibling tools like 'delete_tidal_playlist' and 'get_user_playlists' by focusing on creation rather than deletion or retrieval.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance with a dedicated 'USE THIS TOOL WHENEVER' section listing specific user request patterns, plus prerequisites ('user must be authenticated with TIDAL first') and references to alternative tools ('first check the user's existing playlists using get_user_playlists()').

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/yuhuacheng/tidal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server