Skip to main content
Glama

player_prev

Navigate to the previous track or video in your media playlist using this MCP server tool for mpv player control.

Instructions

Go back to the previous item in the playlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for 'player_prev' which invokes the MPV command to go to the previous playlist item.
    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"}`);
    }
  • index.js:357-361 (registration)
    The registration of the 'player_prev' tool within the tool definitions list.
    {
      name: "player_prev",
      description: "Go back to the previous 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