database edit collection
database_edit_collectionEdit nested RPG Maker MZ database collections such as traits, effects, and actions using typed add, update, remove, or move operations. Preview first and set apply=true to commit a clean change set.
Instructions
Edit a nested collection (traits, effects, learnings, actions, dropItems, members, flashTimings, soundTimings) with typed ops: {op:"add", entry, index?} | {op:"update", index, entry (partial), fingerprint?} | {op:"remove", index, fingerprint?} | {op:"move", from, to}. update/remove/move need expectedRevision (collections..revision from database_get_record). Trait/effect codes and dataIds accept labels (e.g. code "State Resist", dataId "Poison").
Preview-first: returns a change set (normalized + native diff, validation incl. reverse references). Pass apply=true to commit immediately when the preview is clean.
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": {
"category": "<category>",
"id": "<id>",
"collection": "<collection>",
"ops": "<ops>"
},
"name": "database_edit_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| ops | Yes | ||
| apply | No | Commit right after a successful preview (non-destructive operations only; needs --allow-write; warnings also need acknowledgeWarnings). Default false = preview only. | |
| category | Yes | Database category | |
| collection | Yes | ||
| allowScript | No | true ONLY if the user explicitly asked to insert JavaScript (script commands, script conditions/operands, route scripts). | |
| description | No | Optional description stored in the transaction log | |
| expectedRevision | No | ||
| acknowledgeWarnings | No | Accept validation warnings when apply=true. Review them with the user first. |