Compile a MotionSpec to GSAP/CSS
motion_compileValidates (fail-closed) and deterministically compiles a MotionSpec into vanilla-GSAP JavaScript and CSS, with prefers-reduced-motion enabled by default and a performance-budget report. Same spec always yields identical code. Returns {ok:true, js, css, warnings, report, catalogVersion} or {ok:false, errors, catalogVersion}; css may be null when no CSS is emitted. Read warnings before shipping: explicitly disabling reduced-motion or loop pause controls can compile with accessibility warnings. Does not write files or execute the emitted code.
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": {
"spec": "<spec>"
},
"name": "motion_compile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The MotionSpec JSON object | |
| specName | No | Optional name used in the artifact header |