Skip to main content
Glama

move_clip

Easily reposition a clip on the Adobe Premiere Pro timeline by specifying its new time and track index using this tool. Automate clip movement for precise video editing workflows.

Instructions

Moves a clip to a different position on the timeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesThe ID of the clip to move
newTimeYesThe new time position in seconds
newTrackIndexNoThe new track index (if moving to different track)

Implementation Reference

  • The core handler function for the 'move_clip' tool. It constructs an ExtendScript for Premiere Pro to locate the clip by ID, adjust its start time to the new position, and optionally move it to a new video track by removing and re-inserting it.
    private async moveClip(clipId: string, newTime: number, newTrackIndex?: number): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var oldTime = clip.start.seconds; var oldTrack = clip.getTrack(); var oldTrackIndex = oldTrack.index; clip.start = new Time("${newTime}s"); ${newTrackIndex !== undefined ? ` var newTrack = app.project.activeSequence.videoTracks[${newTrackIndex}]; if (newTrack) { oldTrack.removeClip(clip, false); newTrack.insertClip(clip, new Time("${newTime}s")); } ` : ''} JSON.stringify({ success: true, message: "Clip moved successfully", clipId: "${clipId}", oldTime: oldTime, newTime: ${newTime}, oldTrackIndex: oldTrackIndex, newTrackIndex: ${newTrackIndex !== undefined ? newTrackIndex : 'unchanged'} }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • Zod schema defining the input parameters for the move_clip tool: clipId (required string), newTime (required number), newTrackIndex (optional number).
    inputSchema: z.object({ clipId: z.string().describe('The ID of the clip to move'), newTime: z.number().describe('The new time position in seconds'), newTrackIndex: z.number().optional().describe('The new track index (if moving to different track)') })
  • Registration of the move_clip tool in the getAvailableTools() array, including name, description, and schema.
    name: 'move_clip', description: 'Moves a clip to a different position on the timeline.', inputSchema: z.object({ clipId: z.string().describe('The ID of the clip to move'), newTime: z.number().describe('The new time position in seconds'), newTrackIndex: z.number().optional().describe('The new track index (if moving to different track)') }) },
  • Dispatch/registration in the executeTool switch statement that routes calls to the moveClip handler.
    return await this.moveClip(args.clipId, args.newTime, args.newTrackIndex); case 'trim_clip':

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