Skip to main content
Glama

player_next

Skip to the next media item in the playlist when controlling the mpv player through AI conversation.

Instructions

Skip to the next item in the playlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for the player_next tool, which skips to the next item in the mpv playlist.
    case "player_next": {
      await ensureMpv();
      const plCount = await getProperty("playlist-count").catch(() => 0);
      const plPos = await getProperty("playlist-pos").catch(() => 0);
      if (plCount <= 1 || plPos >= plCount - 1) {
        return fail("已经是最后一首,没有下一曲");
      }
      await mpv("playlist-next", ["weak"]);
      await setProperty("pause", false);
      const nextTitle = await getProperty("media-title").catch(() => null);
      return ok(`Playing next: ${nextTitle || "unknown"}`);
    }
  • Schema definition for the player_next tool.
      name: "player_next",
      description: "Skip to the next item in the playlist.",
      inputSchema: { type: "object", properties: {} },
    },

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/guodaxia9527/mcp-mpv-player'

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