Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

delete_playlist

Remove a playlist from your TIDAL account by providing its ID to declutter your music library and manage your saved content.

Instructions

Delete a playlist from user's account.

Args: playlist_id: ID of the playlist to delete

Returns: Confirmation of deletion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playlist_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesOperation status (success/error)
messageYesStatus message
playlist_idYesID of the deleted playlist

Implementation Reference

  • The handler function that implements the delete_playlist tool. It checks authentication, retrieves the playlist object using session.playlist(playlist_id), deletes it with playlist.delete(), and returns a DeletePlaylistResult.
    @mcp.tool()
    async def delete_playlist(playlist_id: str) -> DeletePlaylistResult:
        """
        Delete a playlist from user's account.
    
        Args:
            playlist_id: ID of the playlist to delete
    
        Returns:
            Confirmation of deletion
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        try:
            playlist = await anyio.to_thread.run_sync(session.playlist, playlist_id)
            if not playlist:
                raise ToolError(f"Playlist with ID '{playlist_id}' not found")
    
            playlist_name = playlist.name
            await anyio.to_thread.run_sync(playlist.delete)
    
            return DeletePlaylistResult(
                status="success",
                playlist_id=playlist_id,
                message=f"Deleted playlist '{playlist_name}'",
            )
        except ToolError:
            raise
        except Exception as e:
            raise ToolError(f"Failed to delete playlist: {str(e)}")
  • Pydantic BaseModel defining the return schema for the delete_playlist tool, including status, playlist_id, and message fields.
    class DeletePlaylistResult(BaseModel):
        """Result of deleting a playlist."""
    
        status: str = Field(description="Operation status (success/error)")
        playlist_id: str = Field(description="ID of the deleted playlist")
        message: str = Field(description="Status message")
  • The tool is listed in the server instructions/docstring, indicating it is available.
    - delete_playlist: Delete a playlist
  • Import of the DeletePlaylistResult schema used by the delete_playlist handler.
    from .models import (
        # Core entities
        Track,
        Album,
        Artist,
        Playlist,
        # List responses
        TrackList,
        AlbumList,
        ArtistList,
        PlaylistList,
        PlaylistTracks,
        AlbumTracks,
        # Detail responses
        ArtistDetails,
        AlbumDetails,
        RadioTracks,
        # Operation results
        AuthResult,
        CreatePlaylistResult,
        AddTracksResult,
        RemoveTracksResult,
        UpdatePlaylistResult,
        DeletePlaylistResult,
        AddToFavoritesResult,
        RemoveFromFavoritesResult,
    )
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 the tool deletes a playlist and returns a confirmation, which implies a destructive, irreversible action. However, it lacks critical details: whether deletion requires specific permissions, if it affects associated data (e.g., tracks), rate limits, or error conditions (e.g., invalid ID). For a destructive tool, this is a significant gap in transparency.

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 appropriately sized and front-loaded, with the core purpose in the first sentence. The Args and Returns sections are structured clearly, though they could be more integrated. There's no redundant information, but the formatting as separate lines slightly reduces efficiency compared to a single cohesive paragraph.

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 complexity (destructive action, one parameter) and the presence of an output schema (which handles return values), the description is moderately complete. It covers the basic purpose and parameters but lacks behavioral details (e.g., permissions, side effects) and usage guidelines. With no annotations, it should do more to compensate, making it adequate but with clear gaps.

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

Parameters3/5

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

The description adds minimal semantics beyond the input schema. It explains that 'playlist_id' is the 'ID of the playlist to delete', which clarifies the parameter's purpose but doesn't provide format examples (e.g., numeric vs. string), validation rules, or sourcing guidance. With 0% schema description coverage and only one parameter, this meets the baseline for adequate but unenriched documentation.

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 ('Delete') and resource ('a playlist from user's account'), making the purpose immediately understandable. It distinguishes itself from siblings like 'update_playlist' or 'remove_tracks_from_playlist' by specifying complete deletion rather than modification or partial removal. However, it doesn't explicitly contrast with all siblings, keeping it from a perfect score.

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. It doesn't mention prerequisites (e.g., needing an existing playlist), exclusions (e.g., not for system playlists), or comparisons to siblings like 'remove_tracks_from_playlist' for partial deletions. This lack of context leaves the agent to 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