# deck.set

Source: https://docs.lightair.app/developers/remote-api/deck.set

> Saves new pages for the Stream Deck that Lightair Live shows, if nobody changed it since you read it.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: App and state. Script plugins need the `project.write` permission.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `pages` | `object[]` | yes | The deck's pages. |
| `base_version` | `number` | yes | The version you read with deck.get. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `version` | `number` | no | The new version. |

## Errors

A state error (-32005) when `base_version` isn't the current version: the deck changed on another device, so read it again. Invalid params (-32602) without `pages`.

## Events

- `deck.changed`

## From an AI agent

The MCP server's `stream_deck (action: set)` reaches this method.

## Related

- [deck.get](https://docs.lightair.app/developers/remote-api/deck.get.md)
