Skip to content

MCP: edit operations

settings.reframe

Changes the project aspect ratio and refits the items.

Last updated:

Sets the frame size from an aspect preset (16:9 is 1920x1080, 9:16 is 1080x1920, 1:1 is 1080x1080, 4:5 is 1080x1350) or from width and height. Like settings.set, the explicit x and y of the items and their keyframes follow the size. Beyond that, text and shape items, and clips with fit none, are scaled by the smaller of the two axis ratios so they keep their share of the frame instead of overflowing it. Clips with fit cover or contain fill the frame by themselves; adjust their crop with clip.set_framing.

Arguments#

ArgumentTypeRequiredNotes
aspect16:9, 9:16, 1:1, 4:5noA preset frame size, or give width and height.
heightintegernoFrame height in pixels; even.; min 16; max 4096
widthintegernoFrame width in pixels; even.; min 16; max 4096

Errors#

Scope#

Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help settings.reframe 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": "settings.reframe",
          "args": {
            "aspect": "9:16"
          }
        }
      ]
    }
  }
}

As a batch file for the CLI

batch.json
[
  {
    "op": "settings.reframe",
    "args": {
      "aspect": "9:16"
    }
  }
]
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": "settings.reframe",
      "args": {
        "aspect": "9:16"
      }
    }
  ]
}'

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