nest_composition
Places one composition inside another as a layer—e.g., a 9:16 card in a 16:9 video—preserving its size, frame rate, timing, and camera while positioning, scaling, fitting, or looping it.
Instructions
Place one composition inside another as a layer (a precomp, as in After Effects): a 9:16 card in a 16:9 video, a 4K shot shrunk into a frame. The nested one keeps its own size, frame rate, nested compositions and camera and plays from the element's start (seconds into the element) at rate, beginning in seconds into it; past its end it is gone unless loop. Its box is w × h (default: its own size, so scale 1 is pixel for pixel; scale and keyframes move it like any layer), filled by fit: contain (whole picture, default), cover (fills, cropped) or fill (stretched). It paints its own background unless its meta.background is "transparent". A composition cannot nest itself, directly or through others. The layer is type "composition" with props.composition; change it later with set_props, set_motion, set_keyframe.
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": {
"composition": "<composition>",
"nested": "<nested>"
},
"name": "nest_composition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | Box height in px (default: the nested composition's height) | |
| w | No | Box width in px (default: the nested composition's width) | |
| x | No | Centre x in px (default: the frame centre) | |
| y | No | Centre y in px (default: the frame centre) | |
| id | No | Element id (default: the nested composition's name) | |
| in | No | Seconds into the nested composition at the layer's start | |
| fit | No | contain | |
| into | No | A composition nested inline in this one to put it in (default: this composition itself) | |
| loop | No | Start over at its end instead of disappearing | |
| rate | No | Playback speed (1 = as made) | |
| basis | No | What you read and followed to make this change, as refs from search or lookup: rule:<lint or taste rule>, taste, feedback:<id> (earlier feedback this follows; what it answers goes in feedback), commit:<id> (an earlier change it builds on), asset:, template:, skill:… The person sees them under the change, so they know why it is this way. Name only what shaped it. | |
| scale | No | ||
| start | No | Seconds into the element it starts playing (held on its first frame before) | |
| nested | Yes | The composition to place inside (list_compositions) | |
| radius | No | Corner radius of the box in px | |
| message | No | One line saying why, kept with the change in the history | |
| feedback | No | Ids of the feedback this change answers (notes and marks from list_notes, list_examples or the conversation). When the person keeps the change it joins the record of that feedback, and when they then mark the feedback resolved it is the fix; when they take it back, the feedback opens again. | |
| confidence | No | How sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change. | |
| composition | Yes | Composition name (file in compositions/ without .json) |