Skip to content
Changelog

commands.execute

Runs Lightair's document commands as one undoable change.

JSON-RPC 2.0project.write

The commands are the ones Lightair's journal records; commands.list lists them with an example each. The change shows in Undo under the caller's name and label.

Parameters

  • commandsobject[]requiredThe commands, in order.
  • commandobjectOne command, instead of commands.
  • labelstringThe change's name in Undo. Default: the command's own, or "N changes".

Errors

Invalid params (-32602) without commands, for something that isn't a command, or when a command can't be done.

Events

Subscribers to events get workspace.changed.

From an AI agent

The MCP server's run_commands reaches this method.

Example

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

commands.list · history.undo