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.
Input Schema
TableJSON 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)}`); } }