apply_lut
Apply color grading LUTs to video clips in Adobe Premiere Pro to adjust color, contrast, and style for professional video editing workflows.
Instructions
Applies a Look-Up Table (LUT) to a clip for color grading.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clipId | Yes | The ID of the clip | |
| lutPath | Yes | The absolute path to the .cube or .3dl LUT file | |
| intensity | No | LUT intensity (0-100) |
Implementation Reference
- src/tools/index.ts:1698-1747 (handler)The handler function for the 'apply_lut' tool. It constructs an ExtendScript that adds a 'Lumetri Color' effect to the specified clip and sets the Input LUT path and intensity.private async applyLut(clipId: string, lutPath: string, intensity = 100): Promise<any> { const script = ` try { var clip = app.project.getClipByID("${clipId}"); if (!clip) { JSON.stringify({ success: false, error: "Clip not found" }); return; } var lutEffect = clip.addEffect("Lumetri Color"); if (!lutEffect) { JSON.stringify({ success: false, error: "Failed to add LUT effect" }); return; } // Apply LUT file try { lutEffect.properties["Input LUT"].setValue("${lutPath}"); lutEffect.properties["Input LUT Intensity"].setValue(${intensity / 100}); } catch (e) { JSON.stringify({ success: false, error: "Failed to apply LUT file: " + e.toString() }); return; } JSON.stringify({ success: true, message: "LUT applied successfully", clipId: "${clipId}", lutPath: "${lutPath}", intensity: ${intensity} }); } catch (e) { JSON.stringify({ success: false, error: e.toString() }); } `; return await this.bridge.executeScript(script); }
- src/tools/index.ts:319-323 (schema)Zod input schema defining parameters for the apply_lut tool: clipId (required), lutPath (required), intensity (optional).inputSchema: z.object({ clipId: z.string().describe('The ID of the clip'), lutPath: z.string().describe('The absolute path to the .cube or .3dl LUT file'), intensity: z.number().optional().describe('LUT intensity (0-100)') })
- src/tools/index.ts:317-324 (registration)Tool registration in getAvailableTools() array, including name, description, and input schema.name: 'apply_lut', description: 'Applies a Look-Up Table (LUT) to a clip for color grading.', inputSchema: z.object({ clipId: z.string().describe('The ID of the clip'), lutPath: z.string().describe('The absolute path to the .cube or .3dl LUT file'), intensity: z.number().optional().describe('LUT intensity (0-100)') }) },
- src/tools/index.ts:500-501 (registration)Registration/dispatch in the executeTool method's switch statement, calling the applyLut handler.case 'apply_lut': return await this.applyLut(args.clipId, args.lutPath, args.intensity);