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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:589-614 (handler)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: {} }, },