tween
Animate a layer (or group) by keyframes instead of redrawing it: properties x, y (offset in pixels), rotation (degrees, clockwise), scale_x, scale_y (1 = 100%), opacity (0-1). Between keys the value follows the key's ease: linear, hold, in_quad, out_quad, in_out_quad, in_out_cubic, out_back, out_...
This record as markdown: /tools/pixmith-mcp/tween.md
What tween does on Pixmith
AI agents invoke tween to trigger actions in Pixmith. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
x | number | — | set_pivot: pivot in canvas pixels. |
y | number | — | set_pivot: pivot in canvas pixels. |
to | integer | — | move_key: destination; copy_keys/bake range: last frame. |
doc | string | — | Document id (see doc_list); optional when only one document is open. |
ease | string | — | Ease from this key to the next (default linear). |
from | integer | — | move_key/copy_keys/bake range: first frame. |
mode | string | — | bake: all (default), range (from..to) or frame. |
frame | integer | — | Key frame (default: active); info: frame to evaluate; paste_keys: where to paste; bake mode frame: the frame. |
layer | object | — | Layer or group (default: active). |
value | number | — | set_key: value. |
action | string | Yes | set_parent: Tween rig: give the layer a parent. |
bezier | array | — | bezier ease: [x1, y1, x2, y2] (like CSS cubic-bezier). |
Parameters from the server's own tool schema.
Why tween is rated High
tween triggers real processes with real consequences. An agent gone sideways doesn't fire it once. It starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.
Risk signalsHigh parameter count (26 properties)
Attacks that exploit this kind of access
The rule that runs tween safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Pixmith, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For tween, this is the rule to start with:
tween stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every tween call is checked against it from then on.
Questions about tween
Animate a layer (or group) by keyframes instead of redrawing it: properties x, y (offset in pixels), rotation (degrees, clockwise), scale_x, scale_y (1 = 100%), opacity (0-1). Between keys the value follows the key's ease: linear, hold, in_quad, out_quad, in_out_quad, in_out_cubic, out_back, out_bounce, or bezier with control points [x1, y1, x2, y2]. Actions: info (keys, pivot, options, the transform at frame), set_key, set_keys (several properties at one frame), remove_key (alias: delete_key), move_key, set_ease, set_pivot / reset_pivot (rotation/scale center), set_options (rotsprite, snap_scale, ignore_opacity), copy_keys / paste_keys, bake (render the tween into real cels: mode all / range / frame; new_layer puts them on a new layer; keep_source keeps the keys), bake_all. Tween rig (the app's Tween panel Parent picker): a layer can have a tween parent, so its transform is the parent's composed with its own about its own pivot: rotate a thigh and the shin, whose pivot is the knee, follows (thigh -> shin -> boot, body -> arm). Actions set_parent (parent = a layer; fails for a cycle, a group or a tilemap), clear_parent, get_parent, children (direct children of layer), composed_transform (at frame: matrix [a, b, c, d, e, f] with x' = a*x + c*y + e, y' = b*x + d*y + f including all ancestors, rotation in degrees, scale_x, scale_y and where the layer's pivot is on the canvas; a child without keys of its own just follows its parent). Opacity is not inherited. info shows parent, children and the effective frame range. bake and bake_all are rig-aware (a child bakes with its composed transform; baking a child alone detaches it; a layer that still has children needs keep_source or bake_all). The parent link is saved with the document. Tweened layers already render and export animated; bake when you need real per-frame pixels to edit. It is categorised as a Execute tool in the Pixmith MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
tween accepts 12 parameters: x, y, to, doc, ease, from, mode, frame, layer, value, action, bezier. Required: action. The full parameter table on this page comes from the server's own tool schema.
Register the Pixmith MCP server in PolicyLayer and add a rule for tween: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Pixmith. Nothing to install.
tween is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the tween rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for tween. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
tween is provided by the Pixmith MCP server (pixmith-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Pixmith, and thousands of servers like it.
Across the catalogue