Skip to main content
Glama

queue_video

Add YouTube or TikTok videos to your playback queue without interrupting current playback. If nothing is playing, starts video playback immediately.

Instructions

Add a video to the end of the current playback queue without interrupting what is playing. If nothing is playing, starts playback.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesYouTube or TikTok video URL to add to queue

Implementation Reference

  • The registration and implementation handler for the 'queue_video' MCP tool.
    server.tool(
      'queue_video',
      'Add a video to the end of the current playback queue without interrupting what is playing. If nothing is playing, starts playback.',
      {
        url: z.string().url().describe('YouTube or TikTok video URL to add to queue'),
      },
      async ({ url }) => {
        const urlErr = validateVideoUrl(url);
        if (urlErr) return errorResult(urlErr);
        const depErr = checkDeps();
        if (depErr) return errorResult(depErr);
    
        if (!mpv.isPlaying()) {
          try {
            await mpv.launch({ url });
          } catch {
            return errorResult('mpv failed to start.');
          }
          let title = url;
          try { title = (await mpv.getProperty('media-title')) as string || url; } catch { /* loading */ }
          return textResult({ status: 'playing', title, url });
        }
    
        try {
          await mpv.appendUrl(url);
          const count = await mpv.getProperty('playlist-count');
          return textResult({ status: 'queued', url, queuePosition: count });
        } catch (err) {
          return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`);
        }
      }
    );
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses key behavioral traits: queue position ('end'), non-interruption of current playback, and edge-case handling (starts playback if queue empty). Minor gap: does not mention error handling for invalid URLs or return value semantics.

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 sentences with zero waste. First sentence front-loads the core action and key differentiator (non-interruption). Second sentence efficiently covers the empty-queue edge case. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (single parameter, no output schema, no nested objects), the description is complete. It covers the primary action, queue positioning, interaction with current playback state, and the fallback behavior when the queue is empty.

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 100% with the URL parameter fully documented as 'YouTube or TikTok video URL to add to queue'. Since the schema comprehensively describes the parameter, baseline 3 is appropriate; the description does not need to duplicate this information.

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?

Specific verb 'Add' with clear resource 'playback queue' and scope 'end of the current playback queue'. The phrase 'without interrupting what is playing' effectively distinguishes this from sibling tools like play_video, play_audio, and play_playlist which likely start immediate playback.

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

Usage Guidelines4/5

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

Provides clear context for when to use this tool via 'without interrupting what is playing', implying the contrast with immediate-play alternatives. Also clarifies the fallback behavior 'If nothing is playing, starts playback'. Does not explicitly name sibling alternatives (e.g., 'use play_video to start immediately'), preventing a 5.

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