Skip to content

MCP: edit operations

recording.auto_zoom

Zooms a screen take on its clicks.

Last updated:

Plans zooms from the clicks of the recording of the clip's asset and writes them as keyframes of x, y and scale of the clip, in one undoable step; any x, y and scale keyframes the clip already has are replaced. Clicks close in time and in space make one zoom, the view eases in before the first click, is held after the last one and eases out; zooms that would rest for under a second between them become a pan. The level is at most 3x and a zoom is held at least 0.5 s, so the defaults are gentle. The picture never leaves the frame. The clicks come from the pointer events of the recording and are supplied by the service in resolved; the command never starts a capture. The same clicks and options always give the same keyframes. The clip must play at a constant speed, forward, and be neither cropped, rotated nor flipped. Run recording.set_cursor and recording.set_click_highlight again after changing the zoom by hand.

Arguments#

ArgumentTypeRequiredNotes
hold_msintegernoThe least time a zoom is held after its last click, 500 to 10000 ms. Default 1200.; min 500; max 10000
item_idstringyesA clip of a screen recording.; pattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
lead_msintegernoThe full zoom is reached this long before the first click, 0 to 3000 ms. Default 400.; min 0; max 3000
levelnumbernoHow far the view zooms in, 1.1 to 3. Default 1.6.; min 1.1; max 3
max_zoomsintegernoThe most zooms made, the first in time, 1 to 24. Default 24.; min 1; max 24
merge_msintegernoClicks closer than this, in one window, make one zoom, 0 to 10000 ms. Default 2500.; min 0; max 10000
ramp_msintegernoThe length of the ease in and of the ease out, 200 to 3000 ms. Default 700.; min 200; max 3000

Errors#

Scope#

Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help recording.auto_zoom 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": "recording.auto_zoom",
          "args": {
            "item_id": "itm_m1n2p3q4r5",
            "level": 1.8
          }
        }
      ]
    }
  }
}

As a batch file for the CLI

batch.json
[
  {
    "op": "recording.auto_zoom",
    "args": {
      "item_id": "itm_m1n2p3q4r5",
      "level": 1.8
    }
  }
]
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": "recording.auto_zoom",
      "args": {
        "item_id": "itm_m1n2p3q4r5",
        "level": 1.8
      }
    }
  ]
}'

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