get_status
Check current video playback status including title, position, duration, and pause state for YouTube or TikTok videos playing in the mpv player.
Instructions
Get the current playback status: title, position, duration, and pause state.
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": "get_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:150-171 (handler)The 'get_status' tool is registered and implemented directly in src/index.ts. It fetches media-title, time-pos, duration, and pause state from mpv and returns them formatted.
server.tool( 'get_status', 'Get the current playback status: title, position, duration, and pause state.', {}, async () => { try { const [title, position, duration, paused] = await Promise.all([ mpv.getProperty('media-title'), mpv.getProperty('time-pos'), mpv.getProperty('duration'), mpv.getProperty('pause'), ]); return textResult({ title, position: typeof position === 'number' ? `${Math.floor(position)}s` : null, duration: typeof duration === 'number' ? `${Math.floor(duration)}s` : null, paused, }); } catch (err) { return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`); } }