@kadoa/mcp 0.3.5-rc.2 → 0.3.5-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.
- package/dist/index.js +28 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49287,7 +49287,18 @@ function registerTools(server, ctx) {
|
|
|
49287
49287
|
` + "• When unclear whether the user wants monitoring (real-time) or data extraction (regular), ask them to clarify before creating the workflow.",
|
|
49288
49288
|
inputSchema: {
|
|
49289
49289
|
prompt: exports_external.string().describe('Natural language description of what to extract (e.g., "Extract product prices and names")'),
|
|
49290
|
-
|
|
49290
|
+
url: exports_external.string().optional().describe("Single URL — prefer using 'urls' instead. If both are provided, 'urls' takes precedence."),
|
|
49291
|
+
urls: exports_external.preprocess((val) => {
|
|
49292
|
+
if (typeof val === "string") {
|
|
49293
|
+
try {
|
|
49294
|
+
const parsed = JSON.parse(val);
|
|
49295
|
+
if (Array.isArray(parsed))
|
|
49296
|
+
return parsed;
|
|
49297
|
+
} catch {}
|
|
49298
|
+
return [val];
|
|
49299
|
+
}
|
|
49300
|
+
return val;
|
|
49301
|
+
}, exports_external.array(exports_external.string()).min(1)).optional().describe("Starting URLs for the workflow (array of strings). Also accepts a single URL string."),
|
|
49291
49302
|
name: exports_external.string().optional().describe("Optional name for the workflow"),
|
|
49292
49303
|
entity: exports_external.string().optional().describe("Entity name for extraction (e.g., 'Product', 'Job Posting')"),
|
|
49293
49304
|
schema: exports_external.array(exports_external.object(SchemaFieldShape)).optional().describe("Extraction schema fields. If omitted, the AI agent auto-detects the schema."),
|
|
@@ -49324,6 +49335,10 @@ function registerTools(server, ctx) {
|
|
|
49324
49335
|
},
|
|
49325
49336
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false }
|
|
49326
49337
|
}, withErrorHandling("create_workflow", async (args) => {
|
|
49338
|
+
const urls = args.urls ?? (args.url ? [args.url] : []);
|
|
49339
|
+
if (urls.length === 0) {
|
|
49340
|
+
return errorResult("At least one URL is required. Provide 'urls' (array) or 'url' (string).");
|
|
49341
|
+
}
|
|
49327
49342
|
const n = args.notifications;
|
|
49328
49343
|
const hasNotifications = n && (n.email || n.webhook || n.slack || n.websocket);
|
|
49329
49344
|
if (args.interval === "REAL_TIME" && !hasNotifications) {
|
|
@@ -49338,7 +49353,7 @@ function registerTools(server, ctx) {
|
|
|
49338
49353
|
} : undefined;
|
|
49339
49354
|
const isRealTime = args.interval === "REAL_TIME";
|
|
49340
49355
|
let builder = ctx.client.extract({
|
|
49341
|
-
urls
|
|
49356
|
+
urls,
|
|
49342
49357
|
name: args.name || "Untitled Workflow",
|
|
49343
49358
|
...isRealTime ? {} : { navigationMode: "agentic-navigation" },
|
|
49344
49359
|
userPrompt: args.prompt,
|
|
@@ -49530,7 +49545,17 @@ function registerTools(server, ctx) {
|
|
|
49530
49545
|
inputSchema: {
|
|
49531
49546
|
workflowId: exports_external.string().describe("The workflow ID to update"),
|
|
49532
49547
|
name: exports_external.string().optional().describe("New name for the workflow"),
|
|
49533
|
-
urls: exports_external.
|
|
49548
|
+
urls: exports_external.preprocess((val) => {
|
|
49549
|
+
if (typeof val === "string") {
|
|
49550
|
+
try {
|
|
49551
|
+
const parsed = JSON.parse(val);
|
|
49552
|
+
if (Array.isArray(parsed))
|
|
49553
|
+
return parsed;
|
|
49554
|
+
} catch {}
|
|
49555
|
+
return [val];
|
|
49556
|
+
}
|
|
49557
|
+
return val;
|
|
49558
|
+
}, exports_external.array(exports_external.string()).min(1)).optional().describe("New target URLs for the workflow (array of strings). Also accepts a single URL string."),
|
|
49534
49559
|
entity: exports_external.string().optional().describe("Entity name for extraction (e.g., 'Product', 'Job Posting')"),
|
|
49535
49560
|
schema: exports_external.array(exports_external.object(SchemaFieldShape)).optional().describe("New extraction schema fields"),
|
|
49536
49561
|
description: exports_external.string().optional().describe("Workflow description"),
|