get_timeline_structure
Retrieve the track structure of your active Premiere Pro sequence to analyze timeline organization and automate video editing workflows.
Instructions
Get the track structure of the active sequence
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-server.js:479-524 (handler)The main handler function for the 'get_timeline_structure' tool. It fetches the timeline structure data from a local HTTP API (localhost:3001), processes video and audio tracks into a formatted text response, and handles errors.async getTimelineStructure() { try { const response = await fetch('http://localhost:3001/api/timeline-structure'); 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}`, }, ], }; } const videoTracks = data.video_tracks.map(track => ` • V${track.track_index}: ${track.track_name} ${track.is_locked ? '🔒' : ''} ${track.is_visible ? '👁️' : '🙈'} (${track.blend_mode})` ).join('\n'); const audioTracks = data.audio_tracks.map(track => ` • A${track.track_index}: ${track.track_name} ${track.is_locked ? '🔒' : ''} ${track.is_muted ? '🔇' : '🔊'} ${track.is_solo ? '🎯' : ''} (Vol: ${track.volume}dB, Pan: ${track.pan})` ).join('\n'); return { content: [ { type: 'text', text: `🎬 **Timeline Structure: ${data.sequence_name}**\n\n**Video Tracks:**\n${videoTracks}\n\n**Audio Tracks:**\n${audioTracks}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `❌ **Failed to get timeline structure**\n\nError: ${error.message}`, }, ], isError: true, }; } }
- mcp-server.js:74-82 (schema)The tool schema definition including name, description, and empty input schema (no parameters required), provided in the ListTools response.{ name: "get_timeline_structure", description: "Get the track structure of the active sequence", inputSchema: { type: "object", properties: {}, required: [] } },
- mcp-server.js:234-235 (registration)The switch case in the CallToolRequestHandler that registers and dispatches calls to the getTimelineStructure handler method.case 'get_timeline_structure': return await this.getTimelineStructure();