Skip to main content
Glama

player_shuffle

Shuffle the current playlist and begin playback from the first track to randomize your listening or viewing order.

Instructions

Randomly shuffle the current playlist and start playing from the first track.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for "player_shuffle" which shuffles the mpv playlist and resets to the first track.
    case "player_shuffle": {
      await ensureMpv();
      const count = await getProperty("playlist-count").catch(() => 0);
      if (!count || count < 2) return fail("Need at least 2 tracks in the playlist to shuffle");
      await mpv("playlist-shuffle");
      await mpv("playlist-play-index", [0]);
      await setProperty("pause", false);
      const title = await getProperty("media-title").catch(() => null);
      return ok(`Playlist shuffled (${count} tracks). Now playing: ${title || "unknown"}`);
    }
  • The definition of the "player_shuffle" tool, including its schema and description.
    {
      name: "player_shuffle",
      description: "Randomly shuffle the current playlist and start playing from the first track.",
      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