@burdenoff/mcp-libs 2026.1101.1 → 2026.1101.2
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/README.md +30 -0
- package/dist/modules/adaptercloud/tools/shared.d.ts +91 -13
- package/dist/modules/artistrybase/tools/shared.d.ts +80 -12
- package/dist/modules/assethandler/tools/shared.d.ts +52 -8
- package/dist/modules/atheletebridge/tools/shared.d.ts +83 -12
- package/dist/modules/brainyrich/tools/shared.d.ts +102 -14
- package/dist/modules/buildmyiq/tools/shared.d.ts +75 -12
- package/dist/modules/collabkin/tools/shared.d.ts +66 -10
- package/dist/modules/comradecircle/tools/shared.d.ts +78 -14
- package/dist/modules/coolandlovely/tools/shared.d.ts +76 -19
- package/dist/modules/cosmicintersection/tools/shared.d.ts +94 -13
- package/dist/modules/ecoimpacthub/tools/shared.d.ts +130 -17
- package/dist/modules/fluidgrids/durable-operations.d.ts +23 -0
- package/dist/modules/fluidgrids/index.cjs +566 -13
- package/dist/modules/fluidgrids/index.cjs.map +1 -1
- package/dist/modules/fluidgrids/index.js +490 -12
- package/dist/modules/fluidgrids/index.js.map +1 -1
- package/dist/modules/fluidgrids/operations.d.ts +4 -3
- package/dist/modules/fluidgrids/tools/durable.d.ts +3 -0
- package/dist/modules/ggnomad/tools/shared.d.ts +23 -3
- package/dist/modules/govcitizenhub/tools/shared.d.ts +68 -10
- package/dist/modules/headshotmarketing/tools/shared.d.ts +299 -42
- package/dist/modules/healthybowl/tools/shared.d.ts +5 -1
- package/dist/modules/hookmovies/tools/shared.d.ts +93 -13
- package/dist/modules/housingvista/tools/shared.d.ts +15 -2
- package/dist/modules/intelwatchtower/tools/shared.d.ts +121 -16
- package/dist/modules/kadaikodi/tools/shared.d.ts +52 -7
- package/dist/modules/labsofscience/tools/shared.d.ts +85 -13
- package/dist/modules/manufacturedops/tools/shared.d.ts +95 -14
- package/dist/modules/movethewheels/tools/shared.d.ts +111 -14
- package/dist/modules/mybodyshield/tools/shared.d.ts +84 -12
- package/dist/modules/planmagnet/tools/shared.d.ts +231 -31
- package/dist/modules/proserviceworld/tools/shared.d.ts +53 -9
- package/dist/modules/semanticfed/tools/shared.d.ts +87 -12
- package/dist/modules/subscriberbot/tools/shared.d.ts +157 -19
- package/dist/modules/technospam/tools/shared.d.ts +63 -10
- package/dist/modules/theculturepost/tools/shared.d.ts +63 -8
- package/dist/modules/theglobalfuel/tools/shared.d.ts +117 -14
- package/dist/modules/timecampus/tools/shared.d.ts +131 -21
- package/package.json +16 -15
|
@@ -1,6 +1,153 @@
|
|
|
1
|
-
import { mcpToolName, mcpResourceUri, mcpPromptName, errorResult, jsonResult } from '../../chunk-WYCRYHHY.js';
|
|
1
|
+
import { mcpToolName, mcpResourceUri, mcpPromptName, errorResult, registerTool, jsonResult, McpUserError } from '../../chunk-WYCRYHHY.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
// src/modules/fluidgrids/durable-operations.ts
|
|
5
|
+
var WORKFLOW_FIELDS = `id workflowKey name description version status category tags icon isActive totalVersions createdAt updatedAt`;
|
|
6
|
+
var RUN_FIELDS = `
|
|
7
|
+
id workflowId workflowKey version status startedAt completedAt duration errorMessage
|
|
8
|
+
executionKind workflowFn taskQueue buildId historyLength parentClosePolicy cancelRequestedAt
|
|
9
|
+
determinism { failing cause attempts since lastFailureSeq message }
|
|
10
|
+
`;
|
|
11
|
+
var PARITY_FIELDS = `${RUN_FIELDS}
|
|
12
|
+
businessId runAttempt firstRunId continuedFromRunId continuedToRunId priority
|
|
13
|
+
summary details currentDetails memo startDelayUntil runTimeoutAt executionTimeoutAt
|
|
14
|
+
`;
|
|
15
|
+
var PENDING_FIELDS = `
|
|
16
|
+
activities { activityId activityType state attempt maxAttempts scheduledAt lastStartedAt
|
|
17
|
+
lastHeartbeatAt heartbeatDetails lastFailure nextAttemptAt summary }
|
|
18
|
+
children { runId workflowKey version status startedAt }
|
|
19
|
+
timers { timerId fireAt summary }
|
|
20
|
+
bufferedSignals workflowTask { state attempt startedAt failureCause }
|
|
21
|
+
`;
|
|
22
|
+
var EXPORT_WORKFLOW = `
|
|
23
|
+
query FluidgridsExportWorkflow($workflowKey: String!, $version: String, $format: WorkflowExportFormat, $options: ExportOptionsInput) {
|
|
24
|
+
exportWorkflow(workflowKey: $workflowKey, version: $version, format: $format, options: $options) {
|
|
25
|
+
format schemaVersion exportedAt workflowKey version name description definitionJson context tags icon category
|
|
26
|
+
nodeReferences { nodeId nodeType nodeVersion }
|
|
27
|
+
exportFormat files { path contentType content url }
|
|
28
|
+
fidelity { level items { nodeId path kind detail } } irHash
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
var IMPORT_WORKFLOW = `
|
|
33
|
+
mutation FluidgridsImportWorkflow($input: ImportWorkflowInput!) {
|
|
34
|
+
importWorkflow(input: $input) {
|
|
35
|
+
success message workflow { ${WORKFLOW_FIELDS} }
|
|
36
|
+
validation { valid errors warnings missingNodes { nodeId nodeType nodeVersion } }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
var IMPORT_WORKFLOW_TEMPLATE = `
|
|
41
|
+
mutation FluidgridsImportWorkflowTemplate($input: ImportWorkflowTemplateInput!) {
|
|
42
|
+
importWorkflowTemplate(input: $input) { success message workflow { ${WORKFLOW_FIELDS} } }
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
var CREATE_WORKFLOW_VERSION = `
|
|
46
|
+
mutation FluidgridsCreateWorkflowVersion($workflowKey: String!, $input: CreateWorkflowVersionInput!) {
|
|
47
|
+
createWorkflowVersion(workflowKey: $workflowKey, input: $input) {
|
|
48
|
+
success message workflow { ${WORKFLOW_FIELDS} }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
var VALIDATE_WORKFLOW_DEFINITION = `
|
|
53
|
+
query FluidgridsValidateWorkflowDefinition($definitionJson: JSON!, $strict: Boolean) {
|
|
54
|
+
validateWorkflowDefinition(definitionJson: $definitionJson, strict: $strict) {
|
|
55
|
+
valid errors { code message nodeId path } warnings { code message nodeId path }
|
|
56
|
+
schemaVersion irHash taskQueues
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
var WORKFLOW_INTERFACE = `
|
|
61
|
+
query FluidgridsWorkflowInterface($workflowKey: String!, $version: String) {
|
|
62
|
+
workflowInterface(workflowKey: $workflowKey, version: $version)
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
var START_WORKFLOW = `
|
|
66
|
+
mutation FluidgridsStartWorkflow($input: StartWorkflowInput!) {
|
|
67
|
+
startWorkflow(input: $input) { run { ${RUN_FIELDS} } existing }
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
var START_WORKFLOW_PARITY = `
|
|
71
|
+
mutation FluidgridsStartWorkflowParity($input: StartWorkflowInput!) {
|
|
72
|
+
startWorkflow(input: $input) { run { ${PARITY_FIELDS} } existing }
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
var START_WORKFLOW_TERMINATE_EXISTING = `
|
|
76
|
+
mutation FluidgridsStartWorkflowTerminateExisting($input: StartWorkflowInput!) {
|
|
77
|
+
startWorkflowTerminateExisting(input: $input) { run { ${PARITY_FIELDS} } existing }
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
var DESCRIBE_RUN = `
|
|
81
|
+
query FluidgridsDescribeRun($id: ID!) { workflowRun(id: $id) { ${RUN_FIELDS} } }
|
|
82
|
+
`;
|
|
83
|
+
var RUN_BY_WORKFLOW_ID = `
|
|
84
|
+
query FluidgridsRunByWorkflowId($workflowKey: String!, $workflowId: String!, $firstRunId: ID) {
|
|
85
|
+
workflowRunByWorkflowId(workflowKey: $workflowKey, workflowId: $workflowId, firstRunId: $firstRunId) { ${PARITY_FIELDS} }
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
var RUN_PENDING = `
|
|
89
|
+
query FluidgridsRunPending($id: ID!) { workflowRun(id: $id) { id status pending { ${PENDING_FIELDS} } } }
|
|
90
|
+
`;
|
|
91
|
+
var RUN_PENDING_BY_WORKFLOW_ID = `
|
|
92
|
+
query FluidgridsRunPendingByWorkflowId($workflowKey: String!, $workflowId: String!, $firstRunId: ID) {
|
|
93
|
+
workflowRunByWorkflowId(workflowKey: $workflowKey, workflowId: $workflowId, firstRunId: $firstRunId) { id status pending { ${PENDING_FIELDS} } }
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
var RUNS_COUNT = `
|
|
97
|
+
query FluidgridsRunsCount($filter: ListWorkflowRunsInput, $groupBy: [RunGroupBy!]) {
|
|
98
|
+
workflowRunsCount(filter: $filter, groupBy: $groupBy) { total groups { key values count } groupsTruncated }
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
var HISTORY_FIELDS = `events { runId seq type taskId payload payloadUrl createdAt } nextAfter hasMore historyLength historyBytes`;
|
|
102
|
+
var RUN_HISTORY = `
|
|
103
|
+
query FluidgridsRunHistory($runId: ID!, $after: Int, $limit: Int) {
|
|
104
|
+
workflowRunHistory(runId: $runId, after: $after, limit: $limit) { ${HISTORY_FIELDS} }
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
var RUN_HISTORY_BY_TARGET = `
|
|
108
|
+
query FluidgridsRunHistoryByTarget($target: RunTargetInput!, $after: Int, $limit: Int) {
|
|
109
|
+
workflowRunHistory(target: $target, after: $after, limit: $limit) { ${HISTORY_FIELDS} }
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
var SIGNAL_FIELDS = `accepted delivered buffered forwardedToRunId seq duplicate`;
|
|
113
|
+
var SIGNAL_RUN = `
|
|
114
|
+
mutation FluidgridsSignalRun($runId: ID!, $name: String!, $payload: JSON, $idempotencyKey: String) {
|
|
115
|
+
signalWorkflowRun(runId: $runId, name: $name, payload: $payload, idempotencyKey: $idempotencyKey) { ${SIGNAL_FIELDS} }
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
|
+
var SIGNAL_RUN_BY_TARGET = `
|
|
119
|
+
mutation FluidgridsSignalRunByTarget($target: RunTargetInput!, $name: String!, $payload: JSON, $idempotencyKey: String) {
|
|
120
|
+
signalWorkflowRun(target: $target, name: $name, payload: $payload, idempotencyKey: $idempotencyKey) { ${SIGNAL_FIELDS} }
|
|
121
|
+
}
|
|
122
|
+
`;
|
|
123
|
+
var RUN_STACK_TRACE = `
|
|
124
|
+
query FluidgridsRunStackTrace($runId: ID!, $enhanced: Boolean) {
|
|
125
|
+
workflowRunStackTrace(runId: $runId, enhanced: $enhanced) { trace enhanced }
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
var RUN_STACK_TRACE_PARITY = `
|
|
129
|
+
query FluidgridsRunStackTraceParity($runId: ID, $target: RunTargetInput, $enhanced: Boolean, $metadata: Boolean) {
|
|
130
|
+
workflowRunStackTrace(runId: $runId, target: $target, enhanced: $enhanced, metadata: $metadata) {
|
|
131
|
+
trace enhanced metadata { definition currentDetails }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`;
|
|
135
|
+
var RUN_DETERMINISM_STATUS = `
|
|
136
|
+
query FluidgridsRunDeterminismStatus($runId: ID!) {
|
|
137
|
+
workflowRunDeterminismStatus(runId: $runId) { failing cause attempts since lastFailureSeq message }
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
var TERMINATE_RUN = `
|
|
141
|
+
mutation FluidgridsTerminateRun($runId: ID!, $reason: String) {
|
|
142
|
+
terminateWorkflowRun(runId: $runId, reason: $reason) { id status completedAt errorMessage }
|
|
143
|
+
}
|
|
144
|
+
`;
|
|
145
|
+
var TERMINATE_RUN_BY_TARGET = `
|
|
146
|
+
mutation FluidgridsTerminateRunByTarget($target: RunTargetInput!, $reason: String) {
|
|
147
|
+
terminateWorkflowRun(target: $target, reason: $reason) { id status completedAt errorMessage }
|
|
148
|
+
}
|
|
149
|
+
`;
|
|
150
|
+
|
|
4
151
|
// src/modules/fluidgrids/operations.ts
|
|
5
152
|
var LIST_WORKFLOWS = `
|
|
6
153
|
query ListWorkflows($input: ListWorkflowDefinitionsInput!) {
|
|
@@ -110,6 +257,7 @@ var GET_RUN = `
|
|
|
110
257
|
failedNodes
|
|
111
258
|
skippedNodes
|
|
112
259
|
nodeStates {
|
|
260
|
+
id
|
|
113
261
|
nodeId
|
|
114
262
|
nodeType
|
|
115
263
|
status
|
|
@@ -716,8 +864,8 @@ var RESUME_RUN = `
|
|
|
716
864
|
}
|
|
717
865
|
`;
|
|
718
866
|
var RETRY_RUN = `
|
|
719
|
-
mutation RetryNode($id: ID!) {
|
|
720
|
-
retryNode(id: $id) {
|
|
867
|
+
mutation RetryNode($id: ID!, $nodeId: String!) {
|
|
868
|
+
retryNode(id: $id, nodeId: $nodeId) {
|
|
721
869
|
id
|
|
722
870
|
nodeId
|
|
723
871
|
nodeType
|
|
@@ -871,8 +1019,8 @@ var CREATE_SCHEDULED_JOB = `
|
|
|
871
1019
|
}
|
|
872
1020
|
`;
|
|
873
1021
|
var UPDATE_SCHEDULED_JOB = `
|
|
874
|
-
mutation UpdateScheduledJob($
|
|
875
|
-
updateWorkflowScheduledJob(
|
|
1022
|
+
mutation UpdateScheduledJob($jobId: ID!, $input: WorkflowUpdateScheduledJobInput!) {
|
|
1023
|
+
updateWorkflowScheduledJob(jobId: $jobId, input: $input) {
|
|
876
1024
|
success
|
|
877
1025
|
message
|
|
878
1026
|
job {
|
|
@@ -916,9 +1064,9 @@ function safeErrorMessage(error) {
|
|
|
916
1064
|
}
|
|
917
1065
|
return error instanceof Error ? error.message : String(error);
|
|
918
1066
|
}
|
|
919
|
-
async function runTool(ctx, label,
|
|
1067
|
+
async function runTool(ctx, label, run2) {
|
|
920
1068
|
try {
|
|
921
|
-
return await
|
|
1069
|
+
return await run2();
|
|
922
1070
|
} catch (error) {
|
|
923
1071
|
const message = safeErrorMessage(error);
|
|
924
1072
|
ctx.logger.error(`fluidgrids ${label} failed`, { error: message });
|
|
@@ -1409,17 +1557,346 @@ function registerRunTools(server, ctx, track) {
|
|
|
1409
1557
|
},
|
|
1410
1558
|
async ({ id: runId, nodeId }) => runTool(ctx, "runs_retry_node", async () => {
|
|
1411
1559
|
const runData = await ctx.gql.workspace.request(GET_RUN, { id: runId });
|
|
1412
|
-
const
|
|
1413
|
-
|
|
1414
|
-
|
|
1560
|
+
const states = runData.workflowRun?.nodeStates?.filter(
|
|
1561
|
+
(s) => s.nodeId === nodeId && ["FAILED", "TIMEOUT"].includes(s.status)
|
|
1562
|
+
) ?? [];
|
|
1563
|
+
const [state] = states;
|
|
1564
|
+
if (!state || states.length !== 1) {
|
|
1565
|
+
return errorResult(`Expected one failed node state for run ${runId} node ${nodeId}`);
|
|
1415
1566
|
}
|
|
1416
1567
|
const data = await ctx.gql.workspace.request(RETRY_RUN, {
|
|
1417
|
-
id: state.id
|
|
1568
|
+
id: state.id,
|
|
1569
|
+
nodeId
|
|
1418
1570
|
});
|
|
1419
1571
|
return jsonResult(data.retryNode);
|
|
1420
1572
|
})
|
|
1421
1573
|
);
|
|
1422
1574
|
}
|
|
1575
|
+
var text = z.string().trim().min(1);
|
|
1576
|
+
var json = z.unknown().refine((value) => value !== void 0 && value !== null, "JSON is required");
|
|
1577
|
+
var target = z.object({ workflowKey: text, workflowId: text.max(256), firstRunId: text.optional() }).strict();
|
|
1578
|
+
var run = z.union([text, target]).describe("A run ID or a workflowKey/workflowId target, optionally pinned by firstRunId");
|
|
1579
|
+
var read = { readOnlyHint: true, destructiveHint: false, openWorldHint: false };
|
|
1580
|
+
var write = { readOnlyHint: false, destructiveHint: false, openWorldHint: true };
|
|
1581
|
+
var destructive = { readOnlyHint: false, destructiveHint: true, openWorldHint: true };
|
|
1582
|
+
var duration = z.union([z.number().int().nonnegative(), text]).transform(String);
|
|
1583
|
+
var startShape = {
|
|
1584
|
+
workflowKey: text,
|
|
1585
|
+
version: text.optional(),
|
|
1586
|
+
workflowFn: text.optional(),
|
|
1587
|
+
input: z.unknown().optional(),
|
|
1588
|
+
signals: z.array(z.object({ name: text, payload: z.unknown().optional() }).strict()).max(100).optional(),
|
|
1589
|
+
idempotencyKey: text.optional(),
|
|
1590
|
+
workflowId: text.max(256).optional(),
|
|
1591
|
+
idReusePolicy: z.enum(["ALLOW_DUPLICATE", "ALLOW_DUPLICATE_FAILED_ONLY", "REJECT_DUPLICATE"]).optional(),
|
|
1592
|
+
idConflictPolicy: z.enum(["FAIL", "USE_EXISTING", "TERMINATE_EXISTING"]).optional(),
|
|
1593
|
+
summary: z.string().max(200).optional(),
|
|
1594
|
+
details: z.string().optional(),
|
|
1595
|
+
memo: z.record(z.string(), z.unknown()).optional(),
|
|
1596
|
+
startDelay: duration.optional(),
|
|
1597
|
+
executionTimeout: duration.optional(),
|
|
1598
|
+
runTimeout: duration.optional(),
|
|
1599
|
+
workflowTaskTimeout: duration.optional(),
|
|
1600
|
+
priority: z.number().int().min(1).max(5).optional(),
|
|
1601
|
+
completionCallback: z.object({
|
|
1602
|
+
url: text.url().refine((url) => /^https?:/.test(url), "Use an HTTP(S) callback URL"),
|
|
1603
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
1604
|
+
signingSecret: z.string().min(16).max(512).optional()
|
|
1605
|
+
}).strict().optional(),
|
|
1606
|
+
versioningBehavior: z.enum(["PINNED", "AUTO_UPGRADE"]).optional()
|
|
1607
|
+
};
|
|
1608
|
+
function registerDurableTools(server, ctx, track) {
|
|
1609
|
+
function tool(name, title, description, shape, annotations, handler) {
|
|
1610
|
+
registerTool(
|
|
1611
|
+
server,
|
|
1612
|
+
ctx,
|
|
1613
|
+
track(name),
|
|
1614
|
+
{ title, description, inputSchema: shape, annotations },
|
|
1615
|
+
async (args) => runTool(ctx, name, () => handler(z.object(shape).strict().parse(args)))
|
|
1616
|
+
);
|
|
1617
|
+
}
|
|
1618
|
+
async function request(document, variables, root) {
|
|
1619
|
+
const data = await ctx.gql.workspace.request(
|
|
1620
|
+
document,
|
|
1621
|
+
definedInput(variables)
|
|
1622
|
+
);
|
|
1623
|
+
return jsonResult(data[root] ?? null);
|
|
1624
|
+
}
|
|
1625
|
+
tool(
|
|
1626
|
+
mcpToolName(ctx.productName, "runs_by_workflow_id"),
|
|
1627
|
+
"Run by Workflow ID",
|
|
1628
|
+
"Read the latest visible run of a workflow ID. firstRunId pins its continue-as-new chain. Requires durable parity.",
|
|
1629
|
+
target.shape,
|
|
1630
|
+
read,
|
|
1631
|
+
(args) => request(RUN_BY_WORKFLOW_ID, args, "workflowRunByWorkflowId")
|
|
1632
|
+
);
|
|
1633
|
+
tool(
|
|
1634
|
+
mcpToolName(ctx.productName, "runs_describe"),
|
|
1635
|
+
"Describe Durable Run",
|
|
1636
|
+
"Read execution kind, durable state and determinism status. A workflow-ID target also returns chain metadata.",
|
|
1637
|
+
{ run },
|
|
1638
|
+
read,
|
|
1639
|
+
({ run: ref }) => typeof ref === "string" ? request(DESCRIBE_RUN, { id: ref }, "workflowRun") : request(RUN_BY_WORKFLOW_ID, ref, "workflowRunByWorkflowId")
|
|
1640
|
+
);
|
|
1641
|
+
tool(
|
|
1642
|
+
mcpToolName(ctx.productName, "runs_pending"),
|
|
1643
|
+
"Pending Run Work",
|
|
1644
|
+
"Read pending activities, children, timers, buffered signals and the open workflow task. Requires durable parity.",
|
|
1645
|
+
{ run },
|
|
1646
|
+
read,
|
|
1647
|
+
async ({ run: ref }) => {
|
|
1648
|
+
const byId = typeof ref === "string";
|
|
1649
|
+
const data = await ctx.gql.workspace.request(byId ? RUN_PENDING : RUN_PENDING_BY_WORKFLOW_ID, byId ? { id: ref } : ref);
|
|
1650
|
+
const row = data[byId ? "workflowRun" : "workflowRunByWorkflowId"];
|
|
1651
|
+
return jsonResult(row ? { runId: row.id, status: row.status, pending: row.pending } : null);
|
|
1652
|
+
}
|
|
1653
|
+
);
|
|
1654
|
+
tool(
|
|
1655
|
+
mcpToolName(ctx.productName, "runs_count"),
|
|
1656
|
+
"Count Runs",
|
|
1657
|
+
"Count visible runs, optionally grouped by up to two columns. No pagination applies. Requires durable parity.",
|
|
1658
|
+
{
|
|
1659
|
+
filter: z.object({
|
|
1660
|
+
status: z.enum([
|
|
1661
|
+
"CANCELLED",
|
|
1662
|
+
"COMPLETED",
|
|
1663
|
+
"FAILED",
|
|
1664
|
+
"PENDING",
|
|
1665
|
+
"RUNNING",
|
|
1666
|
+
"TERMINATED",
|
|
1667
|
+
"WAITING"
|
|
1668
|
+
]).optional(),
|
|
1669
|
+
workflowKey: text.optional(),
|
|
1670
|
+
nodeId: text.optional(),
|
|
1671
|
+
search: z.string().optional(),
|
|
1672
|
+
startDate: text.optional(),
|
|
1673
|
+
endDate: text.optional(),
|
|
1674
|
+
errorType: text.optional(),
|
|
1675
|
+
durationMinSeconds: z.number().nonnegative().optional(),
|
|
1676
|
+
durationMaxSeconds: z.number().nonnegative().optional(),
|
|
1677
|
+
executionKind: z.enum(["GRAPH", "DURABLE_FN"]).optional(),
|
|
1678
|
+
businessId: text.optional(),
|
|
1679
|
+
firstRunId: text.optional(),
|
|
1680
|
+
rootRunId: text.optional(),
|
|
1681
|
+
memo: z.record(z.string(), z.unknown()).optional()
|
|
1682
|
+
}).strict().optional(),
|
|
1683
|
+
groupBy: z.array(z.enum(["STATUS", "WORKFLOW_KEY", "EXECUTION_KIND", "TASK_QUEUE"])).max(2).optional()
|
|
1684
|
+
},
|
|
1685
|
+
read,
|
|
1686
|
+
(args) => request(RUNS_COUNT, args, "workflowRunsCount")
|
|
1687
|
+
);
|
|
1688
|
+
tool(
|
|
1689
|
+
mcpToolName(ctx.productName, "runs_history"),
|
|
1690
|
+
"Run History Page",
|
|
1691
|
+
"Read one bounded history page. Pass nextAfter as after; offloaded payload URLs are returned, not fetched.",
|
|
1692
|
+
{
|
|
1693
|
+
run,
|
|
1694
|
+
after: z.number().int().nonnegative().optional(),
|
|
1695
|
+
limit: z.number().int().min(1).max(1e3).optional()
|
|
1696
|
+
},
|
|
1697
|
+
read,
|
|
1698
|
+
({ run: ref, ...options }) => request(
|
|
1699
|
+
typeof ref === "string" ? RUN_HISTORY : RUN_HISTORY_BY_TARGET,
|
|
1700
|
+
{ ...typeof ref === "string" ? { runId: ref } : { target: ref }, ...options },
|
|
1701
|
+
"workflowRunHistory"
|
|
1702
|
+
)
|
|
1703
|
+
);
|
|
1704
|
+
tool(
|
|
1705
|
+
mcpToolName(ctx.productName, "runs_signal"),
|
|
1706
|
+
"Signal Run",
|
|
1707
|
+
"Send a signal, potentially resuming a workflow and external actions. Use an idempotencyKey for safe retries. Gateway execute permission and feature gates apply.",
|
|
1708
|
+
{ run, name: text, payload: z.unknown().optional(), idempotencyKey: text.optional() },
|
|
1709
|
+
destructive,
|
|
1710
|
+
({ run: ref, ...input }) => request(
|
|
1711
|
+
typeof ref === "string" ? SIGNAL_RUN : SIGNAL_RUN_BY_TARGET,
|
|
1712
|
+
{ ...typeof ref === "string" ? { runId: ref } : { target: ref }, ...input },
|
|
1713
|
+
"signalWorkflowRun"
|
|
1714
|
+
)
|
|
1715
|
+
);
|
|
1716
|
+
tool(
|
|
1717
|
+
mcpToolName(ctx.productName, "runs_stack_trace"),
|
|
1718
|
+
"Run Stack Trace",
|
|
1719
|
+
"Read the current replayed stack trace. Enhanced traces and optional metadata describe current execution; metadata and workflow-ID targets require durable parity.",
|
|
1720
|
+
{ run, enhanced: z.boolean().optional(), metadata: z.boolean().optional() },
|
|
1721
|
+
read,
|
|
1722
|
+
({ run: ref, enhanced, metadata }) => request(
|
|
1723
|
+
typeof ref !== "string" || metadata ? RUN_STACK_TRACE_PARITY : RUN_STACK_TRACE,
|
|
1724
|
+
{
|
|
1725
|
+
...typeof ref === "string" ? { runId: ref } : { target: ref },
|
|
1726
|
+
enhanced,
|
|
1727
|
+
...metadata ? { metadata } : {}
|
|
1728
|
+
},
|
|
1729
|
+
"workflowRunStackTrace"
|
|
1730
|
+
)
|
|
1731
|
+
);
|
|
1732
|
+
tool(
|
|
1733
|
+
mcpToolName(ctx.productName, "runs_determinism"),
|
|
1734
|
+
"Run Determinism Status",
|
|
1735
|
+
"Read whether workflow tasks keep failing and why, without changing run state.",
|
|
1736
|
+
{ runId: text },
|
|
1737
|
+
read,
|
|
1738
|
+
(args) => request(RUN_DETERMINISM_STATUS, args, "workflowRunDeterminismStatus")
|
|
1739
|
+
);
|
|
1740
|
+
tool(
|
|
1741
|
+
mcpToolName(ctx.productName, "runs_terminate"),
|
|
1742
|
+
"Terminate Run",
|
|
1743
|
+
"Immediately stop a run without cancellation handlers. This is destructive and requires gateway workflow-run delete permission.",
|
|
1744
|
+
{ run, reason: z.string().optional() },
|
|
1745
|
+
destructive,
|
|
1746
|
+
({ run: ref, reason }) => request(
|
|
1747
|
+
typeof ref === "string" ? TERMINATE_RUN : TERMINATE_RUN_BY_TARGET,
|
|
1748
|
+
{ ...typeof ref === "string" ? { runId: ref } : { target: ref }, reason },
|
|
1749
|
+
"terminateWorkflowRun"
|
|
1750
|
+
)
|
|
1751
|
+
);
|
|
1752
|
+
tool(
|
|
1753
|
+
mcpToolName(ctx.productName, "workflows_start"),
|
|
1754
|
+
"Start Durable Workflow",
|
|
1755
|
+
"Start a durable workflow, which may execute external actions. Confirm intent before calling. TERMINATE_EXISTING terminates the open run and uses the separate delete-permission gateway operation. Parity options require durable parity.",
|
|
1756
|
+
startShape,
|
|
1757
|
+
destructive,
|
|
1758
|
+
({ memo, completionCallback, ...input }) => {
|
|
1759
|
+
const terminate = input.idConflictPolicy === "TERMINATE_EXISTING";
|
|
1760
|
+
if (terminate && !input.workflowId)
|
|
1761
|
+
throw new McpUserError("TERMINATE_EXISTING requires workflowId");
|
|
1762
|
+
const parity = Object.keys(input).some(
|
|
1763
|
+
(key) => ![
|
|
1764
|
+
"workflowKey",
|
|
1765
|
+
"version",
|
|
1766
|
+
"workflowFn",
|
|
1767
|
+
"input",
|
|
1768
|
+
"signals",
|
|
1769
|
+
"idempotencyKey"
|
|
1770
|
+
].includes(key)
|
|
1771
|
+
) || memo !== void 0 || completionCallback !== void 0;
|
|
1772
|
+
return request(
|
|
1773
|
+
terminate ? START_WORKFLOW_TERMINATE_EXISTING : parity ? START_WORKFLOW_PARITY : START_WORKFLOW,
|
|
1774
|
+
{
|
|
1775
|
+
input: definedInput({
|
|
1776
|
+
...input,
|
|
1777
|
+
context: memo,
|
|
1778
|
+
completionCallbackUrl: completionCallback?.url,
|
|
1779
|
+
completionCallbackHeaders: completionCallback?.headers,
|
|
1780
|
+
completionCallbackSigningSecret: completionCallback?.signingSecret
|
|
1781
|
+
})
|
|
1782
|
+
},
|
|
1783
|
+
terminate ? "startWorkflowTerminateExisting" : "startWorkflow"
|
|
1784
|
+
);
|
|
1785
|
+
}
|
|
1786
|
+
);
|
|
1787
|
+
tool(
|
|
1788
|
+
mcpToolName(ctx.productName, "workflows_export"),
|
|
1789
|
+
"Export Workflow",
|
|
1790
|
+
"Read a portable workflow document or generated code with a fidelity report. Returned file URLs are not downloaded.",
|
|
1791
|
+
{
|
|
1792
|
+
workflowKey: text,
|
|
1793
|
+
version: text.optional(),
|
|
1794
|
+
format: z.enum(["JSON", "TYPESCRIPT", "PYTHON", "YAML", "BUNDLE"]).optional(),
|
|
1795
|
+
options: z.object({
|
|
1796
|
+
connectionNames: z.boolean().optional(),
|
|
1797
|
+
connectionNameMap: z.record(z.string(), z.string()).optional(),
|
|
1798
|
+
includeLayout: z.boolean().optional(),
|
|
1799
|
+
includePinnedData: z.boolean().optional()
|
|
1800
|
+
}).strict().optional()
|
|
1801
|
+
},
|
|
1802
|
+
read,
|
|
1803
|
+
(args) => request(EXPORT_WORKFLOW, args, "exportWorkflow")
|
|
1804
|
+
);
|
|
1805
|
+
tool(
|
|
1806
|
+
mcpToolName(ctx.productName, "workflows_interface"),
|
|
1807
|
+
"Workflow Interface",
|
|
1808
|
+
"Read the typed interface of a workflow version; null when none exists.",
|
|
1809
|
+
{ workflowKey: text, version: text.optional() },
|
|
1810
|
+
read,
|
|
1811
|
+
(args) => request(WORKFLOW_INTERFACE, args, "workflowInterface")
|
|
1812
|
+
);
|
|
1813
|
+
tool(
|
|
1814
|
+
mcpToolName(ctx.productName, "workflows_validate"),
|
|
1815
|
+
"Validate Workflow",
|
|
1816
|
+
"Validate definition JSON without saving or executing it. strict adds code-authored IR rules.",
|
|
1817
|
+
{ definitionJson: json, strict: z.boolean().optional() },
|
|
1818
|
+
read,
|
|
1819
|
+
(args) => request(VALIDATE_WORKFLOW_DEFINITION, args, "validateWorkflowDefinition")
|
|
1820
|
+
);
|
|
1821
|
+
tool(
|
|
1822
|
+
mcpToolName(ctx.productName, "workflows_create_version"),
|
|
1823
|
+
"Create Workflow Version",
|
|
1824
|
+
"Add a workflow version without running it. Preserve baseVersion/expectedRevision/editSessionId for optimistic concurrency.",
|
|
1825
|
+
{
|
|
1826
|
+
workflowKey: text,
|
|
1827
|
+
definitionJson: json,
|
|
1828
|
+
version: text.optional(),
|
|
1829
|
+
description: z.string().optional(),
|
|
1830
|
+
alias: text.optional(),
|
|
1831
|
+
baseVersion: text.optional(),
|
|
1832
|
+
expectedRevision: z.number().int().nonnegative().optional(),
|
|
1833
|
+
editSessionId: text.optional(),
|
|
1834
|
+
interface: z.unknown().optional(),
|
|
1835
|
+
authoring: z.unknown().optional()
|
|
1836
|
+
},
|
|
1837
|
+
write,
|
|
1838
|
+
({ workflowKey, ...input }) => request(
|
|
1839
|
+
CREATE_WORKFLOW_VERSION,
|
|
1840
|
+
{ workflowKey, input: definedInput(input) },
|
|
1841
|
+
"createWorkflowVersion"
|
|
1842
|
+
)
|
|
1843
|
+
);
|
|
1844
|
+
tool(
|
|
1845
|
+
mcpToolName(ctx.productName, "workflows_import"),
|
|
1846
|
+
"Import Workflow",
|
|
1847
|
+
"Create a DRAFT from exactly one of definitionJson or inline source files. The service validates/builds source; no workflow is started. Never put literal credentials in imported source.",
|
|
1848
|
+
{
|
|
1849
|
+
name: text,
|
|
1850
|
+
definitionJson: json.optional(),
|
|
1851
|
+
source: z.object({
|
|
1852
|
+
format: z.enum(["JSON", "TYPESCRIPT"]),
|
|
1853
|
+
files: z.array(z.object({ path: text, content: z.string() }).strict()).min(1),
|
|
1854
|
+
connections: z.record(z.string(), z.object({ connectionId: text, adapter: text.optional() }).strict()).optional()
|
|
1855
|
+
}).strict().optional(),
|
|
1856
|
+
workflowKey: text.optional(),
|
|
1857
|
+
version: text.optional(),
|
|
1858
|
+
description: z.string().optional(),
|
|
1859
|
+
alias: text.optional(),
|
|
1860
|
+
context: z.unknown().optional(),
|
|
1861
|
+
tags: z.array(z.string()).optional(),
|
|
1862
|
+
tagsV2: z.unknown().optional(),
|
|
1863
|
+
icon: z.string().optional(),
|
|
1864
|
+
category: z.string().optional(),
|
|
1865
|
+
nodeMappings: z.unknown().optional(),
|
|
1866
|
+
allowMissingNodes: z.boolean().optional()
|
|
1867
|
+
},
|
|
1868
|
+
write,
|
|
1869
|
+
(input) => {
|
|
1870
|
+
if (input.definitionJson === void 0 === (input.source === void 0))
|
|
1871
|
+
throw new McpUserError("Import requires exactly one of definitionJson or source");
|
|
1872
|
+
return request(IMPORT_WORKFLOW, { input: definedInput(input) }, "importWorkflow");
|
|
1873
|
+
}
|
|
1874
|
+
);
|
|
1875
|
+
tool(
|
|
1876
|
+
mcpToolName(ctx.productName, "workflows_import_template"),
|
|
1877
|
+
"Import Workflow Template",
|
|
1878
|
+
"Import a store template as a DRAFT workflow. This does not purchase a template, activate it or run it.",
|
|
1879
|
+
{
|
|
1880
|
+
name: text,
|
|
1881
|
+
definitionJson: json,
|
|
1882
|
+
sourceTemplateId: text,
|
|
1883
|
+
sourceTemplateName: z.string().optional(),
|
|
1884
|
+
workflowKey: text.optional(),
|
|
1885
|
+
description: z.string().optional(),
|
|
1886
|
+
category: z.string().optional(),
|
|
1887
|
+
icon: z.string().optional(),
|
|
1888
|
+
tags: z.array(z.string()).optional(),
|
|
1889
|
+
projectId: text.optional(),
|
|
1890
|
+
context: z.unknown().optional()
|
|
1891
|
+
},
|
|
1892
|
+
write,
|
|
1893
|
+
(input) => request(
|
|
1894
|
+
IMPORT_WORKFLOW_TEMPLATE,
|
|
1895
|
+
{ input: definedInput(input) },
|
|
1896
|
+
"importWorkflowTemplate"
|
|
1897
|
+
)
|
|
1898
|
+
);
|
|
1899
|
+
}
|
|
1423
1900
|
function registerScheduledJobTools(server, ctx, track) {
|
|
1424
1901
|
server.registerTool(
|
|
1425
1902
|
track(mcpToolName(ctx.productName, "scheduled_jobs_list")),
|
|
@@ -1498,7 +1975,7 @@ function registerScheduledJobTools(server, ctx, track) {
|
|
|
1498
1975
|
async ({ jobId, ...input }) => runTool(ctx, "scheduled_jobs_update", async () => {
|
|
1499
1976
|
const data = await ctx.gql.workspace.request(
|
|
1500
1977
|
UPDATE_SCHEDULED_JOB,
|
|
1501
|
-
{
|
|
1978
|
+
{ jobId, input: definedInput(input) }
|
|
1502
1979
|
);
|
|
1503
1980
|
return jsonResult(data.updateWorkflowScheduledJob);
|
|
1504
1981
|
})
|
|
@@ -2113,6 +2590,7 @@ var fluidgridsModule = {
|
|
|
2113
2590
|
};
|
|
2114
2591
|
registerWorkflowTools(server, ctx, trackTool);
|
|
2115
2592
|
registerRunTools(server, ctx, trackTool);
|
|
2593
|
+
registerDurableTools(server, ctx, trackTool);
|
|
2116
2594
|
registerNodeTools(server, ctx, trackTool);
|
|
2117
2595
|
registerCredentialTools(server, ctx, trackTool);
|
|
2118
2596
|
registerWebhookTools(server, ctx, trackTool);
|