Skip to main content
Glama
yuhuacheng

TIDAL MCP: My Custom Picks

delete_tidal_playlist

Remove unwanted playlists from your TIDAL account by specifying the playlist ID. This tool permanently deletes selected playlists after user authentication.

Instructions

Deletes a TIDAL playlist by its ID.

USE THIS TOOL WHENEVER A USER ASKS FOR:
- "Delete my playlist"
- "Remove a playlist from my TIDAL account"
- "Get rid of this playlist"
- "Delete the playlist with ID X"
- Any request to delete or remove a TIDAL playlist

This function deletes a specific playlist from the user's TIDAL account.
The user must be authenticated with TIDAL first.

When processing the results of this tool:
1. Confirm the playlist was deleted successfully
2. Provide a clear message about the deletion

Args:
    playlist_id: The TIDAL ID of the playlist to delete (required)
    
Returns:
    A dictionary containing the status of the playlist deletion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playlist_idYes

Implementation Reference

  • The main handler function for the 'delete_tidal_playlist' MCP tool. Decorated with @mcp.tool() for registration. Implements authentication check, input validation, and delegates the deletion to the Flask backend API via HTTP DELETE request to /api/playlists/{playlist_id}.
    @mcp.tool()
    def delete_tidal_playlist(playlist_id: str) -> dict:
        """
        Deletes a TIDAL playlist by its ID.
        
        USE THIS TOOL WHENEVER A USER ASKS FOR:
        - "Delete my playlist"
        - "Remove a playlist from my TIDAL account"
        - "Get rid of this playlist"
        - "Delete the playlist with ID X"
        - Any request to delete or remove a TIDAL playlist
        
        This function deletes a specific playlist from the user's TIDAL account.
        The user must be authenticated with TIDAL first.
        
        When processing the results of this tool:
        1. Confirm the playlist was deleted successfully
        2. Provide a clear message about the deletion
        
        Args:
            playlist_id: The TIDAL ID of the playlist to delete (required)
            
        Returns:
            A dictionary containing the status of the playlist deletion
        """
        # 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 deleting a playlist. Please use the tidal_login() function."
            }
        
        # Validate playlist_id
        if not playlist_id:
            return {
                "status": "error", 
                "message": "A playlist ID is required. You can get playlist IDs by using the get_user_playlists() function."
            }
        
        try:
            # Call the Flask endpoint to delete the playlist
            response = requests.delete(f"{FLASK_APP_URL}/api/playlists/{playlist_id}")
            
            # Check if the request was successful
            if response.status_code == 200:
                return response.json()
            elif response.status_code == 404:
                return {
                    "status": "error",
                    "message": f"Playlist with ID {playlist_id} not found. Please check the playlist ID and try again."
                }
            elif response.status_code == 401:
                return {
                    "status": "error",
                    "message": "Not authenticated with TIDAL. Please login first using tidal_login()."
                }
            else:
                error_data = response.json()
                return {
                    "status": "error",
                    "message": f"Failed to delete playlist: {error_data.get('error', 'Unknown error')}"
                }
        except Exception as e:
            return {
                "status": "error",
                "message": f"Failed to connect to TIDAL playlist service: {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. It clearly states this is a destructive operation ('Deletes', 'Get rid of'), mentions authentication requirements, and provides post-execution guidance ('Confirm the playlist was deleted successfully'). However, it doesn't mention potential side effects (e.g., whether deletion is permanent/reversible) or error conditions.

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, usage guidelines, prerequisites, processing instructions, Args, Returns) but contains some redundancy (e.g., 'This function deletes...' repeats the opening sentence). Most sentences earn their place, but could be slightly tighter.

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 destructive tool with no annotations and no output schema, the description does well by covering purpose, usage, authentication, parameter semantics, and expected response handling. However, it could better explain the return value format ('dictionary containing the status') and potential error cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for the single parameter, the description fully compensates by clearly explaining 'playlist_id: The TIDAL ID of the playlist to delete (required)' in the Args section. This adds essential meaning beyond the bare schema.

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 ('Deletes') and resource ('a TIDAL playlist by its ID'), distinguishing it from sibling tools like create_tidal_playlist or get_user_playlists. It provides a complete, unambiguous statement of 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 Guidelines5/5

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

The description includes explicit 'USE THIS TOOL WHENEVER' examples covering various user request phrasings, plus a clear prerequisite ('The user must be authenticated with TIDAL first'). This provides comprehensive guidance on when to use this tool versus alternatives.

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