Skip to main content
Glama

play_playlist

Play YouTube playlists or channel uploads in mpv. Supports shuffle functionality for varied playback order.

Instructions

Play an entire YouTube playlist in mpv. Supports playlist URLs and channel upload pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesYouTube playlist or channel URL
shuffleNoShuffle the playlist

Implementation Reference

  • The definition and handler for the 'play_playlist' tool, which uses `mpv.launch` to play the requested URL.
    server.tool(
      'play_playlist',
      'Play an entire YouTube playlist in mpv. Supports playlist URLs and channel upload pages.',
      {
        url: z.string().url().describe('YouTube playlist or channel URL'),
        shuffle: z.boolean().default(false).describe('Shuffle the playlist'),
      },
      async ({ url, shuffle }) => {
        const urlErr = validateYouTubeUrl(url);
        if (urlErr) return errorResult(urlErr);
        const depErr = checkDeps();
        if (depErr) return errorResult(depErr);
    
        try {
          await mpv.launch({ url, shuffle, socketTimeoutMs: 15_000 });
        } catch {
          return errorResult('mpv failed to start. Run `mpv <url>` manually to see the error.');
        }
    
        let title = url;
        let tracks: unknown = null;
        try {
          title = (await mpv.getProperty('media-title')) as string || url;
          tracks = await mpv.getProperty('playlist-count');
        } catch { /* loading */ }
    
        return textResult({ status: 'playing_playlist', title, url, tracks, shuffle });
      }
    );
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. While it identifies mpv as the player, it fails to disclose critical behavioral traits: whether this replaces current playback, appends to a queue, blocks until completion, or requires mpv to be pre-running. For a media control tool, these omissions are significant.

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 consists of two efficient, front-loaded sentences with zero redundancy. The first states the core action and target, while the second clarifies valid input types. Every word earns its place.

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?

Given the absence of annotations and output schema, the description is minimally adequate but incomplete. It omits important context for a playback tool: interaction with current media state, error conditions (invalid URLs), and whether this operation is destructive to the current queue. It meets basic needs but leaves operational ambiguity.

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?

With 100% schema description coverage, the baseline is appropriately met. The description adds minimal semantic value beyond the schema, essentially restating that playlist URLs and channel pages are valid inputs, which the schema already documents. No additional context about parameter formats or constraints is provided.

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 ('Play') and resource ('entire YouTube playlist'), and specifies the player ('mpv'). It distinguishes from sibling tools like play_video and play_audio by emphasizing 'entire playlist' and mentioning support for 'channel upload pages', though it could more explicitly contrast with single-video playback tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying valid inputs ('playlist URLs and channel upload pages'), suggesting when to use this tool versus play_video. However, it lacks explicit guidance on when NOT to use it (e.g., for single videos) and doesn't mention the sibling queue_video or how this interacts with existing playback.

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/ronantakizawa/social-video-mcp'

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