Skip to main content
Glama

player_status

Retrieve current playback details from the mpv media player, including file name, position, duration, volume, speed, and pause state.

Instructions

Get current playback status: file name, position, duration, volume, speed, pause state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for player_status tool that retrieves and formats current playback information from mpv.
    case "player_status": {
      const running = await isMpvRunning();
      if (!running) return info("mpv is not running.");
    
      const [filename, pos, dur, paused, vol, speed, plPos, plCount] =
        await Promise.all([
          getProperty("media-title").catch(() => null),
          getProperty("time-pos").catch(() => null),
          getProperty("duration").catch(() => null),
          getProperty("pause").catch(() => null),
          getProperty("volume").catch(() => null),
          getProperty("speed").catch(() => null),
          getProperty("playlist-pos").catch(() => null),
          getProperty("playlist-count").catch(() => null),
        ]);
    
      const lines = [
        `🎵 **Now playing:** ${filename || "N/A"}`,
        `⏱  **Position:** ${formatTime(pos)} / ${formatTime(dur)}`,
        `${paused ? "⏸" : "▶️"}  **State:** ${paused ? "Paused" : "Playing"}`,
        `🔊 **Volume:** ${vol != null ? Math.round(vol) : "N/A"}`,
        `⚡ **Speed:** ${speed != null ? speed + "x" : "N/A"}`,
        `📋 **Playlist:** ${plPos != null ? plPos + 1 : "N/A"} / ${plCount ?? "N/A"}`,
      ];
      return info(lines.join("\n"));
    }
  • index.js:408-413 (registration)
    Tool registration for player_status.
    {
      name: "player_status",
      description:
        "Get current playback status: file name, position, duration, volume, speed, pause state.",
      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