Skip to main content
Glama

player_shuffle

Shuffles the current playlist and starts playback from the first track.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Schema definition for the player_shuffle tool: no input parameters required, description explains it shuffles the current playlist and starts playing from the first track.
    {
      name: "player_shuffle",
      description: "Randomly shuffle the current playlist and start playing from the first track.",
      inputSchema: { type: "object", properties: {} },
    },
  • Handler implementation for player_shuffle. Ensures mpv is running, checks that the playlist has at least 2 tracks, runs 'playlist-shuffle' mpv command, starts playback from index 0, unpauses, and returns confirmation with the track count and current title.
    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:724-729 (registration)
    Tools are registered via ListToolsRequestSchema handler returning the TOOLS array, and invoked via CallToolRequestSchema which dispatches to handleTool with the tool name and args.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
    
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      return handleTool(name, args || {});
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description is the sole source of behavioral info. It states the main action but does not disclose edge cases (e.g., behavior on empty playlist, effect on current playback state). Basic but adequate for a simple operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of 11 words, conveying all necessary information without redundancy. Highly concise and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no output schema, the description covers the essential action. It could mention prerequisites (e.g., a playlist must be active) but is otherwise sufficient for a simple function.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, and schema coverage is 100% trivially. The description adds no parameter info, which is appropriate. Baseline score 3 is used as per rubric for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action: shuffle the current playlist and start playing from the first track. It uses specific verbs and resources, and distinguishes itself from siblings like player_play and player_next.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use vs. alternatives. While the purpose is clear, there is no mention of prerequisites (e.g., a playlist must be loaded) or exclusions (e.g., not to be used if user wants to shuffle without playing).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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