# editor.canvases.delete

Source: https://docs.lightair.app/developers/remote-api/editor.canvases.delete

> Deletes a canvas from the open project; a project keeps at least one.

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

An AI agent connected over MCP asks the person first, unless **AI agents may go live without asking** is on in **Settings › Remote API**.

## Parameters

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

## Errors

Not found (-32004) for an unknown canvas. A state error (-32005) for the last canvas. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it.

## Events

- `editor.changed`

## From an AI agent

The MCP server's `delete_editor_canvas` reaches this method.

## Related

- [editor.canvases.list](https://docs.lightair.app/developers/remote-api/editor.canvases.list.md)
