Skip to main content
Glama

add_transition

Insert a transition between two adjacent clips in Adobe Premiere Pro by specifying clip IDs, transition type, and duration, streamlining video editing workflows.

Instructions

Adds a transition (e.g., cross dissolve) between two adjacent clips on the timeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipId1YesThe ID of the first clip (outgoing)
clipId2YesThe ID of the second clip (incoming)
durationYesThe duration of the transition in seconds
transitionNameYesThe name of the transition to add (e.g., "Cross Dissolve")

Implementation Reference

  • The main handler function `addTransition` that executes the tool logic. It generates and runs an ExtendScript via the bridge to add a transition between two specified clips on the same track.
    private async addTransition(clipId1: string, clipId2: string, transitionName: string, duration: number): Promise<any> { const script = ` try { var clip1 = app.project.getClipByID("${clipId1}"); var clip2 = app.project.getClipByID("${clipId2}"); if (!clip1 || !clip2) { JSON.stringify({ success: false, error: "One or both clips not found" }); return; } var track = clip1.getTrack(); var transition = track.addTransition("${transitionName}", clip1, clip2, ${duration}); if (!transition) { JSON.stringify({ success: false, error: "Failed to add transition" }); return; } JSON.stringify({ success: true, message: "Transition added successfully", transitionName: "${transitionName}", duration: ${duration}, clip1Id: "${clipId1}", clip2Id: "${clipId2}", transitionId: transition.nodeId }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script);
  • The input schema definition for the 'add_transition' tool using Zod, specifying parameters for the two clips, transition name, and duration.
    name: 'add_transition', description: 'Adds a transition (e.g., cross dissolve) between two adjacent clips on the timeline.', inputSchema: z.object({ clipId1: z.string().describe('The ID of the first clip (outgoing)'), clipId2: z.string().describe('The ID of the second clip (incoming)'), transitionName: z.string().describe('The name of the transition to add (e.g., "Cross Dissolve")'), duration: z.number().describe('The duration of the transition in seconds') }) },
  • The registration/dispatch case in the `executeTool` switch statement that maps the tool name to its handler method.
    case 'add_transition': return await this.addTransition(args.clipId1, args.clipId2, args.transitionName, args.duration);

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