Skip to main content
Glama

add_transition_to_clip

Apply a video transition to the start or end of a clip in Adobe Premiere Pro. Specify clip ID, transition type, position, and duration to enhance editing workflow.

Instructions

Adds a transition to the beginning or end of a single clip.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYesThe ID of the clip
transitionNameYesThe name of the transition
positionYesWhether to add the transition at the start or end of the clip
durationYesThe duration of the transition in seconds

Implementation Reference

  • Executes the tool by generating and running an ExtendScript in Premiere Pro to add a transition to the specified position (start or end) of a clip on the timeline.
    private async addTransitionToClip(clipId: string, transitionName: string, position: 'start' | 'end', duration: number): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var track = clip.getTrack(); var transition; if ("${position}" === "start") { transition = track.addTransition("${transitionName}", clip, "start", ${duration}); } else { transition = track.addTransition("${transitionName}", clip, "end", ${duration}); } if (!transition) { JSON.stringify({ success: false, error: "Failed to add transition" }); return; } JSON.stringify({ success: true, message: "Transition added successfully", transitionName: "${transitionName}", position: "${position}", duration: ${duration}, clipId: "${clipId}", transitionId: transition.nodeId }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script);
  • Zod schema defining the input parameters for the 'add_transition_to_clip' tool.
    name: 'add_transition_to_clip', description: 'Adds a transition to the beginning or end of a single clip.', inputSchema: z.object({ clipId: z.string().describe('The ID of the clip'), transitionName: z.string().describe('The name of the transition'), position: z.enum(['start', 'end']).describe('Whether to add the transition at the start or end of the clip'), duration: z.number().describe('The duration of the transition in seconds') }) },
  • Tool dispatch in the executeTool method's switch statement, mapping the tool name to its handler function.
    case 'add_transition_to_clip': return await this.addTransitionToClip(args.clipId, args.transitionName, args.position, 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