Merge story elements
merge_entitiesMerge two story elements that are the same character, place or object: everything that points at the duplicate (fromEntityId) moves onto the element kept (intoEntityId), then the duplicate is deleted as delete_entities would.
What moves: the script lines linked to the duplicate (character cues and their dialogue, scene headings), which also take the kept name, and unlinked cues or headings that name the duplicate; the shots and prompts that cite it (@# tokens and mentions), which then cite the kept element. What goes: the duplicate itself, with its description, moodboard and reference sheet (generated images stay in the Library). The kept element's own name, description and sheet do not change.
Only merge when the user asks or agrees. Call it without confirm first: nothing changes, and it returns a preview (both elements, how many script lines and references move, which shots). Ask the user once, then call again with the same ids and confirm: true. Both must be the same kind; ids come from list_entities.
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": {
"fromEntityId": "<fromEntityId>",
"intoEntityId": "<intoEntityId>",
"projectId": "<projectId>"
},
"name": "merge_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. | |
| projectId | Yes | ScreenWeaver project id (from list_projects). | |
| fromEntityId | Yes | The duplicate: its links move to intoEntityId, then it is deleted. | |
| intoEntityId | Yes | The story element kept. |