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