# settings.set

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

Source: https://stuarty.com/docs/mcp/tools/edit/settings.set/

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

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `background` | `string` | no | A hex colour, $name from template.colors, or transparent (no background colour; formats with alpha keep it). |
| `height` | `integer` | no | Frame height in pixels; even.; min 16; max 4096 |
| `loudness_target` | `number` | no | Integrated loudness target in LUFS.; min -30; max -5 |
| `width` | `integer` | no | Frame width in pixels; even.; min 16; max 4096 |

## Errors

- [`E_VALIDATION`](/docs/reference/error-codes#e_validation)

## 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`](/docs/mcp/tools/command_help) tool.

## Next steps

- [The edit tool](/docs/mcp/tools/edit)
- [Batches, revisions and idempotency](/docs/agents/batches)

**As an MCP call**

```json
{
  "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**

```json
[
  {
    "op": "settings.set",
    "args": {
      "height": 1280,
      "width": 720
    }
  }
]
```

```bash
stuarty edit --project prj_7k2m9x4q1b --ops batch.json --json
```

**Over HTTP**

```bash
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`.
