Skip to main content
Glama

move_clip

Reposition video clips on the timeline by specifying new time positions and track indexes in Adobe Premiere Pro.

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 main handler function for the 'move_clip' tool. It constructs and executes an ExtendScript via the PremiereProBridge to move the specified clip to a new time position on the timeline, optionally changing its track.
    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); }
  • The input schema and metadata for the 'move_clip' tool, defining parameters and descriptions used for validation and tool discovery.
    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)') }) },
  • The dispatch registration in the executeTool switch statement that maps the tool name 'move_clip' to its handler method.
    case 'move_clip': return await this.moveClip(args.clipId, args.newTime, args.newTrackIndex);

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