Skip to content

MCP: edit operations

keyframe.set_easing

Changes the easing of the segment that starts at a keyframe.

Last updated:

Gives the keyframe at the absolute position a named easing (easing), a custom cubic Bezier curve (bezier: x1, y1, x2, y2; x1 and x2 from 0 to 1, y1 and y2 from -2 to 3) or a named Bezier preset (preset: in, out, in_out, back, overshoot, stored as its four numbers). Exactly one of the three. The value and the time of the keyframe do not change. Works for every animatable property, crop and mask included.

Arguments#

ArgumentTypeRequiredNotes
atstringyesPosition of an existing keyframe on the project timeline.
bezierarray of numbernoX1, y1, x2, y2 of a cubic Bezier curve: x1 and x2 from 0 to 1, y1 and y2 from -2 to 3.; at least 4 items; at most 4 items
easinglinear, ease_in, ease_out, ease_in_out, holdnoA named easing. Exactly one of easing, bezier and preset.
item_idstringyespattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
presetin, out, in_out, back, overshootnoA named Bezier curve, stored as its four numbers.
propertystring, one of 21 valuesyes

Errors#

Scope#

Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help keyframe.set_easing for the same description from the binary, or call the command_help tool.

Next steps#

As an MCP call

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "edit",
    "arguments": {
      "project_id": "prj_7k2m9x4q1b",
      "base_revision": 12,
      "operations": [
        {
          "op": "keyframe.set_easing",
          "args": {
            "at": "1s",
            "item_id": "itm_s6t7v8w9x0",
            "preset": "overshoot",
            "property": "scale"
          }
        }
      ]
    }
  }
}

As a batch file for the CLI

batch.json
[
  {
    "op": "keyframe.set_easing",
    "args": {
      "at": "1s",
      "item_id": "itm_s6t7v8w9x0",
      "preset": "overshoot",
      "property": "scale"
    }
  }
]
Terminal
stuarty edit --project prj_7k2m9x4q1b --ops batch.json --json

Over HTTP

curl
curl -X POST "http://127.0.0.1:7878/api/v1/projects/prj_7k2m9x4q1b/edit" \
  -H "Authorization: Bearer $STUARTY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "base_revision": 12,
  "operations": [
    {
      "op": "keyframe.set_easing",
      "args": {
        "at": "1s",
        "item_id": "itm_s6t7v8w9x0",
        "preset": "overshoot",
        "property": "scale"
      }
    }
  ]
}'

The ids in the example are illustrative: read the real ones with project_get.