Skip to main content
Glama
keenanbb

TIDAL MCP Server

by keenanbb

update_playlist

Modify a TIDAL playlist's name or description to keep your music collections organized and current.

Instructions

Update a playlist's name and/or description.

Args: playlist_id: ID of the playlist to update name: New name for the playlist (optional) description: New description (optional)

Returns: Updated playlist details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playlist_idYes
nameNo
descriptionNo

Output Schema

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

Implementation Reference

  • The main execution logic for the 'update_playlist' tool. Fetches the playlist using tidalapi.session.playlist, edits name/description via playlist.edit, refreshes the object, and returns structured UpdatePlaylistResult.
    @mcp.tool()
    async def update_playlist(
        playlist_id: str, name: Optional[str] = None, description: Optional[str] = None
    ) -> UpdatePlaylistResult:
        """
        Update a playlist's name and/or description.
    
        Args:
            playlist_id: ID of the playlist to update
            name: New name for the playlist (optional)
            description: New description (optional)
    
        Returns:
            Updated playlist details
        """
        if not await ensure_authenticated():
            raise ToolError("Not authenticated. Please run the 'login' tool first.")
    
        if not name and description is None:
            raise ToolError("Must provide at least name or description to update")
    
        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")
    
            # Update the playlist
            if name:
                await anyio.to_thread.run_sync(playlist.edit, name, description)
            elif description is not None:
                await anyio.to_thread.run_sync(playlist.edit, playlist.name, description)
    
            # Fetch updated playlist
            updated_playlist = await anyio.to_thread.run_sync(session.playlist, playlist_id)
    
            return UpdatePlaylistResult(
                status="success",
                playlist=Playlist(
                    id=str(updated_playlist.id),
                    name=updated_playlist.name,
                    description=updated_playlist.description or "",
                    track_count=getattr(updated_playlist, "num_tracks", 0),
                    creator=None,
                    url=f"https://tidal.com/browse/playlist/{playlist_id}",
                ),
                message=f"Updated playlist '{updated_playlist.name}'",
            )
        except ToolError:
            raise
        except Exception as e:
            raise ToolError(f"Failed to update playlist: {str(e)}")
  • Pydantic output schema model used by the update_playlist handler for structured responses.
    class UpdatePlaylistResult(BaseModel):
        """Result of updating a playlist."""
    
        status: str = Field(description="Operation status (success/error)")
        playlist: Optional[Playlist] = Field(None, description="Updated playlist details")
        message: str = Field(description="Status message")
  • FastMCP @mcp.tool() decorator registers the update_playlist function as an MCP tool.
    @mcp.tool()
  • Shared Pydantic model for playlist entities, embedded in UpdatePlaylistResult.
    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")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool updates a playlist, implying mutation, but doesn't cover critical aspects like required permissions, whether changes are reversible, error conditions (e.g., invalid playlist_id), or rate limits. This leaves significant gaps for a mutation tool.

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 stated first followed by structured sections for args and returns. Every sentence adds value, though the 'Returns' section is somewhat redundant given the presence of an output schema, slightly reducing efficiency.

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 moderate complexity (3 parameters, mutation operation) and the presence of an output schema (which handles return values), the description is partially complete. It covers the basic action and parameters but lacks behavioral details like permissions or error handling, which are important for a mutation tool with no annotations.

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 adds meaningful context beyond the input schema, which has 0% description coverage. It explains that 'playlist_id' identifies the playlist to update, 'name' is the new name (optional), and 'description' is the new description (optional). This clarifies the purpose and optionality of each parameter, compensating well 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.

Purpose4/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: 'Update a playlist's name and/or description.' It specifies the verb ('update') and resource ('playlist'), making the action unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'create_playlist' or 'delete_playlist' beyond the update action, which prevents 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, or comparisons to siblings like 'create_playlist' or 'delete_playlist'. Usage is implied by the action but not explicitly stated.

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