Skip to main content
Glama
superseoworld

MCP Spotify Server

modify_playlist

Update Spotify playlist details including name, visibility, collaboration settings, and description using the playlist ID.

Instructions

Change a playlist's name and public/private state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe Spotify ID or URI of the playlist
nameNoOptional. New name for the playlist
publicNoOptional. If true the playlist will be public
collaborativeNoOptional. If true, the playlist will become collaborative
descriptionNoOptional. New description for the playlist

Implementation Reference

  • The core handler function that modifies a playlist's name, public status, collaborative status, or description by sending a PUT request to the Spotify API /playlists/{id} endpoint.
    async modifyPlaylist(args: ModifyPlaylistArgs) {
      const playlistId = this.extractPlaylistId(args.id);
      const { name, public: isPublic, collaborative, description } = args;
    
      const data = {
        ...(name !== undefined && { name }),
        ...(isPublic !== undefined && { public: isPublic }),
        ...(collaborative !== undefined && { collaborative }),
        ...(description !== undefined && { description })
      };
    
      return this.api.makeRequest(
        `/playlists/${playlistId}`,
        'PUT',
        data
      );
    }
  • TypeScript interface defining the input arguments for the modify_playlist tool, including required playlist ID and optional fields for modification.
    export interface ModifyPlaylistArgs {
      id: string;
      name?: string;
      public?: boolean;
      collaborative?: boolean;
      description?: string;
    }
  • src/index.ts:527-556 (registration)
    MCP tool registration in the ListTools response, defining the name, description, and input schema for the modify_playlist tool.
    {
      name: 'modify_playlist',
      description: 'Change a playlist\'s name and public/private state',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'The Spotify ID or URI of the playlist'
          },
          name: {
            type: 'string',
            description: 'Optional. New name for the playlist'
          },
          public: {
            type: 'boolean',
            description: 'Optional. If true the playlist will be public'
          },
          collaborative: {
            type: 'boolean',
            description: 'Optional. If true, the playlist will become collaborative'
          },
          description: {
            type: 'string',
            description: 'Optional. New description for the playlist'
          }
        },
        required: ['id']
      },
    },
  • src/index.ts:853-859 (registration)
    Dispatch handler in the CallToolRequest that validates arguments and calls the playlistsHandler.modifyPlaylist method.
    case 'modify_playlist': {
      const args = this.validateArgs<ModifyPlaylistArgs>(request.params.arguments, ['id']);
      const result = await this.playlistsHandler.modifyPlaylist(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
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. It states 'Change a playlist's name and public/private state,' implying a mutation operation, but does not disclose behavioral traits such as required permissions, rate limits, idempotency, or error conditions. For a mutation tool with zero annotation coverage, 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is front-loaded with the core action and resource, making it easy to scan. Every word earns its place, and there is no redundant or verbose language.

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?

Given the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., auth needs, side effects), does not cover all parameters, and provides no information on return values or errors. For a 5-parameter tool that modifies data, this is inadequate.

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 100%, so the schema fully documents all 5 parameters. The description adds minimal value by mentioning 'name and public/private state,' which maps to two parameters, but omits 'collaborative' and 'description.' It does not provide additional meaning beyond the schema, such as format examples or constraints, so it meets the baseline of 3.

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 ('Change') and resource ('playlist'), specifying what fields can be modified ('name and public/private state'). It distinguishes from siblings like 'add_tracks_to_playlist' or 'remove_tracks_from_playlist' by focusing on metadata updates rather than content changes. However, it omits 'collaborative' and 'description' fields mentioned in the schema, making it slightly incomplete.

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 does not mention prerequisites (e.g., authentication), exclusions (e.g., cannot change ownership), or compare to siblings like 'get_playlist' for viewing or 'add_tracks_to_playlist' for content modifications. Usage is implied only by the verb 'Change,' with no explicit context.

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

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