Перейти к содержимому

Editing Workflows

Это содержимое пока не доступно на вашем языке.

Use the manage tool with edit action:

mcp__moira__manage({
action: "edit",
workflowId: "my-workflow",
changes: {
// changes go here
},
});

Start the management workflow:

mcp__moira__start({
workflowId: "workflow-management-flow",
});

Select “edit” when prompted for action.

mcp__moira__manage({
action: "edit",
workflowId: "my-workflow",
changes: {
metadata: {
version: "2.0.0",
description: "Updated description",
},
},
});
mcp__moira__manage({
action: "edit",
workflowId: "my-workflow",
changes: {
updateNodes: [
{
nodeId: "task-node",
changes: {
directive: "New directive text",
completionCondition: "New condition",
},
},
],
},
});
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" },
},
],
},
});
mcp__moira__manage({
action: "edit",
workflowId: "my-workflow",
changes: {
removeNodes: ["node-to-remove"],
},
});
  1. Get current structure

    mcp__moira__manage({
    action: "get-structure",
    workflowId: "my-workflow"
    })
  2. Find nodes to edit

    mcp__moira__manage({
    action: "search-nodes",
    workflowId: "my-workflow",
    query: "search term",
    });
  3. Get node details

    mcp__moira__manage({
    action: "get-node",
    workflowId: "my-workflow",
    nodeId: "node-id",
    });
  4. Apply changes

    mcp__moira__manage({
    action: "edit",
    workflowId: "my-workflow",
    changes: {
    /* ... */
    },
    });
  5. Validate

    mcp__moira__manage({
    action: "validate",
    workflowId: "my-workflow",
    });
{
updateNodes: [
{
nodeId: "source-node",
changes: {
connections: {
success: "new-target-node",
},
},
},
];
}
{
updateNodes: [
{
nodeId: "condition-node",
changes: {
connections: {
true: "when-true-node",
false: "when-false-node",
},
},
},
];
}

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
mcp__moira__manage({
action: "diff",
workflowId: "my-workflow",
compareWorkflowId: "my-workflow-old",
});
{
updateNodes: [
{
nodeId: "task-node",
changes: {
directive: "Corrected directive text",
},
},
];
}
{
updateNodes: [
{
nodeId: "input-node",
changes: {
inputSchema: {
type: "object",
properties: {
existing_field: { type: "string" },
new_field: { type: "string" }, // added
},
required: ["existing_field", "new_field"], // updated
},
},
},
];
}
{
addNodes: [
{
type: "agent-directive",
id: "inserted-node",
directive: "New step",
connections: { success: "original-target" }
}
],
updateNodes: [
{
nodeId: "original-source",
changes: {
connections: { success: "inserted-node" }
}
}
]
}
Error: Node 'task-1' connection target 'missing-node' not found

Fix: Update connection to valid node ID.

Warning: Node 'orphan-node' is not reachable from start

Fix: Add connection from another node or remove orphaned node.

Error: Unknown node type 'custom-type'

Fix: Use valid types: start, end, agent-directive, condition, expression, telegram-notification, subgraph.