@centrali-io/centrali-mcp 4.2.10 → 4.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/describe.js +76 -13
- package/dist/tools/orchestrations.js +1 -1
- package/package.json +1 -1
- package/src/tools/describe.ts +76 -15
- package/src/tools/orchestrations.ts +1 -1
package/dist/tools/describe.js
CHANGED
|
@@ -621,14 +621,58 @@ function registerDescribeTools(server) {
|
|
|
621
621
|
status: "'draft' | 'active' | 'paused'",
|
|
622
622
|
steps: "OrchestrationStep[] — ordered array of step definitions",
|
|
623
623
|
},
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
624
|
+
step_types: {
|
|
625
|
+
compute: {
|
|
626
|
+
description: "Execute a compute function",
|
|
627
|
+
shape: {
|
|
628
|
+
id: "string — unique step identifier",
|
|
629
|
+
type: "'compute'",
|
|
630
|
+
functionId: "UUID — the compute function to execute",
|
|
631
|
+
inputMapping: "object | null — maps data from previous step outputs or orchestration input to this step's input",
|
|
632
|
+
onSuccess: "{ nextStepId: string } — step to execute on success",
|
|
633
|
+
onFailure: "{ nextStepId: string } | null — step to execute on failure",
|
|
634
|
+
retryConfig: "{ maxRetries, delayMs } | null — automatic retry on failure",
|
|
635
|
+
timeoutMs: "number | null — step execution timeout",
|
|
636
|
+
},
|
|
637
|
+
},
|
|
638
|
+
decision: {
|
|
639
|
+
description: "Conditional branching based on input/output values",
|
|
640
|
+
shape: {
|
|
641
|
+
id: "string — unique step identifier",
|
|
642
|
+
type: "'decision'",
|
|
643
|
+
cases: "DecisionCase[] — evaluated in order, first match wins",
|
|
644
|
+
defaultNextStepId: "string — step to execute if no case matches (required)",
|
|
645
|
+
},
|
|
646
|
+
decision_case_shape: {
|
|
647
|
+
conditions: "Condition[] — all must match (AND logic)",
|
|
648
|
+
nextStepId: "string — step to execute if this case matches",
|
|
649
|
+
},
|
|
650
|
+
condition_shape: {
|
|
651
|
+
path: "string — dot-notation path to the value (e.g., 'input.status', 'steps.validate.output.approved')",
|
|
652
|
+
op: "'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'in' | 'not_in'",
|
|
653
|
+
value: "any — the value to compare against (string, number, boolean, or array for in/not_in)",
|
|
654
|
+
},
|
|
655
|
+
example: {
|
|
656
|
+
id: "check-approval",
|
|
657
|
+
type: "decision",
|
|
658
|
+
cases: [
|
|
659
|
+
{
|
|
660
|
+
conditions: [{ path: "input.allApproved", op: "eq", value: true }],
|
|
661
|
+
nextStepId: "execute",
|
|
662
|
+
},
|
|
663
|
+
],
|
|
664
|
+
defaultNextStepId: "notify-rejection",
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
delay: {
|
|
668
|
+
description: "Wait for a specified duration before continuing",
|
|
669
|
+
shape: {
|
|
670
|
+
id: "string — unique step identifier",
|
|
671
|
+
type: "'delay'",
|
|
672
|
+
delayMs: "number — milliseconds to wait",
|
|
673
|
+
nextStepId: "string — step to execute after the delay",
|
|
674
|
+
},
|
|
675
|
+
},
|
|
632
676
|
},
|
|
633
677
|
run_shape: {
|
|
634
678
|
id: "UUID",
|
|
@@ -655,11 +699,30 @@ function registerDescribeTools(server) {
|
|
|
655
699
|
required_params: ["slug", "name", "trigger", "steps"],
|
|
656
700
|
optional_params: ["description"],
|
|
657
701
|
trigger_example: { type: "on-demand" },
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
702
|
+
step_examples: {
|
|
703
|
+
compute_step: {
|
|
704
|
+
id: "validate",
|
|
705
|
+
type: "compute",
|
|
706
|
+
functionId: "func-uuid",
|
|
707
|
+
onSuccess: { nextStepId: "check-result" },
|
|
708
|
+
},
|
|
709
|
+
decision_step: {
|
|
710
|
+
id: "check-result",
|
|
711
|
+
type: "decision",
|
|
712
|
+
cases: [
|
|
713
|
+
{
|
|
714
|
+
conditions: [{ path: "steps.validate.output.approved", op: "eq", value: true }],
|
|
715
|
+
nextStepId: "process",
|
|
716
|
+
},
|
|
717
|
+
],
|
|
718
|
+
defaultNextStepId: "notify-rejection",
|
|
719
|
+
},
|
|
720
|
+
delay_step: {
|
|
721
|
+
id: "wait-before-retry",
|
|
722
|
+
type: "delay",
|
|
723
|
+
delayMs: 5000,
|
|
724
|
+
nextStepId: "retry",
|
|
725
|
+
},
|
|
663
726
|
},
|
|
664
727
|
},
|
|
665
728
|
update_orchestration: {
|
|
@@ -188,7 +188,7 @@ function registerOrchestrationTools(server, sdk) {
|
|
|
188
188
|
.describe("Trigger configuration object. Must include 'type' (on-demand, event-driven, scheduled, webhook)"),
|
|
189
189
|
steps: zod_1.z
|
|
190
190
|
.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any()))
|
|
191
|
-
.describe("Array of step definitions.
|
|
191
|
+
.describe("Array of step definitions. Step types: 'compute' (functionId + onSuccess/onFailure), 'decision' (cases with conditions using path/op/value + defaultNextStepId), 'delay' (delayMs + nextStepId). Call describe_orchestrations for full schema."),
|
|
192
192
|
}, (_a) => __awaiter(this, [_a], void 0, function* ({ slug, name, description, trigger, steps }) {
|
|
193
193
|
try {
|
|
194
194
|
const input = { slug, name, trigger, steps };
|
package/package.json
CHANGED
package/src/tools/describe.ts
CHANGED
|
@@ -714,16 +714,58 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
714
714
|
status: "'draft' | 'active' | 'paused'",
|
|
715
715
|
steps: "OrchestrationStep[] — ordered array of step definitions",
|
|
716
716
|
},
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
717
|
+
step_types: {
|
|
718
|
+
compute: {
|
|
719
|
+
description: "Execute a compute function",
|
|
720
|
+
shape: {
|
|
721
|
+
id: "string — unique step identifier",
|
|
722
|
+
type: "'compute'",
|
|
723
|
+
functionId: "UUID — the compute function to execute",
|
|
724
|
+
inputMapping: "object | null — maps data from previous step outputs or orchestration input to this step's input",
|
|
725
|
+
onSuccess: "{ nextStepId: string } — step to execute on success",
|
|
726
|
+
onFailure: "{ nextStepId: string } | null — step to execute on failure",
|
|
727
|
+
retryConfig: "{ maxRetries, delayMs } | null — automatic retry on failure",
|
|
728
|
+
timeoutMs: "number | null — step execution timeout",
|
|
729
|
+
},
|
|
730
|
+
},
|
|
731
|
+
decision: {
|
|
732
|
+
description: "Conditional branching based on input/output values",
|
|
733
|
+
shape: {
|
|
734
|
+
id: "string — unique step identifier",
|
|
735
|
+
type: "'decision'",
|
|
736
|
+
cases: "DecisionCase[] — evaluated in order, first match wins",
|
|
737
|
+
defaultNextStepId: "string — step to execute if no case matches (required)",
|
|
738
|
+
},
|
|
739
|
+
decision_case_shape: {
|
|
740
|
+
conditions: "Condition[] — all must match (AND logic)",
|
|
741
|
+
nextStepId: "string — step to execute if this case matches",
|
|
742
|
+
},
|
|
743
|
+
condition_shape: {
|
|
744
|
+
path: "string — dot-notation path to the value (e.g., 'input.status', 'steps.validate.output.approved')",
|
|
745
|
+
op: "'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'in' | 'not_in'",
|
|
746
|
+
value: "any — the value to compare against (string, number, boolean, or array for in/not_in)",
|
|
747
|
+
},
|
|
748
|
+
example: {
|
|
749
|
+
id: "check-approval",
|
|
750
|
+
type: "decision",
|
|
751
|
+
cases: [
|
|
752
|
+
{
|
|
753
|
+
conditions: [{ path: "input.allApproved", op: "eq", value: true }],
|
|
754
|
+
nextStepId: "execute",
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
defaultNextStepId: "notify-rejection",
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
delay: {
|
|
761
|
+
description: "Wait for a specified duration before continuing",
|
|
762
|
+
shape: {
|
|
763
|
+
id: "string — unique step identifier",
|
|
764
|
+
type: "'delay'",
|
|
765
|
+
delayMs: "number — milliseconds to wait",
|
|
766
|
+
nextStepId: "string — step to execute after the delay",
|
|
767
|
+
},
|
|
768
|
+
},
|
|
727
769
|
},
|
|
728
770
|
run_shape: {
|
|
729
771
|
id: "UUID",
|
|
@@ -750,11 +792,30 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
750
792
|
required_params: ["slug", "name", "trigger", "steps"],
|
|
751
793
|
optional_params: ["description"],
|
|
752
794
|
trigger_example: { type: "on-demand" },
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
795
|
+
step_examples: {
|
|
796
|
+
compute_step: {
|
|
797
|
+
id: "validate",
|
|
798
|
+
type: "compute",
|
|
799
|
+
functionId: "func-uuid",
|
|
800
|
+
onSuccess: { nextStepId: "check-result" },
|
|
801
|
+
},
|
|
802
|
+
decision_step: {
|
|
803
|
+
id: "check-result",
|
|
804
|
+
type: "decision",
|
|
805
|
+
cases: [
|
|
806
|
+
{
|
|
807
|
+
conditions: [{ path: "steps.validate.output.approved", op: "eq", value: true }],
|
|
808
|
+
nextStepId: "process",
|
|
809
|
+
},
|
|
810
|
+
],
|
|
811
|
+
defaultNextStepId: "notify-rejection",
|
|
812
|
+
},
|
|
813
|
+
delay_step: {
|
|
814
|
+
id: "wait-before-retry",
|
|
815
|
+
type: "delay",
|
|
816
|
+
delayMs: 5000,
|
|
817
|
+
nextStepId: "retry",
|
|
818
|
+
},
|
|
758
819
|
},
|
|
759
820
|
},
|
|
760
821
|
update_orchestration: {
|
|
@@ -219,7 +219,7 @@ export function registerOrchestrationTools(server: McpServer, sdk: CentraliSDK)
|
|
|
219
219
|
.describe("Trigger configuration object. Must include 'type' (on-demand, event-driven, scheduled, webhook)"),
|
|
220
220
|
steps: z
|
|
221
221
|
.array(z.record(z.string(), z.any()))
|
|
222
|
-
.describe("Array of step definitions.
|
|
222
|
+
.describe("Array of step definitions. Step types: 'compute' (functionId + onSuccess/onFailure), 'decision' (cases with conditions using path/op/value + defaultNextStepId), 'delay' (delayMs + nextStepId). Call describe_orchestrations for full schema."),
|
|
223
223
|
},
|
|
224
224
|
async ({ slug, name, description, trigger, steps }) => {
|
|
225
225
|
try {
|