# scene.switch

Source: https://docs.lightair.app/developers/remote-api/scene.switch

> Puts a scene on air as the program.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Scenes. It changes what viewers see or hear. Script plugins need the `project.write` permission.

The switch plays the scene's own transition, or the workspace's. With studio mode off, the scene is also selected in the window; with it on, the staged scene stays as it is.

An AI agent connected over MCP asks the person first while Lightair is live, unless **AI agents may go live without asking** is on in **Settings › Remote API**. Other clients aren't asked.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `scene` | `string` | yes | The scene's id or name. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | `string` | no | The scene's id. |
| `name` | `string` | no | The scene's name. |

## Errors

Not found (-32004) when no scene has that id or name.

## Events

- `scene.program`

## From an AI agent

The MCP server's `switch_scene` reaches this method. Because it changes what viewers see or hear, Lightair can ask the person first.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "scene.switch", "params": { "scene": "Main" } }
```

Result:

```json
{ "id": "019ad3f2-6c1e-7a40-9b52-3f1d2e8c4a10", "name": "Main" }
```

## Related

- [scene.create](https://docs.lightair.app/developers/remote-api/scene.create.md)
- [staging.take](https://docs.lightair.app/developers/remote-api/staging.take.md)
- [transition.set](https://docs.lightair.app/developers/remote-api/transition.set.md)
