Skip to main content
Glama

add_transition

Add transitions between video clips in Adobe Premiere Pro to create smooth scene changes and professional edits.

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)
transitionNameYesThe name of the transition to add (e.g., "Cross Dissolve")
durationYesThe duration of the transition in seconds

Implementation Reference

  • Registers the 'add_transition' tool in getAvailableTools() with name, description, and Zod input schema for MCP compatibility.
    { 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') }) },
  • Dispatches 'add_transition' tool calls to the private addTransition handler method in executeTool switch statement.
    case 'add_transition': return await this.addTransition(args.clipId1, args.clipId2, args.transitionName, args.duration);
  • Core implementation of the 'add_transition' tool: constructs ExtendScript to retrieve clips by ID, add transition between them on their track, and returns success/error via PremiereProBridge.
    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); }
  • Zod schema defining input parameters for the 'add_transition' tool: clip IDs, transition name, and duration.
    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') })
  • src/index.ts:74-81 (registration)
    MCP server handler for listing tools, which exposes the 'add_transition' tool from PremiereProTools to the MCP protocol.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { const tools = this.tools.getAvailableTools().map((tool) => ({ name: tool.name, description: tool.description, inputSchema: zodToJsonSchema(tool.inputSchema, { $refStrategy: 'none' }) })); return { tools }; });

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