Skip to main content
Glama

remove_from_timeline

Remove clips from your Premiere Pro timeline with options to ripple delete (close gaps) or lift (leave gaps). This tool helps streamline video editing workflows by eliminating unwanted footage directly from the timeline.

Instructions

Removes a clip from the timeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesThe ID of the clip on the timeline to remove
deleteModeNoWhether to ripple delete (close gap) or lift (leave gap)

Implementation Reference

  • The core handler function for the 'remove_from_timeline' tool. It constructs and executes an ExtendScript via the PremiereProBridge to locate the clip by ID on the active sequence timeline and remove it using either 'ripple' (closes gap) or 'lift' (leaves gap) mode.
    private async removeFromTimeline(clipId: string, deleteMode = 'ripple'): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var clipName = clip.name; var track = clip.getTrack(); if ("${deleteMode}" === "ripple") { track.removeClip(clip, true); // ripple delete } else { track.removeClip(clip, false); // lift delete } JSON.stringify({ success: true, message: "Clip removed from timeline", clipId: "${clipId}", clipName: clipName, deleteMode: "${deleteMode}" }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
  • Zod input schema defining parameters for the tool: clipId (required string) and optional deleteMode (enum: 'ripple' or 'lift'). Used for validation in executeTool.
    inputSchema: z.object({ clipId: z.string().describe('The ID of the clip on the timeline to remove'), deleteMode: z.enum(['ripple', 'lift']).optional().describe('Whether to ripple delete (close gap) or lift (leave gap)') })
  • Dispatch in executeTool switch statement that routes calls to the removeFromTimeline handler after schema validation.
    case 'remove_from_timeline': return await this.removeFromTimeline(args.clipId, args.deleteMode);
  • Tool registration in getAvailableTools() array, providing name, description, and schema for MCP tool discovery.
    { name: 'remove_from_timeline', description: 'Removes a clip from the timeline.', inputSchema: z.object({ clipId: z.string().describe('The ID of the clip on the timeline to remove'), deleteMode: z.enum(['ripple', 'lift']).optional().describe('Whether to ripple delete (close gap) or lift (leave gap)') }) },

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