Skip to main content
Glama

next_video

Skip to the next video in the current playlist to continue watching content without interruption.

Instructions

Skip to the next video in the current playlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler implementation for the 'next_video' tool, which triggers a playlist-next command in mpv and returns the updated video status.
    server.tool(
      'next_video',
      'Skip to the next video in the current playlist.',
      {},
      async () => {
        try {
          await mpv.command(['playlist-next']);
          await new Promise((r) => setTimeout(r, 1000));
          const [title, pos, count] = await Promise.all([
            mpv.getProperty('media-title'),
            mpv.getProperty('playlist-pos'),
            mpv.getProperty('playlist-count'),
          ]);
          return textResult({ status: 'skipped_next', title, position: `${Number(pos) + 1}/${count}` });
        } catch (err) {
          return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`);
        }
      }

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