Delete nodes
delete_nodesDelete nodes from one group (a shot, story element, scene or the art direction), as deleting them on the canvas does: the nodes and their wires go, their @# tokens are taken out of the prompts and texts of the same group, uploaded images stay in the Library and generated images stay in the Generation Center.
Only nodes that were added to the group can be deleted: reference images, extra text nodes, generators someone added. The app's own nodes are protected and refused: the Story element node, pinned nodes (a story element's description), a shot's card and parameters, and the generators and outputs every group is set up with (a shot's panel, a reference sheet, a production reference, the Art Style text and image).
Only delete when the user explicitly asks. Call it without confirm first: nothing is deleted, and it returns a preview with each node (type, name, its wires, the group's nodes whose prompt loses its token, the nodes elsewhere that cite it, and why a protected one cannot go). Show the user the list and ask once, then call again with the same target and nodeIds and confirm: true. nodeIds come from get_group; never invent them. Max 25 per call.
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": {
"target": "<target>",
"nodeIds": "<nodeIds>",
"projectId": "<projectId>"
},
"name": "delete_nodes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | The group, e.g. { kind: "shot", id: shotId } for a shot's panel group, { kind: "story_element", id: entityId } for a reference sheet, { kind: "scene", id: sceneId } for a scene's Production group, { kind: "art_direction" }. | |
| confirm | No | Leave out to get a preview of what would change; nothing is changed. Ask the user to confirm it, then call again with confirm: true once they agree. | |
| nodeIds | Yes | Nodes of that group to delete (nodeId from get_group). | |
| projectId | Yes | ScreenWeaver project id (from list_projects). |