Skip to main content
Glama

create_playlist

Create a new playlist on your YouTube channel with customizable title, description, and privacy status (public, unlisted, or private).

Instructions

Create a new playlist on the authenticated channel. Default privacy is 'private'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
descriptionNo
privacy_statusNoprivate

Implementation Reference

  • YouTubeClient.createPlaylist - makes the actual YouTube API POST /playlists call with snippet and status
    createPlaylist(input: {
      title: string;
      description?: string;
      privacyStatus: "public" | "unlisted" | "private";
    }): Promise<Playlist> {
      return this.dataPost<Playlist>(
        "/playlists",
        { part: "snippet,status" },
        {
          snippet: { title: input.title, description: input.description ?? "" },
          status: { privacyStatus: input.privacyStatus },
        },
      );
    }
  • MCP tool handler for create_playlist - receives args, calls client.createPlaylist, returns formatted response
    server.tool(
      "create_playlist",
      "Create a new playlist on the authenticated channel. Default privacy is 'private'.",
      createPlaylistSchema,
      async (args) => {
        const playlist = await client.createPlaylist({
          title: args.title,
          description: args.description,
          privacyStatus: args.privacy_status,
        });
        return {
          content: [
            {
              type: "text" as const,
              text: `Created ${args.privacy_status} playlist: ${playlist.snippet?.title ?? args.title} (${playlist.id})`,
            },
          ],
        };
      },
    );
  • Zod schema defining create_playlist input params: title (required), description (optional), privacy_status (enum, defaults to private)
    const createPlaylistSchema = {
      title: z.string().min(1),
      description: z.string().optional(),
      privacy_status: z.enum(["public", "unlisted", "private"]).default("private"),
    };
  • Registration function that calls server.tool() to register create_playlist and add_to_playlist with the MCP server
    export function registerPlaylistTools(server: McpServer, client: YouTubeClient): void {
      server.tool(
        "create_playlist",
        "Create a new playlist on the authenticated channel. Default privacy is 'private'.",
        createPlaylistSchema,
        async (args) => {
          const playlist = await client.createPlaylist({
            title: args.title,
            description: args.description,
            privacyStatus: args.privacy_status,
          });
          return {
            content: [
              {
                type: "text" as const,
                text: `Created ${args.privacy_status} playlist: ${playlist.snippet?.title ?? args.title} (${playlist.id})`,
              },
            ],
          };
        },
      );
    
      server.tool(
        "add_to_playlist",
        "Add a video to an existing playlist. Both playlist_id and video_id are YouTube IDs (not URLs).",
        addToPlaylistSchema,
        async (args) => {
          await client.addToPlaylist({
            playlistId: args.playlist_id,
            videoId: args.video_id,
          });
          return {
            content: [
              {
                type: "text" as const,
                text: `Added video ${args.video_id} to playlist ${args.playlist_id}`,
              },
            ],
          };
        },
      );
    }
  • src/server.ts:48-48 (registration)
    Registration call site in server.ts that wires up the playlist tools to the MCP server instance
    registerPlaylistTools(s, youtube);
Behavior3/5

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

With no annotations, the description must disclose behavioral traits. It states the operation is a mutation ('Create'), which is clear, and mentions the default privacy setting. However, it omits any side effects, required permissions, or rate limits, which are important for a creation tool.

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?

Two short, front-loaded sentences with no redundancy. Every word earns its place, effectively conveying the essential purpose and a key parameter default.

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?

For a simple creation tool with no output schema, the description is adequate but incomplete. It does not describe what the tool returns (e.g., playlist ID), possible errors, or confirmation of success. Given the low complexity, this is a minimal viable description.

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 coverage is 0%, so description must compensate. It adds meaning for 'privacy_status' by stating the default value 'private', but nothing for 'title' or 'description' beyond their schema definitions. This provides marginal added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

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

Description clearly states it creates a new playlist on the authenticated channel, using a specific verb and resource. It distinguishes from siblings like 'add_to_playlist' and mentions default privacy, making the purpose unambiguous.

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 on when to use this tool versus alternatives like 'add_to_playlist' or other creation/modification tools. The description implicitly conveys usage for playlist creation but lacks explicit when-to or when-not-to 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/miller-joe/youtube-mcp'

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