Skip to main content
Glama

auto_edit_to_music

Automatically synchronizes video clips to a music track's beat in Adobe Premiere Pro, enabling precise edits based on rhythm and chosen editing style like cuts, transitions, or sync.

Instructions

Automatically creates an edit by cutting video clips to the beat of a music track.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audioTrackIdYesThe ID of the audio track containing the music
editStyleYesThe desired editing style
sensitivityNoBeat detection sensitivity (0-100)
videoClipIdsYesAn array of video clip IDs to use for the edit

Implementation Reference

  • Tool registration in getAvailableTools() array, including name, description, and input schema definition.
    name: 'auto_edit_to_music', description: 'Automatically creates an edit by cutting video clips to the beat of a music track.', inputSchema: z.object({ audioTrackId: z.string().describe('The ID of the audio track containing the music'), videoClipIds: z.array(z.string()).describe('An array of video clip IDs to use for the edit'), editStyle: z.enum(['cuts_only', 'cuts_and_transitions', 'beat_sync']).describe('The desired editing style'), sensitivity: z.number().optional().describe('Beat detection sensitivity (0-100)') }) },
  • The core handler function implementing the tool logic. It constructs and executes an ExtendScript placeholder for beat detection and auto-editing video clips to music.
    private async autoEditToMusic(audioTrackId: string, videoClipIds: string[], editStyle: string, sensitivity = 50): Promise<any> { const script = ` try { var audioTrack = app.project.getTrackByID("${audioTrackId}"); var videoClips = [${videoClipIds.map(id => `app.project.getClipByID("${id}")`).join(', ')}]; if (!audioTrack) { JSON.stringify({ success: false, error: "Audio track not found" }); return; } var validVideoClips = videoClips.filter(function(clip) { return clip !== null; }); if (validVideoClips.length === 0) { JSON.stringify({ success: false, error: "No valid video clips found" }); return; } // This would require sophisticated beat detection and auto-editing algorithms // For now, return a placeholder response with the detected parameters JSON.stringify({ success: true, message: "Auto-edit to music analysis completed", audioTrackId: "${audioTrackId}", videoClipCount: validVideoClips.length, editStyle: "${editStyle}", sensitivity: ${sensitivity}, note: "This feature requires advanced beat detection implementation" }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • Dispatch in executeTool switch statement that routes calls to the handler.
    case 'auto_edit_to_music': return await this.autoEditToMusic(args.audioTrackId, args.videoClipIds, args.editStyle, args.sensitivity);

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/hetpatel-11/Adobe_Premiere_Pro_MCP'

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