Editing Workflows
Это содержимое пока не доступно на вашем языке.
Editing Methods
Section titled “Editing Methods”Via MCP Tools
Section titled “Via MCP Tools”Use the manage tool with edit action:
mcp__moira__manage({ action: "edit", workflowId: "my-workflow", changes: { // changes go here },});Via workflow-management-flow
Section titled “Via workflow-management-flow”Start the management workflow:
mcp__moira__start({ workflowId: "workflow-management-flow",});Select “edit” when prompted for action.
Change Types
Section titled “Change Types”Update Metadata
Section titled “Update Metadata”mcp__moira__manage({ action: "edit", workflowId: "my-workflow", changes: { metadata: { version: "2.0.0", description: "Updated description", }, },});Update Node Content
Section titled “Update Node Content”mcp__moira__manage({ action: "edit", workflowId: "my-workflow", changes: { updateNodes: [ { nodeId: "task-node", changes: { directive: "New directive text", completionCondition: "New condition", }, }, ], },});Add Nodes
Section titled “Add Nodes”mcp__moira__manage({ action: "edit", workflowId: "my-workflow", changes: { addNodes: [ { type: "agent-directive", id: "new-node", directive: "New task", completionCondition: "Task complete", connections: { success: "existing-node" }, }, ], },});Remove Nodes
Section titled “Remove Nodes”mcp__moira__manage({ action: "edit", workflowId: "my-workflow", changes: { removeNodes: ["node-to-remove"], },});Safe Editing Process
Section titled “Safe Editing Process”Get current structure
mcp__moira__manage({action: "get-structure",workflowId: "my-workflow"})Find nodes to edit
mcp__moira__manage({action: "search-nodes",workflowId: "my-workflow",query: "search term",});Get node details
mcp__moira__manage({action: "get-node",workflowId: "my-workflow",nodeId: "node-id",});Apply changes
mcp__moira__manage({action: "edit",workflowId: "my-workflow",changes: {/* ... */},});Validate
mcp__moira__manage({action: "validate",workflowId: "my-workflow",});
Updating Connections
Section titled “Updating Connections”Single Connection Update
Section titled “Single Connection Update”{ updateNodes: [ { nodeId: "source-node", changes: { connections: { success: "new-target-node", }, }, }, ];}Condition Node Connections
Section titled “Condition Node Connections”{ updateNodes: [ { nodeId: "condition-node", changes: { connections: { true: "when-true-node", false: "when-false-node", }, }, }, ];}Version Control
Section titled “Version Control”Increment Version
Section titled “Increment Version”Always update version when making changes:
{ metadata: { version: "1.1.0"; // was 1.0.0 }}Version semantics:
- Major (2.0.0): Breaking changes, restructured flow
- Minor (1.1.0): New features, new nodes
- Patch (1.0.1): Bug fixes, text corrections
Compare Versions
Section titled “Compare Versions”mcp__moira__manage({ action: "diff", workflowId: "my-workflow", compareWorkflowId: "my-workflow-old",});Common Edits
Section titled “Common Edits”Fix Typo in Directive
Section titled “Fix Typo in Directive”{ updateNodes: [ { nodeId: "task-node", changes: { directive: "Corrected directive text", }, }, ];}Add Required Field to InputSchema
Section titled “Add Required Field to InputSchema”{ updateNodes: [ { nodeId: "input-node", changes: { inputSchema: { type: "object", properties: { existing_field: { type: "string" }, new_field: { type: "string" }, // added }, required: ["existing_field", "new_field"], // updated }, }, }, ];}Insert Node in Flow
Section titled “Insert Node in Flow”{ addNodes: [ { type: "agent-directive", id: "inserted-node", directive: "New step", connections: { success: "original-target" } } ], updateNodes: [ { nodeId: "original-source", changes: { connections: { success: "inserted-node" } } } ]}Validation Errors
Section titled “Validation Errors”Missing Connection Target
Section titled “Missing Connection Target”Error: Node 'task-1' connection target 'missing-node' not foundFix: Update connection to valid node ID.
Orphaned Node
Section titled “Orphaned Node”Warning: Node 'orphan-node' is not reachable from startFix: Add connection from another node or remove orphaned node.
Invalid Node Type
Section titled “Invalid Node Type”Error: Unknown node type 'custom-type'Fix: Use valid types: start, end, agent-directive, condition, expression, telegram-notification, subgraph.
See Also
Section titled “See Also”- Creating Workflows - Building new workflows
- MCP Tools - Tool reference