update_global_source_elements
Batch update multiple elements in a global source: preview per-element diffs with dry_run=true, get user confirmation, then apply with dry_run=false.
Instructions
Batch update multiple elements in one global source. Two-step process: STEP 1: Call with dry_run=true (default) → returns per-element diff. STEP 2: Show all diffs to the user and ask for confirmation. NEVER proceed without explicit user approval. STEP 3: Only after user confirms, call again with dry_run=false to apply. IMPORTANT: You MUST show the diff to the user and get explicit "yes/ok/confirm" before calling with dry_run=false. Skipping confirmation risks data loss. Same merge rules: style/config/specials = shallow merge, events/bindings = replace.
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": {
"global_source_id": "<global_source_id>",
"updates": "<updates>"
},
"name": "update_global_source_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview only (true) or apply changes (false). Defaults to confirm_mode setting. | |
| updates | Yes | Array of element updates | |
| component | No | Component hint for faster lookup | |
| allow_shrink | No | Allow the source to shrink by more than half: set it when native elements replaced an oversized embed or custom_css and you have read it first. | |
| global_source_id | Yes | Global source ID |