Skip to content

MCP: edit operations

recording.set_cursor

Draws a smooth cursor on a screen take.

Last updated:

Draws the pointer of the recording of the clip's asset, smoothed, as shape items on a Cursor track above the clip: the capture never contains the cursor. The path is the pointer events through a filter of time constant smoothing_ms (0 follows the raw path), sampled every keyframe_ms and mapped through the zoom and position the clip has when the command runs, so run it after recording.auto_zoom and again after changing the zoom or moving the clip; each run replaces the cursor items of the clip. style is dot or ring, size is in pixels of the frame and stays the same when the clip is zoomed; visible false removes the cursor. The positions come from the pointer events of the recording and are supplied by the service in resolved. The same events and options always give the same items.

Arguments#

ArgumentTypeRequiredNotes
colorstringnoA colour; default #FFFFFF.
item_idstringyesA clip of a screen recording.; pattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
keyframe_msintegernoThe time between two keyframes, 50 to 1000 ms. Default 100.; min 50; max 1000
sizenumbernoPixels of the frame, 8 to 128. Default a fortieth of the frame height, at least 16.; min 8; max 128
smoothing_msintegernoTime constant of the smoothing, 0 to 2000 ms; 0 follows the raw path. Default 150.; min 0; max 2000
styledot, ringnoDot (default) or ring.
visiblebooleannoFalse removes the cursor of the clip. Default true.

Errors#

Scope#

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

As a batch file for the CLI

batch.json
[
  {
    "op": "recording.set_cursor",
    "args": {
      "item_id": "itm_m1n2p3q4r5",
      "smoothing_ms": 200,
      "style": "ring"
    }
  }
]
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.set_cursor",
      "args": {
        "item_id": "itm_m1n2p3q4r5",
        "smoothing_ms": 200,
        "style": "ring"
      }
    }
  ]
}'

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