create_motion_composition
Creates a MOTION COMPOSITION — an animated graphic (infographic, title, promo end-card, chart…) written as a React TSX component. Read the 'motion' skill (read_skill {topic:'motion'}) for the exact API surface, available fonts/icons and golden examples before writing one. files maps file names to TSX source; the entry must export default the component. schema declares the editable props (type string|number|color|boolean|select|mediaRef + default) — they become Inspector controls the user can tweak, so parameterize colors, copy and media slots. The composition is compiled and test-rendered BEFORE saving; on failure the error returns verbatim — fix the code and retry. Returns the mediaRef to place with add_clips. Unless asked for plain, aim well beyond a PowerPoint of titles and bullets — the story, its moments and the look are yours to decide. With UI-like parts (buttons, pills, progress bars, cards), write them in their own file with a partsBoard prop (default false) and look at the board first: preview:true, previewProps:{partsBoard:true} returns one large frame with the reply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Composition fps (default 30). | |
| name | Yes | Display name, e.g. 'Pink promo end card'. | |
| entry | No | Entry file (default composition.tsx); must export default. | |
| files | Yes | File name → TSX source. Relative imports between them work. | |
| token | Yes | The session token `connect` returned. Pass it on every call — it says which browser to drive. | |
| width | No | Composition width px (default 1920). | |
| height | No | Composition height px (default 1080). | |
| schema | No | Editable props: {key: {type, default, label?, min?, max?, options?, multiline?}}. type mediaRef makes a media-pool slot. | |
| preview | No | Return one large frame (≤1560 px) with the reply. Media is not loaded in a preview: media slots draw empty and the reply says how many. | |
| projectId | Yes | Project id from get_projects. | |
| previewFrame | No | Frame to preview (default 0). | |
| previewProps | No | Merged over the schema defaults for the preview picture only, e.g. {partsBoard:true}. Nothing saved changes. | |
| durationInFrames | No | Length in frames (default 150). |