@centrali-io/centrali-mcp 4.2.10 → 4.2.12

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.
@@ -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
- step_shape: {
625
- id: "UUID",
626
- name: "string step display name",
627
- functionId: "UUID — the compute function to execute",
628
- order: "numberexecution order (0-indexed)",
629
- inputMapping: "object | null — maps data from previous step outputs or orchestration input to this step's input",
630
- retryConfig: "object | null { maxRetries, delayMs } for automatic retry on failure",
631
- timeoutMs: "number | null — step execution timeout",
624
+ step_types: {
625
+ compute: {
626
+ description: "Execute a compute function",
627
+ shape: {
628
+ id: "stringunique step identifier",
629
+ type: "'compute'",
630
+ functionId: "UUIDthe 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
- step_example: {
659
- id: "validate",
660
- type: "compute",
661
- functionId: "func-uuid",
662
- onSuccess: { nextStepId: "process" },
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: {
@@ -689,6 +752,8 @@ function registerDescribeTools(server) {
689
752
  "Use get_orchestration_run with includeSteps=true to see step-by-step execution details",
690
753
  "Orchestrations must be 'active' to be triggered — draft orchestrations cannot run",
691
754
  "Use correlationId when triggering to trace runs across systems",
755
+ "Terminal steps: a compute step with no onSuccess and no subsequent step in the array will complete the run. No special 'end' step type is needed.",
756
+ "Decision step conditions use 'path' (not 'field') and 'op' (not 'operator'). Paths use dot notation: 'input.fieldName' or 'steps.stepId.output.fieldName'.",
692
757
  ],
693
758
  }, null, 2),
694
759
  },
@@ -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. Each step has id, type, functionId, and optional onSuccess/onFailure routing"),
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centrali-io/centrali-mcp",
3
- "version": "4.2.10",
3
+ "version": "4.2.12",
4
4
  "description": "Centrali MCP Server - AI assistant integration for Centrali workspaces",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -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
- step_shape: {
718
- id: "UUID",
719
- name: "string step display name",
720
- functionId: "UUID — the compute function to execute",
721
- order: "numberexecution order (0-indexed)",
722
- inputMapping:
723
- "object | null maps data from previous step outputs or orchestration input to this step's input",
724
- retryConfig:
725
- "object | null — { maxRetries, delayMs } for automatic retry on failure",
726
- timeoutMs: "number | null — step execution timeout",
717
+ step_types: {
718
+ compute: {
719
+ description: "Execute a compute function",
720
+ shape: {
721
+ id: "stringunique step identifier",
722
+ type: "'compute'",
723
+ functionId: "UUIDthe 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
- step_example: {
754
- id: "validate",
755
- type: "compute",
756
- functionId: "func-uuid",
757
- onSuccess: { nextStepId: "process" },
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: {
@@ -784,6 +845,8 @@ export function registerDescribeTools(server: McpServer) {
784
845
  "Use get_orchestration_run with includeSteps=true to see step-by-step execution details",
785
846
  "Orchestrations must be 'active' to be triggered — draft orchestrations cannot run",
786
847
  "Use correlationId when triggering to trace runs across systems",
848
+ "Terminal steps: a compute step with no onSuccess and no subsequent step in the array will complete the run. No special 'end' step type is needed.",
849
+ "Decision step conditions use 'path' (not 'field') and 'op' (not 'operator'). Paths use dot notation: 'input.fieldName' or 'steps.stepId.output.fieldName'.",
787
850
  ],
788
851
  },
789
852
  null,
@@ -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. Each step has id, type, functionId, and optional onSuccess/onFailure routing"),
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 {