Delete story elements
delete_entitiesDelete story elements (characters, places, objects), exactly as deleting them in the Story elements panel does: the element, its moodboard, reference sheet and production group go, uploaded images on it are removed, and generated images stay in the Library. Shots that cite it keep their text but lose the reference.
Only delete when the user explicitly asks for it. Call it without confirm first: nothing is deleted, and it returns a preview with each element (name, whether it has a reference sheet, how many script lines use it, which shots cite it). Show the user that list and ask once. Only after the user agrees, call again with the same entityIds and confirm: true. It cannot be undone.
Like the app, it refuses an element the script still uses (a character with cues, a place with scene headings, an object named in the script). When the element is a duplicate of another, use merge_entities instead: it moves the script lines and shot references onto the element kept, then deletes the duplicate. entityIds come from list_entities; never invent them. Max 20 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": {
"entityIds": "<entityIds>",
"projectId": "<projectId>"
},
"name": "delete_entities"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| entityIds | Yes | Story elements to delete (entityId from list_entities). | |
| projectId | Yes | ScreenWeaver project id (from list_projects). |