apply_effect
Adds specified visual or audio effects to a selected clip in Adobe Premiere Pro, allowing customization of parameters for precise editing control.
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 handler function `applyEffect` that executes the tool logic by generating and executing an ExtendScript to apply the specified effect to the given clip ID, with optional parameters.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:192-198 (schema)The input schema definition for the 'apply_effect' tool, using Zod for validation of clipId, effectName, and optional parameters.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:475-476 (registration)The switch case in `executeTool` that registers and dispatches to the applyEffect handler.return await this.applyEffect(args.clipId, args.effectName, args.parameters); case 'remove_effect':
- src/tools/index.ts:192-198 (registration)The tool definition object registered in `getAvailableTools()` method, which lists all available MCP tools.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') })
- dist/tools/index.d.ts:39-39 (schema)TypeScript declaration of the applyEffect method in the built types.private applyEffect;