Skip to content

MCP: edit operations

clip.blur_region

Blurs a rectangle of a clip for a time range.

Last updated:

Hides part of the picture (an e-mail, a key, an address): adds a copy of the clip, limited to start and duration, on a Blur track above the clip, with a blur of radius and a rectangular mask of the region. x, y, width and height are fractions of the picture. The radius has a minimum, 1.5% of the shorter side of the project, and a default of 4%, so that the text cannot be read. A region that touches an edge of the picture is blurred as much as one in the middle. A feather is soft on both sides of the border of the region, so within half of it of an edge of the picture a little of the sharp picture shows and effective.near_edge is true: use feather 0 there. The clip is not changed; edit or delete the item named Blur region to change it.

Arguments#

ArgumentTypeRequiredNotes
durationstringnoA length. Default up to the end of the clip.
featherintegernoSoft edge of the region in pixels, 0 to 200. Default 0.; min 0; max 200
heightnumberyesHeight of the region, a fraction of the picture.; min 0.001; max 1
item_idstringyesA clip.; pattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
new_idstringnoThe id of the blur item.; pattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
new_track_idstringnoThe id of the track when one is made.; pattern ^trk_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
radiusnumbernoBlur radius in pixels at project resolution, 1.5% of the shorter side to 100. Default 4%.; max 100
startstringnoAbsolute start of the blur, inside the clip. Default the start of the clip.
strengthstrong, mediumnoA named blur strength instead of a radius; strong is the default.
track_idstringnoA visual track above the clip. Default a Blur track above it, made if there is none.; pattern ^trk_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
widthnumberyesWidth of the region, a fraction of the picture.; min 0.001; max 1
xnumberyesLeft edge of the region, a fraction of the picture.; min 0; max 1
ynumberyesTop edge of the region, a fraction of the picture.; min 0; max 1

Errors#

Scope#

Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help clip.blur_region 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": "clip.blur_region",
          "args": {
            "duration": "2s",
            "height": 0.08,
            "item_id": "itm_m1n2p3q4r5",
            "start": "1s",
            "width": 0.8,
            "x": 0.1,
            "y": 0.62
          }
        }
      ]
    }
  }
}

As a batch file for the CLI

batch.json
[
  {
    "op": "clip.blur_region",
    "args": {
      "duration": "2s",
      "height": 0.08,
      "item_id": "itm_m1n2p3q4r5",
      "start": "1s",
      "width": 0.8,
      "x": 0.1,
      "y": 0.62
    }
  }
]
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": "clip.blur_region",
      "args": {
        "duration": "2s",
        "height": 0.08,
        "item_id": "itm_m1n2p3q4r5",
        "start": "1s",
        "width": 0.8,
        "x": 0.1,
        "y": 0.62
      }
    }
  ]
}'

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