edit_sequence_graph
Restructure an existing email sequence graph by moving, duplicating, deleting, or replacing nodes and edges with the current graph revision to preserve live-flow integrity.
Instructions
Restructure an existing sequence graph using node IDs, edges, and graphRevision from get_sequence. move_node repositions one non-split step; duplicate_node creates an independent copy; delete_node safely splices a node and immediately moves parked recipients to its unique surviving successor (or completes them when none remains); replace_edges replaces the complete topology. The returned sequence reports migratedRecipientCount and completedRecipientCount. Always call get_sequence immediately before this tool and pass its graphRevision. Active sequences require confirmStructuralChange:true after the user confirms live-flow impact.
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": {
"sequenceId": "<sequenceId>",
"action": "<action>",
"graphRevision": "<graphRevision>"
},
"name": "edit_sequence_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edges | No | Complete replacement topology from get_sequence.sequence.edges. The returned edge array is already normalized for this input and can be reused directly. Required for replace_edges and when deleting a split node. Preserve each branch edge's condition.branchId. Do not include edges that reference a deleted node. | |
| action | Yes | Graph operation. | |
| nodeId | No | Existing node to move, duplicate, or delete. Unused by replace_edges. | |
| companyId | No | Company ID. If not provided, uses the currently selected company. | |
| sequenceId | Yes | Sequence ID. | |
| afterNodeId | No | For move_node or duplicate_node, insert immediately after this node. The target must have at most one outgoing path. Provide exactly one of afterNodeId or beforeNodeId. | |
| beforeNodeId | No | For move_node or duplicate_node, insert immediately before this node. All incoming paths converge through the moved/copied node, which is useful for placing a step below a branch. Provide exactly one of beforeNodeId or afterNodeId. | |
| graphRevision | Yes | Exact graphRevision returned by the latest get_sequence call. The edit is rejected if the graph changed since then. | |
| confirmStructuralChange | No | Set true only after the user explicitly confirms a structural edit to an active sequence. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Primary dashboard URL for this result. | |
| note | No | Additional context about the result. | |
| items | No | Fallback array wrapper used only when a tool returns a bare array. | |
| value | No | Fallback object wrapper used only when a tool returns a non-object value. | |
| appUrls | No | Dashboard URLs for relevant Sequenzy resources. | |
| message | No | Human-readable status, confirmation, or next-step message. | |
| success | No | Whether the Sequenzy operation succeeded. | |
| sequence | No | The sequence record returned by Sequenzy. Run state: branch on effectiveStatus (draft, live, enrollment_paused, paused, or archived) rather than on status, which reads `active` even when new enrollments are paused. acceptsNewEnrollments and processesExistingEnrollments answer the two questions behind it, and effectiveStatusSummary is a plain-language sentence. The legacy triggerConfig.active flag is not read by the runtime; it is reported as a mirror of acceptsNewEnrollments. Email numbering: emails[].stepNumber and nodes[].config.stepNumber are legacy stored ordinals retained for compatibility. Prefer emails[].structuralStepNumber and nodes[].structuralStepNumber when explaining the visible sequence position. Structural numbers are graph-derived; emails in parallel branches intentionally share a depth. Sequences use sendingWindow for allowed local hours/days; they do not have Send Time Optimization. frequencyCapEnabled is true when email steps respect the company frequency cap (get_frequency_cap): contacts already at the cap skip the step. activeSubscribersOnly is true when only active contacts enter; when false, unsubscribed and bounced contacts still enter and only their marketing emails are skipped. STO is per-campaign (list_campaigns / get_campaign sendTimeOptimization). | |
| warnings | No | Non-fatal cautions about content, permissions, or follow-up actions. | |
| settingsUrl | No | Company settings URL when available. | |
| subscriptionUrl | No | Owner-facing subscription, upgrade, and billing-management URL when available. |