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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:616-625 (handler)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"}`); } - index.js:414-418 (schema)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: {} }, },