Many writes, one transaction
data_batchBatch multiple data operations (add, update, move, delete) into one atomic transaction. Up to 200 commands execute together, with all-or-nothing rollback on failure.
Instructions
Apply up to 200 writes in ONE transaction — for seeding an app from what you already know, or filling a board in one go, instead of one call per row. Each command is exactly what you would send to data_add_item / data_update_item / data_move_item / data_delete_item, as {type, ...args}: type is add_item | update_item | move_item | delete_item. All or nothing: the first failure rolls back everything and names which command failed. The reply is one line per command ({id, seq}) — not the rows, which you already have.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | ||
| commands | Yes | [{type: "add_item", collection, fields, group?}, {type: "update_item", id, fields}, …] — same arguments as the single-write tools | |
| command_id | Yes | idempotency key — generate a fresh uuid per action |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| eot | No | ||
| seq | No | the batch's last ledger position — pass it to data_changes as `since` | |
| note | No | ||
| count | No | ||
| reason | No | ||
| preview | No | ||
| results | No | ||
| expires_at | No | ||
| failed_index | No | ||
| request_state | No |