Skip to content
Changelog

editor.command

Runs one of the Editor's commands, as its menu item or key would.

JSON-RPC 2.0project.write

Parameters

  • commandstringrequiredA command's id, from editor.commands.

Errors

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

Events

Subscribers to events get editor.changed.

From an AI agent

The MCP server's editor_command (action: run) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "editor.command",
"params": {}
}

editor.commands