Skip to main content
Glama

get_playhead_info

Retrieve the current playhead position and playback state in Adobe Premiere Pro for automation, workflow integration, or remote control.

Instructions

Get current playhead position and playback state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic by fetching playhead data from the local HTTP API at localhost:3001/api/playhead and formatting a response with sequence name, timecode, frame, progress, status, and speed.
    async getPlayheadInfo() { try { const response = await fetch('http://localhost:3001/api/playhead'); if (!response.ok) throw new Error(`HTTP ${response.status}: ${response.statusText}`); const data = await response.json(); if (data.error) { return { content: [ { type: 'text', text: `⚠️ ${data.error}`, }, ], }; } return { content: [ { type: 'text', text: `⏱️ **Playhead Info**\n\n**Sequence:** ${data.sequence_name}\n**Timecode:** ${data.timecode}\n**Frame:** ${data.frame_number}\n**Progress:** ${data.percentage_complete}%\n**Status:** ${data.is_playing ? '▶️ Playing' : '⏸️ Paused'}\n**Speed:** ${data.playback_speed}x`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `❌ **Failed to get playhead info**\n\nError: ${error.message}`, }, ], isError: true, }; } }
  • mcp-server.js:246-247 (registration)
    The switch case in the CallToolRequestSchema handler that dispatches calls to the getPlayheadInfo method.
    case 'get_playhead_info': return await this.getPlayheadInfo();
  • The tool registration entry in the ListToolsRequestSchema response, including name, description, and empty input schema.
    { name: "get_playhead_info", description: "Get current playhead position and playback state", inputSchema: { type: "object", properties: {}, required: [] } },
  • mcp-server.js:31-214 (registration)
    The ListToolsRequestHandler that registers all available tools including get_playhead_info by returning the tools array.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { const tools = [ { name: "get_project_info", description: "Get basic information about the current Premiere Pro project", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_active_sequence_info", description: "Get detailed information about the currently active sequence", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "list_all_sequences", description: "List all sequences in the current project with basic info", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_sequence_details", description: "Get detailed information about a specific sequence including tracks, effects, and markers", inputSchema: { type: "object", properties: { sequence_name: { type: "string", description: "Name of the sequence to get details for" } }, required: ["sequence_name"] } }, { name: "get_timeline_structure", description: "Get the track structure of the active sequence", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_timeline_clips", description: "Get all clips in the active sequence with detailed information", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_project_media", description: "Get all media items in the project browser with file information", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_project_bins", description: "Get project bin structure and organization", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_playhead_info", description: "Get current playhead position and playback state", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_selection_info", description: "Get information about currently selected clips or time range", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_export_presets", description: "Get available export presets and their settings", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "get_render_queue", description: "Get current render queue status and items", inputSchema: { type: "object", properties: {}, required: [] } }, { name: "trim_clip_by_frames", description: "Trim or extend the in/out point of a video or audio clip by a number of frames.", inputSchema: { type: "object", properties: { sequenceId: { type: "number", description: "Index of the sequence (0-based)" }, clipId: { type: "string", description: "ID of the clip to trim" }, framesDelta: { type: "number", description: "Number of frames to trim (positive or negative)" }, direction: { type: "string", enum: ["in", "out"], description: "Which edit point to trim ('in' or 'out')" }, trackType: { type: "string", enum: ["video", "audio"], description: "Track type ('video' or 'audio')" } }, required: ["sequenceId", "clipId", "framesDelta", "direction", "trackType"] } }, { name: 'create_sequence', description: 'Create a new sequence in Premiere Pro', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the new sequence', }, width: { type: 'number', description: 'Width in pixels (default: 1920)', }, height: { type: 'number', description: 'Height in pixels (default: 1080)', }, framerate: { type: 'number', description: 'Frame rate (default: 23.976)', }, }, required: ['name'], }, }, { name: 'export_project', description: 'Export the current project or sequence', inputSchema: { type: 'object', properties: { output_path: { type: 'string', description: 'Output file path', }, preset_name: { type: 'string', description: 'Export preset name (default: H.264 High Quality)', }, include_audio: { type: 'boolean', description: 'Include audio in export (default: true)', }, }, required: ['output_path'], }, }, ]; return { tools, }; });

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/jordanl61/premiere-pro-mcp-server'

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