Skip to main content
Glama

list_youtube_playlists

Retrieve all YouTube playlists linked to a connected account by providing the account ID.

Instructions

List YouTube playlists for a connected YouTube account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
socialMediaIdYesYouTube account ID (from list_accounts)

Implementation Reference

  • The handler function for the 'list_youtube_playlists' tool. It takes a socialMediaId (UUID), calls the API endpoint to fetch YouTube playlists, and returns the JSON result.
    async (input) => {
      const data = await client.get<YouTubePlaylist[]>(
        `/social-media/${input.socialMediaId}/youtube-playlists`,
      );
    
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • Input schema for the 'list_youtube_playlists' tool: requires socialMediaId (UUID string) describing the YouTube account ID from list_accounts.
    {
      socialMediaId: z
        .string()
        .uuid()
        .describe('YouTube account ID (from list_accounts)'),
    },
  • Registration of the 'list_youtube_playlists' tool using server.tool() with its name, description 'List YouTube playlists for a connected YouTube account', input schema, and handler.
    server.tool(
      'list_youtube_playlists',
      'List YouTube playlists for a connected YouTube account',
      {
        socialMediaId: z
          .string()
          .uuid()
          .describe('YouTube account ID (from list_accounts)'),
      },
      async (input) => {
        const data = await client.get<YouTubePlaylist[]>(
          `/social-media/${input.socialMediaId}/youtube-playlists`,
        );
    
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • src/index.ts:17-19 (registration)
    Registration call: registerAccountTools(server, client) which sets up this tool along with other account tools on the MCP server.
    registerPostTools(server, client);
    registerAccountTools(server, client);
    registerFileTools(server, client);
  • The YouTubePlaylist type definition used as the return type for the playlists API call, containing id, playlistId, title, description, and thumbnailUrl fields.
    export interface YouTubePlaylist {
      id: string;
      playlistId: string;
      title: string;
      description: string | null;
      thumbnailUrl: string | null;
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose any behavioral traits (e.g., authentication requirements, rate limits, whether it returns all playlists or paginated). It only states the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is one short sentence, which is concise but lacks substantive detail. It is not overly verbose, but it could be more informative without sacrificing brevity.

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 simplicity (one parameter, no output schema), the description is incomplete. It does not specify what the output contains (e.g., list of playlist objects) or any constraints like 'all playlists for the account'. Important context is missing.

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?

The input schema covers the sole parameter (socialMediaId) with 100% description coverage (referencing list_accounts). The tool description adds no additional meaning beyond the schema, 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.

Purpose5/5

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

The description clearly states the action (List), resource (YouTube playlists), and context (for a connected YouTube account). It distinguishes itself from sibling tools like create_posts or delete_post by specifying 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. There is no mention of prerequisites, conditions, or comparisons to other list tools like list_accounts or list_posts.

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/peturgeorgievv-factory/postfast-mcp'

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