@kadoa/mcp 0.3.10-rc.2 → 0.3.10-rc.3

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.
Files changed (2) hide show
  1. package/dist/index.js +37 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49335,6 +49335,32 @@ function coerceArray(wrapPlainString = false) {
49335
49335
  return val;
49336
49336
  };
49337
49337
  }
49338
+ function coerceNumber() {
49339
+ return (val) => typeof val === "string" ? Number(val) : val;
49340
+ }
49341
+ function coerceBoolean() {
49342
+ return (val) => {
49343
+ if (typeof val === "string") {
49344
+ if (val === "true")
49345
+ return true;
49346
+ if (val === "false")
49347
+ return false;
49348
+ }
49349
+ return val;
49350
+ };
49351
+ }
49352
+ function coerceJson() {
49353
+ return (val) => {
49354
+ if (typeof val === "string") {
49355
+ try {
49356
+ const parsed = JSON.parse(val);
49357
+ if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed))
49358
+ return parsed;
49359
+ } catch {}
49360
+ }
49361
+ return val;
49362
+ };
49363
+ }
49338
49364
  function isRealTimeInterval(interval) {
49339
49365
  return interval?.toUpperCase().replace("-", "_") === "REAL_TIME";
49340
49366
  }
@@ -49493,7 +49519,7 @@ function registerTools(server, ctx) {
49493
49519
  headers: exports_external.object({}).passthrough().optional().describe("Custom headers as key-value pairs (required for 'header' type)")
49494
49520
  }).optional().describe("Authentication configuration for the webhook endpoint");
49495
49521
  const notificationsInputShape = {
49496
- notifications: exports_external.object({
49522
+ notifications: exports_external.preprocess(coerceJson(), exports_external.object({
49497
49523
  email: exports_external.object({
49498
49524
  recipients: exports_external.array(exports_external.string().email()).optional().describe("Email addresses to notify. Omit to use account default email.")
49499
49525
  }).optional().describe("Send email notifications. Pass {} for account default email, or {recipients: [...]} for custom addresses."),
@@ -49508,7 +49534,7 @@ function registerTools(server, ctx) {
49508
49534
  slackChannelName: exports_external.string().optional().describe("Slack channel name (e.g. #alerts)")
49509
49535
  }).optional().describe("Send notifications to a Slack channel. Use slackChannelId/slackChannelName for OAuth integration, or webhookUrl for legacy incoming webhooks."),
49510
49536
  websocket: exports_external.boolean().optional().describe("Enable WebSocket notifications for programmatic real-time consumption")
49511
- }).optional().describe("Notification channels to alert when data changes.")
49537
+ }).optional().describe("Notification channels to alert when data changes."))
49512
49538
  };
