Insert operator at the active selection
insert_operator_at_selectionInsert a new operator atomically at the selected TouchDesigner node's downstream edge, preserving fan-out and providing rollback for safe network edits.
Instructions
Atomically insert one same-family operator on one deterministic downstream edge of the exactly selected/current TouchDesigner operator. Requires an exact editor-context compare-and-swap and an idempotency key; returns bounded before/after connector receipts, explicit non-overlapping placement and rollback state. Fan-out siblings and sibling inputs are preserved. Uses the authenticated structured bridge with ALLOW_EXEC=0; it never invokes raw Python, mouse-interactive placeOPs, or implicit pane selection.
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": {
"type": "<type>",
"expected_context": "<expected_context>",
"idempotency_key": "<idempotency_key>"
},
"name": "insert_operator_at_selection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional valid TouchDesigner operator name; TD generates one when omitted. | |
| type | Yes | Live-creatable same-family TouchDesigner operator type, e.g. nullTOP. | |
| parameters | No | At most 64 bounded JSON parameter values applied only to the new operator. | |
| idempotency_key | Yes | Opaque retry key; exact retries replay and conflicting payloads fail closed. | |
| expected_context | Yes | Exact active Network Editor owner/current/single-selection snapshot to compare immediately before mutation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | ||
| after | Yes | ||
| before | Yes | ||
| status | Yes | ||
| context | Yes | ||
| rollback | Yes | ||
| warnings | Yes | ||
| undo_label | No | ||
| idempotency_key | Yes |