conduyt-mcp 4.38.0 → 4.40.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/tools/reports.js +52 -2
- package/package.json +1 -1
- package/scripts/coverage-matrix.json +9 -11
package/dist/tools/reports.js
CHANGED
|
@@ -14,6 +14,15 @@ const filterSchema = z.object({
|
|
|
14
14
|
operator: z.string().describe("eq, neq, contains, gt, gte, lt, lte, between, in, isNull, isNotNull, or a relative-date operator (within_last_n, today, since_monday, this_calendar_month, previous_month, in_past, in_future…)"),
|
|
15
15
|
value: z.unknown().optional().describe("The value; [from, to] for between; a list for in; {n, unit} for within_last_n / within_next_n"),
|
|
16
16
|
});
|
|
17
|
+
const pivotSchema = z.object({
|
|
18
|
+
rows: z.array(z.string()).min(1).max(2).describe("One or two groupable fields down the side"),
|
|
19
|
+
columns: z.string().nullable().optional().describe("A groupable field across the top (omit for a single Total column)"),
|
|
20
|
+
measures: z.array(z.object({
|
|
21
|
+
aggregate: z.enum(["count", "sum", "avg", "min", "max"]),
|
|
22
|
+
field: z.string().nullable().optional().describe("A numeric field (rollup or cf:<key>); omit for count"),
|
|
23
|
+
format: z.enum(["number", "integer", "currency", "percent"]).optional().describe("How this measure is displayed (a property of the measure, not the report)"),
|
|
24
|
+
})).min(1).max(5),
|
|
25
|
+
}).describe("Pivot table on the report (contacts / deals): every cell, row totals, column totals and the grand total come from the same filtered rows as the table; XLSX exports and deliveries add a Pivot sheet");
|
|
17
26
|
export function registerReportTools(server, client) {
|
|
18
27
|
server.tool("conduyt_report_fields", "The field catalogue a custom report may use on a base: the entity's own columns, its per-row rollups (contacts/deals) and the account's custom fields, with type, operators and whether each can group, sort or be measured. Read this before building a report.", { entity: z.enum(["contacts", "deals", "activities", "tasks", "messages", "invoices"]).describe("The report base") }, async ({ entity }) => formatResult(await client.get(`/api/v1/reports/custom/fields?entity=${encodeURIComponent(entity)}`)));
|
|
19
28
|
server.tool("conduyt_list_reports", "List the account's saved custom reports (shared ones and your own), with their definition and last-run status.", {}, async () => formatResult(await client.get("/api/v1/reports/custom")));
|
|
@@ -33,7 +42,8 @@ export function registerReportTools(server, client) {
|
|
|
33
42
|
chartType: z.enum(["bar", "line", "pie", "table", "funnel", "number"]).optional(),
|
|
34
43
|
population: z.object({ smartViewId: z.string().uuid().nullable().optional() }).optional().describe("contacts/deals only: { smartViewId } runs the report over the contacts in that Smart View"),
|
|
35
44
|
isShared: z.boolean().optional().describe("Visible to the whole account (default false = only you and admins)"),
|
|
36
|
-
|
|
45
|
+
pivot: pivotSchema.optional(),
|
|
46
|
+
}, async ({ name, description, entity, columns, filters, sortBy, sortDir, groupBy, groupBy2, timeGrain, aggregate, measureField, chartType, population, isShared, pivot }) => {
|
|
37
47
|
// Inline body (undefined fields drop out in JSON) — readable by the contract verifier's static parser.
|
|
38
48
|
const result = await client.post("/api/v1/reports/custom", {
|
|
39
49
|
name,
|
|
@@ -51,6 +61,7 @@ export function registerReportTools(server, client) {
|
|
|
51
61
|
chartType,
|
|
52
62
|
population,
|
|
53
63
|
isShared,
|
|
64
|
+
pivot,
|
|
54
65
|
});
|
|
55
66
|
return formatResult(result);
|
|
56
67
|
});
|
|
@@ -79,7 +90,8 @@ export function registerReportTools(server, client) {
|
|
|
79
90
|
aggregate: z.enum(["count", "sum", "avg", "min", "max"]).optional(),
|
|
80
91
|
measureField: z.string().optional(),
|
|
81
92
|
population: z.object({ smartViewId: z.string().uuid().nullable().optional() }).optional(),
|
|
82
|
-
|
|
93
|
+
pivot: pivotSchema.optional(),
|
|
94
|
+
}, async ({ entity, columns, filters, sortBy, sortDir, groupBy, groupBy2, timeGrain, aggregate, measureField, population, pivot }) => {
|
|
83
95
|
const result = await client.post("/api/v1/reports/custom/preview", {
|
|
84
96
|
entity,
|
|
85
97
|
columns,
|
|
@@ -92,6 +104,44 @@ export function registerReportTools(server, client) {
|
|
|
92
104
|
aggregate,
|
|
93
105
|
measureField,
|
|
94
106
|
population,
|
|
107
|
+
pivot,
|
|
108
|
+
});
|
|
109
|
+
return formatResult(result);
|
|
110
|
+
});
|
|
111
|
+
server.tool("conduyt_update_report", "Update a saved custom report: any create field, plus pivot (set a pivot grid, or null to remove it). Only the fields you pass change.", {
|
|
112
|
+
id: z.string().uuid().describe("Saved report id (from conduyt_list_reports)"),
|
|
113
|
+
name: z.string().min(1).max(120).optional(),
|
|
114
|
+
description: z.string().max(500).nullable().optional(),
|
|
115
|
+
columns: z.array(z.string()).min(1).max(60).optional(),
|
|
116
|
+
filters: z.array(filterSchema).max(30).optional(),
|
|
117
|
+
sortBy: z.string().nullable().optional(),
|
|
118
|
+
sortDir: z.enum(["asc", "desc"]).optional(),
|
|
119
|
+
groupBy: z.string().nullable().optional(),
|
|
120
|
+
groupBy2: z.string().nullable().optional(),
|
|
121
|
+
timeGrain: z.enum(["day", "week", "month"]).nullable().optional(),
|
|
122
|
+
aggregate: z.enum(["count", "sum", "avg", "min", "max"]).optional(),
|
|
123
|
+
measureField: z.string().nullable().optional(),
|
|
124
|
+
chartType: z.enum(["bar", "line", "pie", "table", "funnel", "number"]).optional(),
|
|
125
|
+
population: z.object({ smartViewId: z.string().uuid().nullable().optional() }).nullable().optional(),
|
|
126
|
+
isShared: z.boolean().optional(),
|
|
127
|
+
pivot: pivotSchema.nullable().optional().describe("A pivot definition, or null to remove the pivot"),
|
|
128
|
+
}, async ({ id, name, description, columns, filters, sortBy, sortDir, groupBy, groupBy2, timeGrain, aggregate, measureField, chartType, population, isShared, pivot }) => {
|
|
129
|
+
const result = await client.patch(`/api/v1/reports/custom/${encodeURIComponent(id)}`, {
|
|
130
|
+
name,
|
|
131
|
+
description,
|
|
132
|
+
columns,
|
|
133
|
+
filters,
|
|
134
|
+
sortBy,
|
|
135
|
+
sortDir,
|
|
136
|
+
groupBy,
|
|
137
|
+
groupBy2,
|
|
138
|
+
timeGrain,
|
|
139
|
+
aggregate,
|
|
140
|
+
measureField,
|
|
141
|
+
chartType,
|
|
142
|
+
population,
|
|
143
|
+
isShared,
|
|
144
|
+
pivot,
|
|
95
145
|
});
|
|
96
146
|
return formatResult(result);
|
|
97
147
|
});
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-09-
|
|
3
|
-
"toolCount":
|
|
4
|
-
"totalEndpoints":
|
|
2
|
+
"generatedAt": "2026-09-11T02:31:42.441Z",
|
|
3
|
+
"toolCount": 234,
|
|
4
|
+
"totalEndpoints": 940,
|
|
5
5
|
"counts": {
|
|
6
|
-
"covered":
|
|
6
|
+
"covered": 216,
|
|
7
7
|
"excluded": 283,
|
|
8
|
-
"planned":
|
|
8
|
+
"planned": 441,
|
|
9
9
|
"uncategorized": 0
|
|
10
10
|
},
|
|
11
11
|
"matrix": {
|
|
@@ -2879,10 +2879,6 @@
|
|
|
2879
2879
|
"status": "planned",
|
|
2880
2880
|
"reason": "notification surfaces"
|
|
2881
2881
|
},
|
|
2882
|
-
"GET /api/v1/ops/capacity": {
|
|
2883
|
-
"status": "planned",
|
|
2884
|
-
"reason": "operator capacity dashboard (#51, shipped 2026-09) — read-only queue/park telemetry; a typed conduyt_capacity_snapshot tool is agent-relevant for throughput questions"
|
|
2885
|
-
},
|
|
2886
2882
|
"GET /api/v1/phone-numbers": {
|
|
2887
2883
|
"status": "planned",
|
|
2888
2884
|
"reason": "phone number inventory"
|
|
@@ -3186,8 +3182,10 @@
|
|
|
3186
3182
|
"reason": "additional report surfaces beyond ai/insights"
|
|
3187
3183
|
},
|
|
3188
3184
|
"PATCH /api/v1/reports/custom/:id": {
|
|
3189
|
-
"status": "
|
|
3190
|
-
"
|
|
3185
|
+
"status": "covered",
|
|
3186
|
+
"tools": [
|
|
3187
|
+
"conduyt_update_report"
|
|
3188
|
+
]
|
|
3191
3189
|
},
|
|
3192
3190
|
"DELETE /api/v1/reports/custom/:id": {
|
|
3193
3191
|
"status": "planned",
|