Skip to main content
Glama
jamiew

Spotify MCP Server

modify_playlist_details

Update a Spotify playlist's name, description, or public status by providing its playlist ID.

Instructions

Modify playlist details.

Args:
    playlist_id: Playlist ID
    name: New playlist name (optional)
    description: New playlist description (optional)
    public: Whether playlist should be public (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playlist_idYes
nameNo
descriptionNo
publicNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler function that modifies playlist details. Decorated with @mcp.tool() and @log_tool_execution. Validates at least one field is provided, then calls spotify_client.playlist_change_details.
    @mcp.tool()
    @log_tool_execution
    def modify_playlist_details(
        playlist_id: str,
        name: str | None = None,
        description: str | None = None,
        public: bool | None = None,
    ) -> dict[str, str]:
        """Modify playlist details.
    
        Args:
            playlist_id: Playlist ID
            name: New playlist name (optional)
            description: New playlist description (optional)
            public: Whether playlist should be public (optional)
        """
        try:
            if not name and not description and public is None:
                raise ValueError(
                    "At least one of name, description, or public must be provided"
                )
    
            updates = []
            if name:
                updates.append(f"name='{name}'")
            if description:
                updates.append(f"description='{description}'")
            if public is not None:
                updates.append(f"public={public}")
            logger.info(f"📋 Modifying playlist {playlist_id}: {', '.join(updates)}")
    
            spotify_client.playlist_change_details(
                playlist_id, name=name, description=description, public=public
            )
            return {"status": "success", "message": "Playlist details updated successfully"}
    
        except SpotifyException as e:
            raise convert_spotify_error(e) from e
  • The Client.update_playlist_details helper method that wraps the low-level Spotipy call to playlist_change_details with logging and error handling.
    def update_playlist_details(
        self,
        playlist_id: str,
        name: str | None = None,
        description: str | None = None,
        public: bool | None = None,
    ) -> None:
        """Update a playlist's details"""
        try:
            self.logger.info(
                f"Updating playlist {playlist_id} with name: {name}, description: {description}, public: {public}"
            )
            self.sp.playlist_change_details(
                playlist_id, name=name, description=description, public=public
            )
            self.logger.info(
                f"Successfully updated playlist details for ID: {playlist_id}"
            )
        except Exception as e:
            self.logger.error(f"Error updating playlist: {str(e)}", exc_info=True)
            raise
  • Tool registration via the @mcp.tool() decorator, which registers 'modify_playlist_details' with the FastMCP server.
    @mcp.tool()
Behavior2/5

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

No annotations exist, so the description must disclose behavioral traits. It lacks details on idempotency, authorization requirements, side effects (e.g., changing public visibility), or whether missing fields are unchanged or reset. The minimal text adds little beyond the parameter list.

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 short and front-loaded with the purpose. The parameter list is structured but somewhat redundant with the schema. Still, it is efficiently written without wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks context about return values, success/error handling, and prerequisites. Although an output schema exists, the description does not reference it or explain what the tool returns. For a modification tool with no annotations, this is insufficient.

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?

Schema description coverage is 0%, so the description's parameter list adds value by clarifying 'Playlist ID' and marking optional parameters like 'New playlist name'. However, it is still terse and does not explain constraints, formats, or edge cases beyond basic semantics.

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 tool name and description clearly indicate it modifies playlist metadata (name, description, public status). It is distinct from sibling tools like create_playlist or add_tracks_to_playlist, though the description could be more specific about the scope (e.g., only metadata, not tracks).

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?

No guidance is provided on when to use this tool over alternatives. The description simply states what it does without mentioning prerequisites, exclusions, or comparisons to siblings like create_playlist.

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/jamiew/spotify-mcp'

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