Skip to main content
Glama
jamiew

Spotify MCP Server

modify_playlist_details

Update playlist name, description, or visibility settings in Spotify. Change details for any playlist using its 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 handler function decorated with @mcp.tool(), implementing the logic to modify Spotify playlist details (name, description, public status) using the Spotify API. The @mcp.tool() decorator also serves as the registration.
    @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
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a modification tool, implying mutation, but doesn't describe what permissions are required, whether changes are reversible, rate limits, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 with a clear purpose statement followed by a structured parameter list. Every sentence serves a purpose - the first states the tool's function, and the parameter explanations provide necessary context without redundancy.

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 this is a mutation tool with no annotations but with an output schema (which handles return values), the description provides adequate basic information about what the tool does and its parameters. However, for a tool that modifies data, more context about permissions, side effects, or constraints would be beneficial for completeness.

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 provides a parameter list with brief explanations for each parameter, adding meaningful context beyond the schema which has 0% description coverage. It clarifies that 'playlist_id' is required while 'name', 'description', and 'public' are optional, which compensates 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.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Modify playlist details' which is a clear verb+resource combination, but it's quite generic and doesn't differentiate from sibling tools like 'create_playlist' or 'remove_tracks_from_playlist' beyond the basic action. It specifies what gets modified but not how this differs from other playlist operations.

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 about when to use this tool versus alternatives like 'create_playlist' or 'remove_tracks_from_playlist'. The description doesn't mention prerequisites, permissions needed, or contextual constraints for using this modification tool.

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