GSAP Animation Controls
gsap_controlsGenerates code to control existing GSAP tweens or timelines with actions such as play, pause, reverse, or seek.
Instructions
Generate playback control code for an existing tween or timeline variable (play, pause, reverse, seek, timeScale, kill, progress). Use when you need runtime control over an animation you have already created. Provide the JS variable name (e.g. tl, heroAnimation) in variableName — NOT a CSS selector. For generating the animation itself use gsap_tween or gsap_timeline instead.
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": {
"action": "<action>"
},
"name": "gsap_controls"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | Value for seek (seconds or label), timeScale (multiplier), or progress (0–1) | |
| action | Yes | The control action to generate | |
| target | No | Target type: tween, timeline, or global | timeline |
| selector | No | Deprecated: use variableName instead. Accepted for backward compatibility. | |
| generateUI | No | Generate an HTML control panel | |
| variableName | No | JavaScript variable name of the tween or timeline to control, e.g. tl, heroAnimation. NOT a CSS selector. |