# track.update

> Sets a track's name, flags (hidden, muted, locked, solo, magnet) or volume.

Source: https://stuarty.com/docs/mcp/tools/edit/track.update/

Sets the given fields. hidden applies to visual tracks, the others to both kinds. locked refuses every edit of the items of the track (E_INVALID_STATE) until it is unlocked. solo plays only the soloed tracks: the picture of visual tracks when one is solo, and the sound of every track. volume is a factor from 0 to 4 on the volume of the items of the track; 1 clears it. magnet packs the items of the track from frame 0 with no gap, now and after every later edit (a locked track is not repacked).

## Arguments

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `hidden` | `boolean` | no | Visual tracks only. |
| `locked` | `boolean` | no | True refuses every edit of the items of the track until it is false again. |
| `magnet` | `boolean` | no | True keeps the items of the track packed from frame 0 with no gap, closing the gaps now and after every edit. |
| `muted` | `boolean` | no |  |
| `name` | `string` | no | The track name; "" clears it.; max length 60 |
| `solo` | `boolean` | no | True plays only the soloed tracks (the picture of visual tracks, the sound of all). |
| `track_id` | `string` | yes | pattern `^trk_[0123456789abcdefghjkmnpqrstvwxyz]{10}$` |
| `volume` | `number` | no | Factor on the volume of the items of the track, 0 to 4; 1 is neutral.; min 0; max 4 |

## Errors

- [`E_VALIDATION`](/docs/reference/error-codes#e_validation)
- [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found)
- [`E_TYPE_MISMATCH`](/docs/reference/error-codes#e_type_mismatch)

## Scope

Scope `edit`. The scope is the one an API key needs in network mode. Run `stuarty command:help track.update` 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": "track.update",
          "args": {
            "hidden": true,
            "track_id": "trk_f6g7h8j9k0"
          }
        }
      ]
    }
  }
}
```

**As a batch file for the CLI**

```json
[
  {
    "op": "track.update",
    "args": {
      "hidden": true,
      "track_id": "trk_f6g7h8j9k0"
    }
  }
]
```

```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": "track.update",
      "args": {
        "hidden": true,
        "track_id": "trk_f6g7h8j9k0"
      }
    }
  ]
}'
```

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