Skip to main content
Glama

create_playlist

Create a new Spotify playlist with a name, optional description, and public or private visibility settings.

Instructions

Create a new playlist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPlaylist name
descriptionNoPlaylist description (optional)
publicNoWhether the playlist should be public (default: true)

Implementation Reference

  • Handler for create_playlist tool: fetches user data from Spotify API, then creates a new playlist via POST request to /users/{userId}/playlists with name, description, and public visibility parameters, returning the created playlist details.
    case "create_playlist": {
      const userData = await spotifyRequest("/me");
      const playlistData = await spotifyRequest(
        `/users/${userData.id}/playlists`,
        "POST",
        {
          name: args.name,
          description: args.description || "",
          public: args.public !== false,
        }
      );
    
      return {
        content: [
          {
            type: "text",
            text: `📝 Playlist created!\n\nName: ${playlistData.name}\nID: ${playlistData.id}\nURL: ${playlistData.external_urls.spotify}`,
          },
        ],
      };
    }
  • src/index.ts:196-218 (registration)
    Registration of create_playlist tool with MCP server, including the input schema defining three properties: name (required string), description (optional string), and public (optional boolean with default true).
    {
      name: "create_playlist",
      description: "Create a new playlist",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "Playlist name",
          },
          description: {
            type: "string",
            description: "Playlist description (optional)",
          },
          public: {
            type: "boolean",
            description: "Whether the playlist should be public (default: true)",
            default: true,
          },
        },
        required: ["name"],
      },
    },
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. 'Create a new playlist' implies a write operation, but it doesn't disclose any behavioral traits such as permissions required, whether creation is idempotent, rate limits, or what happens on failure. 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 that directly states the tool's purpose without any fluff. It's front-loaded and appropriately sized for a simple creation tool, with every word earning its place. No unnecessary details or redundancy are present.

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 tool's complexity as a mutation operation with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects (e.g., permissions, side effects), usage context, and what to expect upon success or failure. For a tool that creates resources, this leaves critical gaps for an agent to operate effectively.

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 input schema already documents all parameters (name, description, public) with their types, optionality, and default values. The description adds no additional meaning beyond what the schema provides, such as constraints or examples. Baseline score of 3 is appropriate as the schema does the heavy lifting, but the description doesn't compensate or enhance understanding.

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 verb ('Create') and resource ('a new playlist'), making the purpose immediately understandable. It distinguishes from siblings like 'add_to_playlist' or 'search_music' by focusing on playlist creation rather than modification or querying. However, it doesn't explicitly mention what distinguishes it from all siblings, such as 'like_track' or 'set_volume', though the distinction is implicit through the resource type.

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., user authentication), when not to use it (e.g., if a playlist already exists), or direct alternatives among siblings. This leaves the agent to infer usage based on the tool name alone, which is insufficient for optimal selection.

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/MadhurToshniwal/Spotify-MCP-Server'

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