next_video
Skip to the next video in the current playlist to continue watching content without interruption.
Instructions
Skip to the next video in the current playlist.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "next_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:110-127 (handler)The handler implementation for the 'next_video' tool, which triggers a playlist-next command in mpv and returns the updated video status.
server.tool( 'next_video', 'Skip to the next video in the current playlist.', {}, async () => { try { await mpv.command(['playlist-next']); await new Promise((r) => setTimeout(r, 1000)); const [title, pos, count] = await Promise.all([ mpv.getProperty('media-title'), mpv.getProperty('playlist-pos'), mpv.getProperty('playlist-count'), ]); return textResult({ status: 'skipped_next', title, position: `${Number(pos) + 1}/${count}` }); } catch (err) { return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`); } }