Skip to main content
Glama

prev_video

Navigate to the previous video in your current playlist while using the social-video-mcp server for YouTube and TikTok playback control.

Instructions

Go back to the previous video in the current playlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the 'prev_video' MCP tool, which executes 'playlist-prev' via the mpv command and returns the new video's status, title, and position.
    server.tool(
      'prev_video',
      'Go back to the previous video in the current playlist.',
      {},
      async () => {
        try {
          await mpv.command(['playlist-prev']);
          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_prev', 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