Skip to content

MCP: edit operations

settings.set

Sets the frame size, the background colour or the loudness target.

Last updated:

Sets the given settings. When the size changes, the explicit x and y of every visual item, and the values of its x and y keyframes, are scaled by the ratio of new to old size on each axis; scale and text size are untouched and items at the default position stay centred.

Arguments#

ArgumentTypeRequiredNotes
backgroundstringnoA hex colour, $name from template.colors, or transparent (no background colour; formats with alpha keep it).
heightintegernoFrame height in pixels; even.; min 16; max 4096
loudness_targetnumbernoIntegrated loudness target in LUFS.; min -30; max -5
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.set 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.set",
          "args": {
            "height": 1280,
            "width": 720
          }
        }
      ]
    }
  }
}

As a batch file for the CLI

batch.json
[
  {
    "op": "settings.set",
    "args": {
      "height": 1280,
      "width": 720
    }
  }
]
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.set",
      "args": {
        "height": 1280,
        "width": 720
      }
    }
  ]
}'

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