upsert_datatable_rows
Create or update DataTable rows in the active mod, then call save_all to persist the changes.
Instructions
Create or update rows in the active mod. Call save_all afterwards.
Mods add one asset per row, stored at //DataTables//<row_name>. Each entry is {"row_name": str, "override_existing_row": bool, "values": {...}}, with values in the snake_case form that read_asset returns.
Fields left out of a new row keep struct defaults, not vanilla values. To change part of a vanilla row, use clone_row with override_existing_row=True and the same row name, then set only what differs. When a row refers to another row in this mod, use <mod_prefix>_<row_name> (see editor_status).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"row_asset_class": "<row_asset_class>",
"table": "<table>",
"rows": "<rows>"
},
"name": "upsert_datatable_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| table | Yes | ||
| row_asset_class | Yes |