Skip to content

MCP: edit operations

clip.set_color

Grades a clip: basic colour, LUT, HSL, wheels and curves.

Last updated:

Sets the given adjustments, rounded to 3 decimals; a value equal to the default (brightness 0, contrast 1, saturation 1, temperature 0, tint 0, hue 0) clears the stored one. Positive temperature is warmer, positive tint is more magenta, hue rotates the colours in degrees. lut_asset is the id of a lut asset (a .cube file) and lut_intensity how much of it is mixed in, 0 to 1, default 1; lut_intensity 0 removes the lookup table. hsl bands (red, orange, yellow, green, cyan, blue, purple, magenta: hue, saturation, lightness, -1 to 1), wheels (shadows, midtones, highlights: hue 0 to 360, amount 0 to 1, luma -1 to 1) and curves (master, red, green, blue: 2 to 8 points of x and y from 0 to 1) each replace what they name and a neutral one removes it.

Arguments#

ArgumentTypeRequiredNotes
brightnessnumberno-1 to 1; default 0.; min -1; max 1
contrastnumberno0 to 2; default 1.; min 0; max 2
curvesobjectnoTone curves: master, red, green, blue.
hslarray of objectnoBands of colour ranges, up to 8; a given range replaces its band, a neutral band removes it.
huenumberno-180 to 180 degrees; default 0.; min -180; max 180
item_idstringyesA clip.; pattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
lut_assetstringnoId of a lut asset to grade the clip with.; pattern ^ast_[0123456789abcdefghjkmnpqrstvwxyz]{10}$
lut_intensitynumberno0 to 1; default 1; 0 removes the lookup table.; min 0; max 1
saturationnumberno0 to 2; default 1.; min 0; max 2
temperaturenumberno-1 (cooler) to 1 (warmer); default 0.; min -1; max 1
tintnumberno-1 (greener) to 1 (more magenta); default 0.; min -1; max 1
wheelsobjectnoColour wheels of shadows, midtones and highlights.

Errors#

Scope#

Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help clip.set_color 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.set_color",
          "args": {
            "brightness": 0.1,
            "item_id": "itm_m1n2p3q4r5",
            "temperature": 0.3
          }
        }
      ]
    }
  }
}

As a batch file for the CLI

batch.json
[
  {
    "op": "clip.set_color",
    "args": {
      "brightness": 0.1,
      "item_id": "itm_m1n2p3q4r5",
      "temperature": 0.3
    }
  }
]
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.set_color",
      "args": {
        "brightness": 0.1,
        "item_id": "itm_m1n2p3q4r5",
        "temperature": 0.3
      }
    }
  ]
}'

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