Skip to main content
Glama

create_playlist

Create a playlist on your YouTube channel. Customize with 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

  • Registration function registerPlaylistTools that registers the 'create_playlist' tool with the MCP server, including the async handler that calls client.createPlaylist() and returns a success message.
    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})`,
              },
            ],
          };
        },
      );
  • The YouTubeClient.createPlaylist() method that makes the actual POST request to the YouTube Data API v3 /playlists endpoint with snippet and status data.
    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 },
        },
      );
    }
  • Zod schema for create_playlist tool input validation: title (required string), description (optional string), privacy_status (enum with default 'private').
    const createPlaylistSchema = {
      title: z.string().min(1),
      description: z.string().optional(),
      privacy_status: z.enum(["public", "unlisted", "private"]).default("private"),
    };
  • src/server.ts:45-55 (registration)
    Server setup calls registerPlaylistTools(s, youtube) at line 48 to wire the tool into the MCP server.
    const buildServer = () => {
      const s = new McpServer({ name: "youtube-mcp", version: "0.1.0" });
      registerVideoTools(s, youtube);
      registerPlaylistTools(s, youtube);
      registerCommentTools(s, youtube);
      registerAnalyticsTool(s, youtube);
      registerCaptionTools(s, youtube);
      registerShortsTools(s, youtube);
      registerBridgeTools(s, youtube, comfyui, config.comfyUIDefaultCkpt);
      return s;
    };
Behavior2/5

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

No annotations provided, so description carries full burden. Only mentions default privacy but omits other behaviors like authentication, side effects, or error handling.

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?

Two concise sentences with front-loaded purpose. No redundant info, though could include more detail without bloating.

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?

Covers main purpose and key default, but lacks details about return value or success response. Adequate for a simple creation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0% coverage; description hints at privacy_status via default but does not explain title or description parameters. Inadequate for a 3-param tool.

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?

The description clearly states the verb 'create', resource 'playlist', and context 'on authenticated channel'. It also notes the default privacy setting, distinguishing it from siblings like add_to_playlist.

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 (e.g., adding to existing playlist). Lacks when-not or scenario exclusions.

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