Skip to main content
Glama
Sequenzy MCP Server

Sequenzy MCP Server

Official
by Sequenzy

edit_sequence_graph

Destructive

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

NameRequiredDescriptionDefault
edgesNoComplete 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.
actionYesGraph operation.
nodeIdNoExisting node to move, duplicate, or delete. Unused by replace_edges.
companyIdNoCompany ID. If not provided, uses the currently selected company.
sequenceIdYesSequence ID.
afterNodeIdNoFor 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.
beforeNodeIdNoFor 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.
graphRevisionYesExact graphRevision returned by the latest get_sequence call. The edit is rejected if the graph changed since then.
confirmStructuralChangeNoSet true only after the user explicitly confirms a structural edit to an active sequence.

Output Schema

NameRequiredDescriptionDefault
urlNoPrimary dashboard URL for this result.
noteNoAdditional context about the result.
itemsNoFallback array wrapper used only when a tool returns a bare array.
valueNoFallback object wrapper used only when a tool returns a non-object value.
appUrlsNoDashboard URLs for relevant Sequenzy resources.
messageNoHuman-readable status, confirmation, or next-step message.
successNoWhether the Sequenzy operation succeeded.
sequenceNoThe 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).
warningsNoNon-fatal cautions about content, permissions, or follow-up actions.
settingsUrlNoCompany settings URL when available.
subscriptionUrlNoOwner-facing subscription, upgrade, and billing-management URL when available.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true, openWorldHint=true, and idempotentHint=false, so safety is largely covered structurally. The description still earns credit for disclosing what destruction means concretely — parked recipients are migrated or completed, and the return reports migratedRecipientCount/completedRecipientCount — plus stale-revision rejection. It does not explain partial-failure behavior or rollback, keeping it at a solid 3 rather than higher.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then four compact per-action clauses, then the returned counts and the sequencing/confirmation rules. Dense but each sentence carries information; minor redundancy exists where 'Complete replacement topology from get_sequence' echoes the edges schema text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the full calling contract for a destructive, revision-guarded mutation: fetch-then-edit ordering, required confirmStructuralChange after user confirmation, per-action semantics, and recipient-migration outcomes. With an output schema present, nothing essential is left for the agent to guess.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema descriptions are already detailed (afterNodeId/beforeNodeId mutually exclusive, edges preserved from get_sequence). The description adds meaning only for graphRevision staleness and edges being required for replace_edges/a split-node delete, most of which the schema also states. Baseline 3 fits when the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Restructure an existing sequence graph') and immediately enumerates the four distinct operations (move_node, duplicate_node, delete_node, replace_edges) with a one-line semantic for each. An agent can distinguish this graph-topology editor from step-insertion or email-editing siblings without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit prerequisite workflow ('Always call get_sequence immediately before this tool and pass its graphRevision') and a gated confirmation rule for active sequences. It also constrains move_node to 'one non-split step'. It stops short of naming the sibling to use instead for non-graph edits, so the alternative-routing is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools