@kadoa/mcp 0.3.5-rc.0 → 0.3.5-rc.1

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 +22 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49275,7 +49275,13 @@ function registerTools(server, ctx) {
49275
49275
  });
49276
49276
  }));
49277
49277
  server.registerTool("create_workflow", {
49278
- description: "Create a new workflow that extracts data using agentic navigation. Supports one-time, scheduled, and real-time (continuous monitoring) modes via the interval parameter. If entity and schema are provided, they guide the extraction. Otherwise, the AI agent auto-detects the schema from the page based on the prompt. The workflow runs asynchronously and may take several minutes. Do NOT poll or sleep-wait for completion. Instead, return the workflow ID to the user and let them check back later with get_workflow or fetch_data.",
49278
+ description: `Create a new workflow that extracts data using agentic navigation. Supports one-time, scheduled, and real-time (continuous monitoring) modes via the interval parameter. If entity and schema are provided, they guide the extraction. Otherwise, the AI agent auto-detects the schema from the page based on the prompt. The workflow runs asynchronously and may take several minutes. Do NOT poll or sleep-wait for completion. Instead, return the workflow ID to the user and let them check back later with get_workflow or fetch_data.
49279
+
49280
+ ` + `IMPORTANT — REAL_TIME vs regular workflows:
49281
+ ` + `• REAL_TIME workflows are fundamentally different from regular extraction workflows. They route to a separate Observer service, run continuously, and cannot be triggered manually.
49282
+ ` + `• A regular workflow CANNOT be converted to real-time after creation (and vice versa). The interval=REAL_TIME flag MUST be set at creation time.
49283
+ ` + `• If the user wants to monitor a page for changes, set interval='REAL_TIME' here. Do NOT create a regular workflow and then try to change its interval to REAL_TIME via update_workflow — this will be rejected.
49284
+ ` + "• When unclear whether the user wants monitoring (real-time) or data extraction (regular), ask them to clarify before creating the workflow.",
49279
49285
  inputSchema: {
49280
49286
  prompt: exports_external.string().describe('Natural language description of what to extract (e.g., "Extract product prices and names")'),
49281
49287
  urls: exports_external.array(exports_external.string()).min(1).describe("Starting URLs for the workflow"),
@@ -49514,7 +49520,9 @@ function registerTools(server, ctx) {
49514
49520
  });
49515
49521
  }));
49516
49522
  server.registerTool("update_workflow", {
49517
- description: "Update a workflow's configuration. All fields are optional — only provided fields will be updated. Use this to change the name, URLs, extraction schema, entity, prompt, schedule, or other metadata.",
49523
+ description: `Update a workflow's configuration. All fields are optional — only provided fields will be updated. Use this to change the name, URLs, extraction schema, entity, prompt, schedule, or other metadata.
49524
+
49525
+ ` + "IMPORTANT: You cannot change a workflow's interval to or from REAL_TIME. Real-time workflows are architecturally different (Observer service vs Scraper) and must be created as real-time from the start using create_workflow with interval='REAL_TIME'. To switch a workflow between real-time and regular, delete it and create a new one with the correct interval.",
49518
49526
  inputSchema: {
49519
49527
  workflowId: exports_external.string().describe("The workflow ID to update"),
49520
49528
  name: exports_external.string().optional().describe("New name for the workflow"),
@@ -49541,15 +49549,25 @@ function registerTools(server, ctx) {
49541
49549
  "TRIWEEKLY",
49542
49550
  "FOUR_WEEKS",
49543
49551
  "MONTHLY",
49544
- "REAL_TIME",
49545
49552
  "CUSTOM"
49546
- ]).optional().describe("How often the workflow should run. Use REAL_TIME for continuous monitoring, CUSTOM with schedules for cron-based."),
49553
+ ]).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."),
49547
49554
  schedules: exports_external.array(exports_external.string()).optional().describe("Cron expressions for CUSTOM update interval"),
49548
49555
  limit: exports_external.number().optional().describe("Maximum number of records to extract per run")
49549
49556
  },
49550
49557
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }
49551
49558
  }, withErrorHandling("update_workflow", async (args) => {
49552
49559
  const { workflowId, ...updates } = args;
49560
+ if (updates.updateInterval) {
49561
+ const workflow = await ctx.client.workflow.get(workflowId);
49562
+ const isCurrentlyRealTime = workflow.updateInterval === "REAL_TIME";
49563
+ const isRequestingRealTime = updates.updateInterval === "REAL_TIME";
49564
+ if (isRequestingRealTime && !isCurrentlyRealTime) {
49565
+ return errorResult("Cannot change a regular workflow's interval to REAL_TIME. " + "Real-time workflows use a different service (Observer) and must be created as real-time from the start. " + "Delete this workflow and create a new one with interval='REAL_TIME' using create_workflow.");
49566
+ }
49567
+ if (!isRequestingRealTime && isCurrentlyRealTime) {
49568
+ return errorResult("Cannot change a real-time workflow's interval to a scheduled interval. " + "Real-time workflows are architecturally different and cannot be converted to regular workflows. " + "Delete this workflow and create a new one with the desired interval using create_workflow.");
49569
+ }
49570
+ }
49553
49571
  const result = await ctx.client.workflow.update(workflowId, updates);
49554
49572
  return jsonResult({
49555
49573
  success: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kadoa/mcp",
3
- "version": "0.3.5-rc.0",
3
+ "version": "0.3.5-rc.1",
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",