conduyt-mcp 4.56.0 → 4.57.0
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
CHANGED
|
@@ -25,6 +25,7 @@ import { registerCustomFieldTools } from "./tools/custom-fields.js";
|
|
|
25
25
|
import { registerSmartListTools } from "./tools/smart-lists.js";
|
|
26
26
|
import { registerUserTools } from "./tools/users.js";
|
|
27
27
|
import { registerBulkTools } from "./tools/bulk.js";
|
|
28
|
+
import { registerBatchOperationTools } from "./tools/batch-operations.js";
|
|
28
29
|
import { registerDncTools } from "./tools/dnc.js";
|
|
29
30
|
import { registerSavedFilterTools } from "./tools/saved-filters.js";
|
|
30
31
|
import { registerDripCampaignTools } from "./tools/drip-campaigns.js";
|
|
@@ -92,6 +93,7 @@ registerCustomFieldTools(server, client);
|
|
|
92
93
|
registerSmartListTools(server, client);
|
|
93
94
|
registerUserTools(server, client);
|
|
94
95
|
registerBulkTools(server, client);
|
|
96
|
+
registerBatchOperationTools(server, client);
|
|
95
97
|
registerDncTools(server, client);
|
|
96
98
|
registerSavedFilterTools(server, client);
|
|
97
99
|
registerDripCampaignTools(server, client);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import { ConduytClient } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Run Batch (Conduyt #80, 2026-09-15): one logged task on many contacts — the contacts page's "Select all N
|
|
5
|
+
* matching → Run Batch" action and the Run Batch page. Admins and owners only.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerBatchOperationTools(server: McpServer, client: ConduytClient): void;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { formatResult } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Run Batch (Conduyt #80, 2026-09-15): one logged task on many contacts — the contacts page's "Select all N
|
|
5
|
+
* matching → Run Batch" action and the Run Batch page. Admins and owners only.
|
|
6
|
+
*/
|
|
7
|
+
export function registerBatchOperationTools(server, client) {
|
|
8
|
+
server.tool("conduyt_create_batch_operation", "Queue a Run Batch: ONE task applied to many contacts, logged with progress and cancel (no undo). Tasks: enroll (automationId of a published workflow), delete (the #73 engine: cleanup runs, contacts with an upcoming appointment are kept), add_tag / remove_tag (params.tagId), assign (params.userId — one rep) or a round-robin pool (params.userIds, 2–50 reps rotated in order; a rep who is no longer an active member is skipped), set_source (params.source — OVERWRITES the lead source), set_status (params.status — one of the account's lead statuses; a lead with a won deal keeps its status). Pick the contacts ONE way: contactIds (up to 50,000), filterPayload (universal filters), or filter + expectedTotal — the same filter you would give conduyt_list_contacts plus the meta.total it returned; the server re-counts and refuses with 409 expected_total_mismatch when the set moved, then freezes the matching ids (max 50,000). The run is processed in the background; poll conduyt_get_batch_operation. Requires the admin or owner role and an active subscription.", {
|
|
9
|
+
name: z.string().min(1).max(256).describe("A name for the run (shown on the Run Batch page)"),
|
|
10
|
+
operation: z.enum(["enroll", "delete", "add_tag", "remove_tag", "assign", "set_source", "set_status"]).describe("The task"),
|
|
11
|
+
automationId: z.string().uuid().optional().describe("enroll only: the published workflow"),
|
|
12
|
+
params: z.record(z.string(), z.unknown()).optional().describe("Task arguments: { tagId } | { userId } | { userIds: [...] } | { source } | { status }; none for enroll and delete"),
|
|
13
|
+
comment: z.string().max(2000).optional().describe("Why this run (stored with it)"),
|
|
14
|
+
contactIds: z.array(z.string().uuid()).min(1).max(50_000).optional().describe("Explicit contacts"),
|
|
15
|
+
filterPayload: z.array(z.record(z.string(), z.unknown())).min(1).optional().describe("Universal filter rules (the Smart View filter shape)"),
|
|
16
|
+
filter: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional().describe("The contact list filter parameters, exactly as for conduyt_list_contacts; at least one non-empty value"),
|
|
17
|
+
expectedTotal: z.number().int().positive().optional().describe("With filter: the total the list showed for it (meta.total)"),
|
|
18
|
+
}, async (params) => {
|
|
19
|
+
const body = { name: params.name, operation: params.operation };
|
|
20
|
+
if (params.automationId)
|
|
21
|
+
body.automationId = params.automationId;
|
|
22
|
+
if (params.params)
|
|
23
|
+
body.params = params.params;
|
|
24
|
+
if (params.comment)
|
|
25
|
+
body.comment = params.comment;
|
|
26
|
+
if (params.contactIds)
|
|
27
|
+
body.contactIds = params.contactIds;
|
|
28
|
+
else if (params.filterPayload)
|
|
29
|
+
body.filterPayload = params.filterPayload;
|
|
30
|
+
else {
|
|
31
|
+
body.filter = params.filter;
|
|
32
|
+
body.expectedTotal = params.expectedTotal;
|
|
33
|
+
}
|
|
34
|
+
const result = await client.post("/api/v1/batch-operations", body);
|
|
35
|
+
return formatResult(result);
|
|
36
|
+
});
|
|
37
|
+
server.tool("conduyt_list_batch_operations", "List Run Batch runs (newest first): task (operation + params with the display names), status (queued | running | completed | cancelled | failed), totals and progress, creator, comment.", {
|
|
38
|
+
status: z.enum(["queued", "running", "completed", "cancelled", "failed"]).optional().describe("Only runs in this status"),
|
|
39
|
+
createdBy: z.string().uuid().optional().describe("Only runs created by this user"),
|
|
40
|
+
page: z.number().int().positive().optional().describe("Page (default 1)"),
|
|
41
|
+
limit: z.number().int().positive().max(50).optional().describe("Rows per page (default 20, max 50)"),
|
|
42
|
+
}, async (params) => {
|
|
43
|
+
const qp = new URLSearchParams();
|
|
44
|
+
if (params.status)
|
|
45
|
+
qp.set("status", params.status);
|
|
46
|
+
if (params.createdBy)
|
|
47
|
+
qp.set("createdBy", params.createdBy);
|
|
48
|
+
if (params.page)
|
|
49
|
+
qp.set("page", String(params.page));
|
|
50
|
+
if (params.limit)
|
|
51
|
+
qp.set("limit", String(params.limit));
|
|
52
|
+
const qs = qp.toString();
|
|
53
|
+
const result = await client.get(`/api/v1/batch-operations${qs ? `?${qs}` : ""}`);
|
|
54
|
+
return formatResult(result);
|
|
55
|
+
});
|
|
56
|
+
server.tool("conduyt_get_batch_operation", "One Run Batch run with its per-contact items: status per contact (pending | success | error | skipped) with the reason (e.g. 'kept: upcoming appointment', 'tag already applied', 'a lead a deal has won keeps its status').", {
|
|
57
|
+
id: z.string().uuid().describe("The run id"),
|
|
58
|
+
itemStatus: z.enum(["all", "pending", "success", "error", "skipped"]).optional().describe("Only items in this status (default all)"),
|
|
59
|
+
page: z.number().int().positive().optional().describe("Item page (default 1)"),
|
|
60
|
+
limit: z.number().int().positive().max(50).optional().describe("Items per page (default 20, max 50)"),
|
|
61
|
+
}, async (params) => {
|
|
62
|
+
const qp = new URLSearchParams();
|
|
63
|
+
if (params.itemStatus)
|
|
64
|
+
qp.set("itemStatus", params.itemStatus);
|
|
65
|
+
if (params.page)
|
|
66
|
+
qp.set("page", String(params.page));
|
|
67
|
+
if (params.limit)
|
|
68
|
+
qp.set("limit", String(params.limit));
|
|
69
|
+
const qs = qp.toString();
|
|
70
|
+
const result = await client.get(`/api/v1/batch-operations/${params.id}${qs ? `?${qs}` : ""}`);
|
|
71
|
+
return formatResult(result);
|
|
72
|
+
});
|
|
73
|
+
server.tool("conduyt_cancel_batch_operation", "Stop a queued or running Run Batch. Contacts already processed stay as they are (there is no undo); claimed-but-unprocessed contacts go back to pending and are not touched.", {
|
|
74
|
+
id: z.string().uuid().describe("The run id"),
|
|
75
|
+
}, async (params) => {
|
|
76
|
+
const result = await client.post(`/api/v1/batch-operations/${params.id}/cancel`, {});
|
|
77
|
+
return formatResult(result);
|
|
78
|
+
});
|
|
79
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generatedAt": "2026-09-15T16:44:24.985Z",
|
|
3
|
-
"toolCount":
|
|
3
|
+
"toolCount": 268,
|
|
4
4
|
"totalEndpoints": 979,
|
|
5
5
|
"counts": {
|
|
6
|
-
"covered":
|
|
6
|
+
"covered": 249,
|
|
7
7
|
"excluded": 291,
|
|
8
|
-
"planned":
|
|
8
|
+
"planned": 439,
|
|
9
9
|
"uncategorized": 0
|
|
10
10
|
},
|
|
11
11
|
"matrix": {
|
|
@@ -739,16 +739,20 @@
|
|
|
739
739
|
"reason": "batch operation monitoring"
|
|
740
740
|
},
|
|
741
741
|
"POST /api/v1/batch-operations": {
|
|
742
|
-
"status": "
|
|
743
|
-
"
|
|
742
|
+
"status": "covered",
|
|
743
|
+
"tools": [
|
|
744
|
+
"conduyt_create_batch_operation"
|
|
745
|
+
]
|
|
744
746
|
},
|
|
745
747
|
"GET /api/v1/batch-operations/:id": {
|
|
746
748
|
"status": "planned",
|
|
747
749
|
"reason": "batch operation monitoring"
|
|
748
750
|
},
|
|
749
751
|
"POST /api/v1/batch-operations/:id/cancel": {
|
|
750
|
-
"status": "
|
|
751
|
-
"
|
|
752
|
+
"status": "covered",
|
|
753
|
+
"tools": [
|
|
754
|
+
"conduyt_cancel_batch_operation"
|
|
755
|
+
]
|
|
752
756
|
},
|
|
753
757
|
"GET /api/v1/billing/addons": {
|
|
754
758
|
"status": "excluded",
|