apply_effect
Apply visual or audio effects to timeline clips in Adobe Premiere Pro. Specify clip ID, effect name, and parameters to enhance video editing workflows.
Instructions
Applies a visual or audio effect to a specific clip on the timeline.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clipId | Yes | The ID of the clip to apply the effect to | |
| effectName | Yes | The name of the effect to apply (e.g., "Gaussian Blur", "Lumetri Color") | |
| parameters | No | Key-value pairs for the effect's parameters |
Implementation Reference
- src/tools/index.ts:1190-1232 (handler)The core handler function for the 'apply_effect' tool. It generates an ExtendScript that finds the clip by ID, adds the specified effect, sets any provided parameters, and returns the result via the PremiereProBridge.private async applyEffect(clipId: string, effectName: string, parameters?: Record<string, any>): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var effect = clip.addEffect("${effectName}"); if (!effect) { JSON.stringify({ success: false, error: "Effect not found or could not be applied" }); return; } ${parameters ? Object.entries(parameters).map(([key, value]) => `try { if (effect.properties["${key}"]) effect.properties["${key}"].setValue(${JSON.stringify(value)}); } catch (e) { /* Parameter not found */ }` ).join('\n') : ''} JSON.stringify({ success: true, message: "Effect applied successfully", clipId: "${clipId}", effectName: "${effectName}", effectId: effect.matchName, parametersApplied: ${parameters ? Object.keys(parameters).length : 0} }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
- src/tools/index.ts:194-198 (schema)Zod schema defining the input parameters for the apply_effect tool: clipId (required string), effectName (required string), parameters (optional record).inputSchema: z.object({ clipId: z.string().describe('The ID of the clip to apply the effect to'), effectName: z.string().describe('The name of the effect to apply (e.g., "Gaussian Blur", "Lumetri Color")'), parameters: z.record(z.any()).optional().describe('Key-value pairs for the effect\'s parameters') })
- src/tools/index.ts:192-199 (registration)Tool registration in the getAvailableTools() method's return array, including name, description, and schema.name: 'apply_effect', description: 'Applies a visual or audio effect to a specific clip on the timeline.', inputSchema: z.object({ clipId: z.string().describe('The ID of the clip to apply the effect to'), effectName: z.string().describe('The name of the effect to apply (e.g., "Gaussian Blur", "Lumetri Color")'), parameters: z.record(z.any()).optional().describe('Key-value pairs for the effect\'s parameters') }) },
- src/tools/index.ts:474-475 (registration)Dispatch/registration in the executeTool switch statement that routes calls to the applyEffect handler.case 'apply_effect': return await this.applyEffect(args.clipId, args.effectName, args.parameters);