apply_lut
Apply a Look-Up Table (LUT) to a video clip in Adobe Premiere Pro for precise color grading. Input clip ID, LUT file path, and intensity to adjust color tones effectively.
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 | |
| intensity | No | LUT intensity (0-100) | |
| lutPath | Yes | The absolute path to the .cube or .3dl LUT file |
Implementation Reference
- src/tools/index.ts:1698-1747 (handler)The handler function that executes the apply_lut tool. It adds a 'Lumetri Color' effect to the specified clip and applies the LUT file at the given path with optional 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:317-324 (schema)The input schema definition for the apply_lut tool using Zod, specifying required clipId and lutPath, optional intensity.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:498-502 (registration)The dispatch/registration in the executeTool switch statement that calls the applyLut handler for the 'apply_lut' tool.case 'color_correct': return await this.colorCorrect(args.clipId, args); case 'apply_lut': return await this.applyLut(args.clipId, args.lutPath, args.intensity);
- dist/tools/index.d.ts:49-49 (registration)TypeScript declaration of the applyLut method in the compiled dist version.private applyLut;