Skip to main content
Glama

player_prev

Go back to the previous track or video in the mpv media player playlist using natural language commands.

Instructions

Go back to the previous item in the playlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.js:357-361 (registration)
    Tool registration definition for player_prev in the TOOLS array. No input parameters required.
    {
      name: "player_prev",
      description: "Go back to the previous item in the playlist.",
      inputSchema: { type: "object", properties: {} },
    },
  • Handler for player_prev: ensures mpv is running, checks if playlist position > 0 (otherwise returns error 'already first song'), sends playlist-prev command with 'weak' flag, ensures playback is not paused, and returns the previous track title.
    case "player_prev": {
      await ensureMpv();
      const plPosPrev = await getProperty("playlist-pos").catch(() => 0);
      if (plPosPrev <= 0) {
        return fail("已经是第一首,没有上一曲");
      }
      await mpv("playlist-prev", ["weak"]);
      await setProperty("pause", false);
      const prevTitle = await getProperty("media-title").catch(() => null);
      return ok(`Playing previous: ${prevTitle || "unknown"}`);
    }
Behavior2/5

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

No annotations are provided. The description only states the action without revealing side effects or behavior at boundaries (e.g., whether it loops, stops, or errors when already at the first item).

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 that is efficient and front-loaded with the key action. No wasted words.

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

Completeness3/5

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

Given the simplicity of the tool (no parameters, no output schema), the description is minimally adequate but lacks important behavioral context at playlist boundaries. An explanation of what happens when already at the first item would improve completeness.

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

Parameters4/5

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

The tool has 0 parameters, and the description does not need to add parameter details. The baseline score applies as the description still clarifies the purpose.

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 'Go back to the previous item in the playlist' uses a specific verb and resource, clearly indicating the action and target. It differentiates from sibling tool 'player_next' by specifying 'previous'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives (e.g., player_seek for specific positions). It does not mention edge cases like being at the beginning of the playlist.

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