Add Overlay
add_overlayRegisters a custom component as a global overlay that renders above scenes, with optional start/end frames for watermarks or brief animations, and persists through scene edits.
Instructions
Register a custom component as a global overlay that renders on top of scenes. The component file must already exist on disk (use write_file first). Overlays persist across all scene mutations — they survive create_scene, update_scene, delete_scene, and reorder_scenes calls. Omit startFrame/endFrame for full-video-duration overlays (logos, watermarks). Set them for partial-duration overlays (animations that appear briefly).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"overlayId": "<overlayId>",
"name": "<name>",
"componentName": "<componentName>",
"file": "<file>"
},
"name": "add_overlay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Project-relative path to the component file. Example: "src/overlays/BouncingBall.tsx" | |
| name | Yes | Human-readable label, e.g. 'Bouncing Ball' | |
| zIndex | No | Render order. Higher = on top. Default 10. | |
| endFrame | No | Last frame the overlay appears. Omit for full-video-duration. | |
| overlayId | Yes | Unique kebab-case ID, e.g. 'overlay-bouncing-ball' | |
| startFrame | No | First frame the overlay appears. Omit for full-video-duration. | |
| projectPath | Yes | ||
| componentName | Yes | Named export in the .tsx file — must match exactly. Example: "BouncingBall" |