player_seek
Navigate media playback by seeking forward, backward, or to specific timestamps within the current video or audio file using the mcp-mpv-player server.
Instructions
Seek within the current media.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Seconds to seek (positive = forward, negative = backward) when mode=relative. Absolute second when mode=absolute. 0-100 when mode=percent. | |
| mode | No | Seek mode | relative |
Implementation Reference
- index.js:569-575 (handler)The handler function for the 'player_seek' tool, which interfaces with an MPV player to perform seek operations based on the provided value and mode.
case "player_seek": { await ensureMpv(); const mode = args.mode || "relative"; await mpv("seek", [args.value, mode]); const pos = await getProperty("time-pos"); return ok(`Seeked → ${formatTime(pos)}`); } - index.js:362-382 (schema)The schema definition for the 'player_seek' tool, specifying its arguments (value, mode) and their constraints.
{ name: "player_seek", description: "Seek within the current media.", inputSchema: { type: "object", properties: { value: { type: "number", description: "Seconds to seek (positive = forward, negative = backward) when mode=relative. Absolute second when mode=absolute. 0-100 when mode=percent.", }, mode: { type: "string", enum: ["relative", "absolute", "percent"], default: "relative", description: "Seek mode", }, }, required: ["value"], }, },