modx_bulk_resources
Apply publish, unpublish, set-template, move, or delete operations to many MODX resources by IDs or filters; preview changes with dry-run before applying.
Instructions
Apply ONE operation to many resources at once: publish, unpublish, set_template (needs template), move (needs parent_to and/or context_to), or delete. Select targets by explicit ids OR by a parent/context/query filter. ALWAYS run dry_run:true FIRST — it reports the change per resource (and child-resource counts for delete) without applying. Changes go through the core resource processors (correct URI/events). Note: delete is a soft delete (moves resources to the MODX trash, recoverable), matching the manager.
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": {
"operation": "<operation>"
},
"name": "modx_bulk_resources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | Explicit resource ids (preferred). | |
| limit | No | Max resources to touch (default 200). | |
| query | No | Filter: pagetitle/alias/uri substring. | |
| parent | No | Filter: select children of this parent id. | |
| context | No | Filter: context key. | |
| dry_run | No | Preview the change per resource without applying. Do this first. | |
| template | No | For set_template: the new template id. Use 0 to assign no template (MODX empty template). | |
| operation | Yes | ||
| parent_to | No | For move: the new parent id. | |
| context_to | No | For move: the new context key. |