Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)}`);
        }
      }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ronantakizawa/social-video-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server