49513
49539
  function resolveUrls(args) {
49514
49540
  const urls = args.urls ?? (args.url ? [args.url] : []);
@@ -49589,7 +49615,7 @@ function registerTools(server, ctx) {
49589
49615
  ...urlInputShape,
49590
49616
  description: exports_external.string().max(500).optional().describe("Description of what this workflow does (max 500 characters)"),
49591
49617
  tags: exports_external.preprocess(coerceArray(true), exports_external.array(exports_external.string())).optional().describe("Tags for organizing workflows"),
49592
- limit: exports_external.number().optional().describe("Maximum number of records to extract per run. Useful for limiting scope or cost control."),
49618
+ limit: exports_external.preprocess(coerceNumber(), exports_external.number()).optional().describe("Maximum number of records to extract per run. Useful for limiting scope or cost control."),
49593
49619
  updateInterval: exports_external.enum([
49594
49620
  "ONLY_ONCE",
49595
49621
  "EVERY_10_MINUTES",
@@ -49716,7 +49742,7 @@ function registerTools(server, ctx) {
49716
49742
  server.registerTool("list_workflows", {
49717
49743
  description: "List all workflows with their current status",
49718
49744
  inputSchema: {
49719
- limit: exports_external.number().optional().describe("Maximum number of workflows to return"),
49745
+ limit: exports_external.preprocess(coerceNumber(), exports_external.number()).optional().describe("Maximum number of workflows to return"),
49720
49746
  state: exports_external.enum(["ACTIVE", "FAILED", "PAUSED", "PREVIEW"]).optional().describe("Filter by state (ACTIVE, FAILED, PAUSED, PREVIEW)")
49721
49747
  },
49722
49748
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true }
@@ -49777,7 +49803,7 @@ function registerTools(server, ctx) {
49777
49803
  description: "Run a workflow to extract fresh data. The run is asynchronous and may take several minutes. Do NOT poll or sleep-wait for completion. Return the workflow ID to the user and let them check status with get_workflow or fetch results later with fetch_data.",
49778
49804
  inputSchema: {
49779
49805
  workflowId: exports_external.string().describe("The workflow ID to run"),
49780
- limit: exports_external.number().optional().describe("Maximum number of records to extract (default: 1000)")
49806
+ limit: exports_external.preprocess(coerceNumber(), exports_external.number()).optional().describe("Maximum number of records to extract (default: 1000)")
49781
49807
  },
49782
49808
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false }
49783
49809
  }, withErrorHandling("run_workflow", async (args) => {
@@ -49798,8 +49824,8 @@ function registerTools(server, ctx) {
49798
49824
  description: "Get extracted data from a workflow. Data is only available after the workflow run has completed (displayState is no longer RUNNING). Do NOT poll or sleep-wait for completion.",
49799
49825
  inputSchema: {
49800
49826
  workflowId: exports_external.string().describe("The workflow ID"),
49801
- limit: exports_external.number().optional().describe("Maximum number of records to return"),
49802
- page: exports_external.number().optional().describe("Page number for pagination")
49827
+ limit: exports_external.preprocess(coerceNumber(), exports_external.number()).optional().describe("Maximum number of records to return"),
49828
+ page: exports_external.preprocess(coerceNumber(), exports_external.number()).optional().describe("Page number for pagination")
49803
49829
  },
49804
49830
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true }
49805
49831
  }, withErrorHandling("fetch_data", async (args) => {
@@ -49818,7 +49844,7 @@ function registerTools(server, ctx) {
49818
49844
  description: "Delete a workflow permanently. This is irreversible. " + "You MUST first call this tool without confirmed=true to preview what will be deleted, " + "then show the user the workflow name and ask for confirmation, " + "then call again with confirmed=true only after the user explicitly agrees.",
49819
49845
  inputSchema: {
49820
49846
  workflowId: exports_external.string().describe("The workflow ID to delete"),
49821
- confirmed: exports_external.boolean().optional().describe("Set to true only after the user has explicitly confirmed deletion. Omit or set to false for the initial preview call.")
49847
+ confirmed: exports_external.preprocess(coerceBoolean(), exports_external.boolean()).optional().describe("Set to true only after the user has explicitly confirmed deletion. Omit or set to false for the initial preview call.")
49822
49848
  },
49823
49849
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true }
49824
49850
  }, withErrorHandling("delete_workflow", async (args) => {
@@ -49891,7 +49917,7 @@ function registerTools(server, ctx) {
49891
49917
  "CUSTOM"
49892
49918
  ]).optional().describe("How often the workflow should run. CUSTOM requires schedules. Note: REAL_TIME is NOT allowed here — real-time workflows must be created via create_workflow."),
49893
49919
  schedules: exports_external.preprocess(coerceArray(true), exports_external.array(exports_external.string())).optional().describe("Cron expressions for CUSTOM update interval"),
49894
- limit: exports_external.number().optional().describe("Maximum number of records to extract per run")
49920
+ limit: exports_external.preprocess(coerceNumber(), exports_external.number()).optional().describe("Maximum number of records to extract per run")
49895
49921
  }),
49896
49922
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }
49897
49923
  }, withErrorHandling("update_workflow", async (args) => {
@@ -49980,7 +50006,7 @@ function registerTools(server, ctx) {
49980
50006
  description: "Delete a notification channel by ID. " + "Call first without confirmed=true to preview, then with confirmed=true after user agrees.",
49981
50007
  inputSchema: {
49982
50008
  channelId: exports_external.string().describe("The channel ID to delete"),
49983
- confirmed: exports_external.boolean().optional().describe("Set to true only after the user has explicitly confirmed deletion.")
50009
+ confirmed: exports_external.preprocess(coerceBoolean(), exports_external.boolean()).optional().describe("Set to true only after the user has explicitly confirmed deletion.")
49984
50010
  },
49985
50011
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true }
49986
50012
  }, withErrorHandling("delete_notification_channel", async (args) => {
@@ -50118,7 +50144,7 @@ function registerTools(server, ctx) {
50118
50144
  description: "Delete a notification setting by ID. This removes the event-to-channel mapping but does not delete the channels themselves. " + "Call first without confirmed=true to preview, then with confirmed=true after user agrees.",
50119
50145
  inputSchema: {
50120
50146
  settingsId: exports_external.string().describe("The notification settings ID to delete"),
50121
- confirmed: exports_external.boolean().optional().describe("Set to true only after the user has explicitly confirmed deletion.")
50147
+ confirmed: exports_external.preprocess(coerceBoolean(), exports_external.boolean()).optional().describe("Set to true only after the user has explicitly confirmed deletion.")
50122
50148
  },
50123
50149
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true }
50124
50150
  }, withErrorHandling("delete_notification_setting", async (args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kadoa/mcp",
3
- "version": "0.3.10-rc.2",
3
+ "version": "0.3.10-rc.3",
4
4
  "description": "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",