@burdenoff/mcp-libs 2026.1110.5 → 2026.1110.6

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.
@@ -3,13 +3,13 @@ import { z } from "zod";
3
3
 
4
4
  // src/modules/fluidgrids/durable-operations.ts
5
5
  /** Code-first and durable-run documents, matching sdk-libs-node's FluidGrids contract. */
6
- const WORKFLOW_FIELDS = `id workflowKey name description version status category tags icon isActive totalVersions createdAt updatedAt`;
7
- const RUN_FIELDS = `
6
+ const WORKFLOW_FIELDS$1 = `id workflowKey name description version status category tags icon isActive totalVersions createdAt updatedAt`;
7
+ const RUN_FIELDS$1 = `
8
8
  id workflowId workflowKey version status startedAt completedAt duration errorMessage
9
9
  executionKind workflowFn taskQueue buildId historyLength parentClosePolicy cancelRequestedAt
10
10
  determinism { failing cause attempts since lastFailureSeq message }
11
11
  `;
12
- const PARITY_FIELDS = `${RUN_FIELDS}
12
+ const PARITY_FIELDS = `${RUN_FIELDS$1}
13
13
  businessId runAttempt firstRunId continuedFromRunId continuedToRunId priority
14
14
  summary details currentDetails memo startDelayUntil runTimeoutAt executionTimeoutAt
15
15
  `;
@@ -33,20 +33,20 @@ const EXPORT_WORKFLOW = `
33
33
  const IMPORT_WORKFLOW = `
34
34
  mutation FluidgridsImportWorkflow($input: ImportWorkflowInput!) {
35
35
  importWorkflow(input: $input) {
36
- success message workflow { ${WORKFLOW_FIELDS} }
36
+ success message workflow { ${WORKFLOW_FIELDS$1} }
37
37
  validation { valid errors warnings missingNodes { nodeId nodeType nodeVersion } }
38
38
  }
39
39
  }
40
40
  `;
41
41
  const IMPORT_WORKFLOW_TEMPLATE = `
42
42
  mutation FluidgridsImportWorkflowTemplate($input: ImportWorkflowTemplateInput!) {
43
- importWorkflowTemplate(input: $input) { success message workflow { ${WORKFLOW_FIELDS} } }
43
+ importWorkflowTemplate(input: $input) { success message workflow { ${WORKFLOW_FIELDS$1} } }
44
44
  }
45
45
  `;
46
46
  const CREATE_WORKFLOW_VERSION = `
47
47
  mutation FluidgridsCreateWorkflowVersion($workflowKey: String!, $input: CreateWorkflowVersionInput!) {
48
48
  createWorkflowVersion(workflowKey: $workflowKey, input: $input) {
49
- success message workflow { ${WORKFLOW_FIELDS} }
49
+ success message workflow { ${WORKFLOW_FIELDS$1} }
50
50
  }
51
51
  }
52
52
  `;
@@ -65,7 +65,7 @@ const WORKFLOW_INTERFACE = `
65
65
  `;
66
66
  const START_WORKFLOW = `
67
67
  mutation FluidgridsStartWorkflow($input: StartWorkflowInput!) {
68
- startWorkflow(input: $input) { run { ${RUN_FIELDS} } existing }
68
+ startWorkflow(input: $input) { run { ${RUN_FIELDS$1} } existing }
69
69
  }
70
70
  `;
71
71
  const START_WORKFLOW_PARITY = `
@@ -79,7 +79,7 @@ const START_WORKFLOW_TERMINATE_EXISTING = `
79
79
  }
80
80
  `;
81
81
  const DESCRIBE_RUN = `
82
- query FluidgridsDescribeRun($id: ID!) { workflowRun(id: $id) { ${RUN_FIELDS} } }
82
+ query FluidgridsDescribeRun($id: ID!) { workflowRun(id: $id) { ${RUN_FIELDS$1} } }
83
83
  `;
84
84
  const RUN_BY_WORKFLOW_ID = `
85
85
  query FluidgridsRunByWorkflowId($workflowKey: String!, $workflowId: String!, $firstRunId: ID) {
@@ -149,6 +149,463 @@ const TERMINATE_RUN_BY_TARGET = `
149
149
  }
150
150
  `;
151
151
 
152
+ // src/modules/fluidgrids/extended-operations.ts
153
+ /**
154
+ * FluidGrids documents for the operations sdk-libs-node added in its
155
+ * 2026-11-02 wave that the MCP exposes (BOFF-10887): run inspection, workflow
156
+ * version summaries, the node catalog, insights, webhook deliveries, tool
157
+ * approvals, log streams, secrets providers, variables, data tables, static
158
+ * data and pinned data.
159
+ *
160
+ * Every document is copied from sdk-libs-node `src/modules/fluidgrids/operations.ts`
161
+ * with the same operation name, so a document here and its SDK twin stay easy to
162
+ * compare. The SDK validates them against the production supergraph every night
163
+ * (Operation Conformance); tests/unit/platform-supergraph-contract.test.ts
164
+ * validates them here. All of them are workspace tier.
165
+ *
166
+ * The SDK operations the MCP does not expose (and why) are listed in
167
+ * .parity-allowlist.yaml.
168
+ */
169
+ const WORKFLOW_FIELDS = `
170
+ id workflowKey name description version status category tags icon isActive
171
+ totalVersions projectId createdAt updatedAt
172
+ `;
173
+ const RUN_FIELDS = `
174
+ id workflowId workflowKey version status mode startedAt completedAt duration
175
+ triggeredById triggerNodeId errorMessage errorType progress totalNodes
176
+ completedNodes failedNodes skippedNodes createdAt
177
+ `;
178
+ const NODE_STATE_FIELDS = `
179
+ id nodeId nodeType nodeVersion status error errorType attemptCount startTime endTime duration
180
+ output
181
+ `;
182
+ const NODE_STATE_DETAIL_FIELDS = `
183
+ ${NODE_STATE_FIELDS} runId inputArgs instanceKey childRunId resumeTime reusedFromRunId
184
+ usedPinnedData
185
+ `;
186
+ /** One run in the sub-workflow tree: where it sits and which node of its parent started it. */
187
+ const RUN_HIERARCHY_NODE_FIELDS = `depth parentNodeId run { ${RUN_FIELDS} }`;
188
+ /**
189
+ * A document cannot recurse, so six levels of sub-workflow runs are spelled
190
+ * out: depth 9 of the gateways' 10. A run nested deeper is cut off.
191
+ */
192
+ const RUN_HIERARCHY_CHILDREN = `
193
+ children { ${RUN_HIERARCHY_NODE_FIELDS}
194
+ children { ${RUN_HIERARCHY_NODE_FIELDS}
195
+ children { ${RUN_HIERARCHY_NODE_FIELDS}
196
+ children { ${RUN_HIERARCHY_NODE_FIELDS}
197
+ children { ${RUN_HIERARCHY_NODE_FIELDS}
198
+ children { ${RUN_HIERARCHY_NODE_FIELDS} }
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ `;
205
+ const NODE_FIELDS = `
206
+ id nodeType nodeVersion name description category icon logo keywords kind author
207
+ publishType status isLatest endpointUrl operations supportsAdapterMode
208
+ adapterOutputType docsUrl createdAt updatedAt
209
+ `;
210
+ const OPERATION_CONFIG_FIELDS = `id nodeType nodeVersion operationName config createdAt updatedAt`;
211
+ const NODE_INSTALLATION_FIELDS = `
212
+ id workspaceId nodeType nodeVersion publishType isEnabled config enabledAt enabledById
213
+ disabledAt updatedAt
214
+ `;
215
+ /**
216
+ * One request that reached a webhook's URL. The backend masks credentials in
217
+ * `requestHeaders` as `[REDACTED]`; the body is what the sender sent.
218
+ */
219
+ const WEBHOOK_DELIVERY_FIELDS = `
220
+ id eventRegistrationId requestHeaders requestBody requestIp validationPassed validationError
221
+ workflowRunId executionStarted executionError responseStatus responseBody receivedAt
222
+ processedAt duration
223
+ `;
224
+ const SCHEDULED_JOB_FIELDS = `
225
+ id name workflowKey version schedule enabled nextRun lastRun config workspaceId createdAt
226
+ updatedAt
227
+ `;
228
+ const TOOL_APPROVAL_REQUEST_FIELDS = `
229
+ id runId nodeId workflowId workflowKey workspaceId status
230
+ toolCalls { callId name argsJson }
231
+ decisions { callId decision reason }
232
+ timeoutAt timeoutAction requestedAt decidedAt decidedBy createdAt updatedAt
233
+ `;
234
+ /** `hasSecret` says whether a secret is stored; the secret itself is never returned. */
235
+ const LOG_STREAM_DESTINATION_FIELDS = `
236
+ id workspaceId name provider endpoint config hasSecret eventFilters isEnabled lastDispatchedAt
237
+ lastDispatchStatus lastDispatchError createdAt updatedAt createdBy updatedBy
238
+ `;
239
+ /** Where an external secret store lives; no credential is part of the type. */
240
+ const SECRETS_PROVIDER_CONFIG_FIELDS = `
241
+ id workspaceId provider awsRegion awsSecretsManagerPrefix azureKeyVaultUri gcpProjectId
242
+ vaultAddress vaultMountPath isEnabled lastTestStatus lastTestMessage lastTestedAt createdAt
243
+ updatedAt
244
+ `;
245
+ const WORKFLOW_STATIC_DATA_FIELDS = `
246
+ id workflowKey scope nodeId data sizeBytes version workspaceId createdAt updatedAt
247
+ `;
248
+ /** `value` is null for a secret or externally backed variable. */
249
+ const WORKFLOW_VARIABLE_FIELDS = `
250
+ id key scope projectId workspaceId description isSecret value externalProvider externalRef
251
+ createdAt createdBy updatedAt updatedBy
252
+ `;
253
+ const DATA_TABLE_FIELDS = `
254
+ id workspaceId name description
255
+ columns { key label type required defaultValue }
256
+ rowCount sizeBytes createdAt createdBy updatedAt updatedBy
257
+ `;
258
+ const DATA_TABLE_ROW_FIELDS = `id tableId data createdAt updatedAt`;
259
+ const PINNED_WORKFLOW_FIELDS = `${WORKFLOW_FIELDS} pinnedNodeData`;
260
+ const GET_WORKFLOW_SUMMARY = `
261
+ query FluidgridsGetWorkflowSummary($workflowKey: String!) {
262
+ workflowSummary(workflowKey: $workflowKey) {
263
+ workflowKey
264
+ totalVersions
265
+ latestVersion
266
+ createdAt
267
+ lastModified
268
+ }
269
+ }
270
+ `;
271
+ const DIFF_WORKFLOW_VERSIONS = `
272
+ query FluidgridsDiffWorkflowVersions(
273
+ $workflowKey: String!
274
+ $fromVersion: String!
275
+ $toVersion: String!
276
+ ) {
277
+ workflowVersionDiff(
278
+ workflowKey: $workflowKey
279
+ fromVersion: $fromVersion
280
+ toVersion: $toVersion
281
+ ) {
282
+ workflowKey
283
+ fromVersion
284
+ toVersion
285
+ truncated
286
+ entries { path kind before after }
287
+ }
288
+ }
289
+ `;
290
+ /** A new DRAFT copied from an old version; the old one is untouched. */
291
+ const RESTORE_WORKFLOW_VERSION = `
292
+ mutation FluidgridsRestoreWorkflowVersion($workflowKey: String!, $version: String!) {
293
+ restoreWorkflowVersion(workflowKey: $workflowKey, version: $version) {
294
+ success
295
+ message
296
+ workflow { ${WORKFLOW_FIELDS} }
297
+ }
298
+ }
299
+ `;
300
+ const GET_RUN_HIERARCHY = `
301
+ query FluidgridsGetRunHierarchy($runId: ID!) {
302
+ workflowRunHierarchy(runId: $runId) {
303
+ totalDepth
304
+ root { ${RUN_FIELDS} }
305
+ ${RUN_HIERARCHY_CHILDREN}
306
+ }
307
+ }
308
+ `;
309
+ const LIST_NODE_STATES = `
310
+ query FluidgridsListNodeStates($runId: String!) {
311
+ nodeStates(runId: $runId) { ${NODE_STATE_FIELDS} }
312
+ }
313
+ `;
314
+ const GET_NODE_STATE = `
315
+ query FluidgridsGetNodeState($id: ID!) {
316
+ nodeState(id: $id) { ${NODE_STATE_DETAIL_FIELDS} }
317
+ }
318
+ `;
319
+ /** The backend's read-only preflight for a run from a node. */
320
+ const CAN_RUN_FROM_NODE = `
321
+ query FluidgridsCanRunFromNode($input: RunFromNodeEligibilityInput!) {
322
+ runFromNodeEligibility(input: $input) {
323
+ eligible
324
+ reason
325
+ sourceRunId
326
+ workflowKey
327
+ version
328
+ targetNodeId
329
+ targetStatus
330
+ sourceMode
331
+ ancestorNodeIds
332
+ completedAncestorNodeIds
333
+ blockedNodeIds
334
+ blockers
335
+ }
336
+ }
337
+ `;
338
+ const LIST_CUSTOM_NODES = `
339
+ query FluidgridsListCustomNodes($pagination: WorkflowPaginationInput) {
340
+ customNodes(pagination: $pagination) {
341
+ items { ${NODE_FIELDS} }
342
+ pagination { page limit total totalPages hasNext hasPrev }
343
+ }
344
+ }
345
+ `;
346
+ /** A JSON object assembled from the registry's record; null when there is no such node. */
347
+ const GET_NODE_MANIFEST = `
348
+ query FluidgridsGetNodeManifest($nodeType: String!, $version: String!) {
349
+ nodeManifest(nodeType: $nodeType, version: $version)
350
+ }
351
+ `;
352
+ const GET_NODE_USAGE_STATUS = `
353
+ query FluidgridsGetNodeUsageStatus($nodeType: String!, $nodeVersion: String!) {
354
+ nodeUsageStatus(nodeType: $nodeType, nodeVersion: $nodeVersion) {
355
+ nodeType
356
+ nodeVersion
357
+ isInUse
358
+ workflowCount
359
+ workflows { workflowId workflowKey workflowName }
360
+ }
361
+ }
362
+ `;
363
+ const LIST_OPERATION_CONFIGS = `
364
+ query FluidgridsListOperationConfigs(
365
+ $nodeType: String
366
+ $nodeVersion: String
367
+ $pagination: WorkflowPaginationInput
368
+ ) {
369
+ operationConfigs(nodeType: $nodeType, nodeVersion: $nodeVersion, pagination: $pagination) {
370
+ configs { ${OPERATION_CONFIG_FIELDS} }
371
+ pagination { total limit offset hasMore }
372
+ }
373
+ }
374
+ `;
375
+ const GET_OPERATION_CONFIG = `
376
+ query FluidgridsGetOperationConfig(
377
+ $nodeType: String!
378
+ $nodeVersion: String!
379
+ $operationName: String!
380
+ ) {
381
+ operationConfig(nodeType: $nodeType, nodeVersion: $nodeVersion, operationName: $operationName) {
382
+ ${OPERATION_CONFIG_FIELDS}
383
+ }
384
+ }
385
+ `;
386
+ const LIST_NODE_INSTALLATIONS = `
387
+ query FluidgridsListNodeInstallations {
388
+ workspaceNodeInstallations { ${NODE_INSTALLATION_FIELDS} }
389
+ }
390
+ `;
391
+ const LIST_WEBHOOK_DELIVERIES = `
392
+ query FluidgridsListWebhookDeliveries($eventRegistrationId: String!, $limit: Int) {
393
+ webhookDeliveryLogs(eventRegistrationId: $eventRegistrationId, limit: $limit) {
394
+ ${WEBHOOK_DELIVERY_FIELDS}
395
+ }
396
+ }
397
+ `;
398
+ const LIST_ALL_WEBHOOK_DELIVERIES = `
399
+ query FluidgridsListAllWebhookDeliveries($limit: Int, $offset: Int, $validationPassed: Boolean) {
400
+ allWebhookDeliveries(limit: $limit, offset: $offset, validationPassed: $validationPassed) {
401
+ ${WEBHOOK_DELIVERY_FIELDS}
402
+ }
403
+ }
404
+ `;
405
+ const LIST_WEBHOOK_EVENT_FILTERS = `
406
+ query FluidgridsListWebhookEventFilters($eventRegistrationId: String!) {
407
+ eventFilters(eventRegistrationId: $eventRegistrationId) {
408
+ id
409
+ eventRegistrationId
410
+ filterType
411
+ filterExpression
412
+ isActive
413
+ createdAt
414
+ updatedAt
415
+ }
416
+ }
417
+ `;
418
+ const RESTORE_SCHEDULED_JOB = `
419
+ mutation FluidgridsRestoreScheduledJob($jobId: ID!) {
420
+ restoreScheduledJob(jobId: $jobId) {
421
+ success
422
+ message
423
+ job { ${SCHEDULED_JOB_FIELDS} }
424
+ }
425
+ }
426
+ `;
427
+ const GET_SCHEDULER_STATUS = `
428
+ query FluidgridsGetSchedulerStatus {
429
+ workflowScheduledJobsStatus
430
+ }
431
+ `;
432
+ const GET_ERROR_ANALYTICS = `
433
+ query FluidgridsGetErrorAnalytics($input: ErrorAnalyticsInput) {
434
+ errorAnalytics(input: $input) {
435
+ totalErrors
436
+ errorsByType { errorType count }
437
+ topFailingWorkflows { workflowKey name totalRuns failureCount failureRate }
438
+ topFailingNodes { nodeType totalExecutions failureCount failureRate sampleError }
439
+ trend { date count }
440
+ }
441
+ }
442
+ `;
443
+ const GET_USAGE_TIME_SERIES = `
444
+ query FluidgridsGetUsageTimeSeries($input: TimeSeriesInput!) {
445
+ usageTimeSeries(input: $input) {
446
+ metric
447
+ granularity
448
+ dataPoints {
449
+ timestamp
450
+ workflowRuns
451
+ successfulRuns
452
+ failedRuns
453
+ cancelledRuns
454
+ nodeExecutions
455
+ averageDuration
456
+ totalDuration
457
+ }
458
+ }
459
+ }
460
+ `;
461
+ const GET_DETAILED_NODE_USAGE = `
462
+ query FluidgridsGetDetailedNodeUsage($input: DetailedNodeUsageInput!) {
463
+ detailedNodeUsage(input: $input) {
464
+ nodeType
465
+ nodeVersion
466
+ executionCount
467
+ successCount
468
+ failureCount
469
+ skipCount
470
+ totalDuration
471
+ averageDuration
472
+ medianDuration
473
+ minDuration
474
+ maxDuration
475
+ successRate
476
+ lastExecutedAt
477
+ }
478
+ }
479
+ `;
480
+ const GET_BILLING_SUMMARY = `
481
+ query FluidgridsGetBillingSummary($input: BillingSummaryInput!) {
482
+ billingSummary(input: $input) {
483
+ period
484
+ totalWorkflowRuns
485
+ totalNodeExecutions
486
+ totalDurationSeconds
487
+ nodeMinutes
488
+ estimatedCost
489
+ breakdown
490
+ }
491
+ }
492
+ `;
493
+ const LIST_PENDING_TOOL_APPROVALS = `
494
+ query FluidgridsListPendingToolApprovals($limit: Int, $offset: Int) {
495
+ pendingToolApprovals(limit: $limit, offset: $offset) {
496
+ totalCount
497
+ items { ${TOOL_APPROVAL_REQUEST_FIELDS} }
498
+ }
499
+ }
500
+ `;
501
+ const GET_TOOL_APPROVAL_REQUEST = `
502
+ query FluidgridsGetToolApprovalRequest($id: ID!) {
503
+ toolApprovalRequest(id: $id) { ${TOOL_APPROVAL_REQUEST_FIELDS} }
504
+ }
505
+ `;
506
+ const LIST_LOG_STREAM_DESTINATIONS = `
507
+ query FluidgridsListLogStreamDestinations {
508
+ logStreamDestinations { ${LOG_STREAM_DESTINATION_FIELDS} }
509
+ }
510
+ `;
511
+ const GET_LOG_STREAM_DESTINATION = `
512
+ query FluidgridsGetLogStreamDestination($id: ID!) {
513
+ logStreamDestination(id: $id) { ${LOG_STREAM_DESTINATION_FIELDS} }
514
+ }
515
+ `;
516
+ const LIST_SECRETS_PROVIDER_CONFIGS = `
517
+ query FluidgridsListSecretsProviderConfigs {
518
+ secretsProviderConfigs { ${SECRETS_PROVIDER_CONFIG_FIELDS} }
519
+ }
520
+ `;
521
+ const LIST_WORKFLOW_VARIABLES = `
522
+ query FluidgridsListWorkflowVariables($projectId: ID, $scope: VariableScope) {
523
+ workflowVariables(projectId: $projectId, scope: $scope) {
524
+ total
525
+ variables { ${WORKFLOW_VARIABLE_FIELDS} }
526
+ }
527
+ }
528
+ `;
529
+ const GET_WORKFLOW_VARIABLE = `
530
+ query FluidgridsGetWorkflowVariable($id: ID!) {
531
+ workflowVariable(id: $id) { ${WORKFLOW_VARIABLE_FIELDS} }
532
+ }
533
+ `;
534
+ const CREATE_WORKFLOW_VARIABLE = `
535
+ mutation FluidgridsCreateWorkflowVariable($input: CreateWorkflowVariableInput!) {
536
+ createWorkflowVariable(input: $input) {
537
+ success
538
+ message
539
+ variable { ${WORKFLOW_VARIABLE_FIELDS} }
540
+ }
541
+ }
542
+ `;
543
+ const UPDATE_WORKFLOW_VARIABLE = `
544
+ mutation FluidgridsUpdateWorkflowVariable($id: ID!, $input: UpdateWorkflowVariableInput!) {
545
+ updateWorkflowVariable(id: $id, input: $input) {
546
+ success
547
+ message
548
+ variable { ${WORKFLOW_VARIABLE_FIELDS} }
549
+ }
550
+ }
551
+ `;
552
+ const DELETE_WORKFLOW_VARIABLE = `
553
+ mutation FluidgridsDeleteWorkflowVariable($id: ID!) {
554
+ deleteWorkflowVariable(id: $id) {
555
+ success
556
+ message
557
+ }
558
+ }
559
+ `;
560
+ const LIST_DATA_TABLES = `
561
+ query FluidgridsListDataTables($search: String, $limit: Int, $offset: Int) {
562
+ dataTables(search: $search, limit: $limit, offset: $offset) {
563
+ total
564
+ tables { ${DATA_TABLE_FIELDS} }
565
+ }
566
+ }
567
+ `;
568
+ const GET_DATA_TABLE = `
569
+ query FluidgridsGetDataTable($id: ID!) {
570
+ dataTable(id: $id) { ${DATA_TABLE_FIELDS} }
571
+ }
572
+ `;
573
+ const QUERY_DATA_TABLE_ROWS = `
574
+ query FluidgridsQueryDataTableRows($input: DataTableRowsQueryInput!) {
575
+ dataTableRows(input: $input) {
576
+ total
577
+ rows { ${DATA_TABLE_ROW_FIELDS} }
578
+ }
579
+ }
580
+ `;
581
+ const GET_WORKFLOW_STATIC_DATA = `
582
+ query FluidgridsGetWorkflowStaticData(
583
+ $workflowKey: String!
584
+ $scope: StaticDataScope!
585
+ $nodeId: String
586
+ ) {
587
+ workflowStaticData(workflowKey: $workflowKey, scope: $scope, nodeId: $nodeId) {
588
+ ${WORKFLOW_STATIC_DATA_FIELDS}
589
+ }
590
+ }
591
+ `;
592
+ const LIST_WORKFLOW_STATIC_DATA = `
593
+ query FluidgridsListWorkflowStaticData($workflowKey: String!) {
594
+ workflowStaticDataList(workflowKey: $workflowKey) { ${WORKFLOW_STATIC_DATA_FIELDS} }
595
+ }
596
+ `;
597
+ /** Pins the output a node returns in a TEST run; a PRODUCTION run never uses it. */
598
+ const PIN_NODE_DATA = `
599
+ mutation FluidgridsPinNodeData($id: ID!, $nodeId: String!, $data: JSON!) {
600
+ pinNodeData(id: $id, nodeId: $nodeId, data: $data) { ${PINNED_WORKFLOW_FIELDS} }
601
+ }
602
+ `;
603
+ const UNPIN_NODE_DATA = `
604
+ mutation FluidgridsUnpinNodeData($id: ID!, $nodeId: String!) {
605
+ unpinNodeData(id: $id, nodeId: $nodeId) { ${PINNED_WORKFLOW_FIELDS} }
606
+ }
607
+ `;
608
+
152
609
  // src/modules/fluidgrids/operations.ts
153
610
  const LIST_WORKFLOWS = `
154
611
  query ListWorkflows($input: ListWorkflowDefinitionsInput!) {
@@ -1118,6 +1575,53 @@ function workflowPagination(limit, offset) {
1118
1575
  offset
1119
1576
  });
1120
1577
  }
1578
+ const ISO_DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
1579
+ function normalizeDate(value, endOfDay) {
1580
+ if (typeof value !== "string" || !ISO_DATE_ONLY.test(value)) return value;
1581
+ return `${value}T${endOfDay ? "23:59:59" : "00:00:00"}Z`;
1582
+ }
1583
+ /** Explicit annotation sets. Every FluidGrids tool declares one (G57). */
1584
+ const READ_ONLY = {
1585
+ readOnlyHint: true,
1586
+ destructiveHint: false,
1587
+ openWorldHint: false
1588
+ };
1589
+ /** A reversible write that stays inside FluidGrids. */
1590
+ const INTERNAL_WRITE = {
1591
+ readOnlyHint: false,
1592
+ destructiveHint: false,
1593
+ openWorldHint: false
1594
+ };
1595
+ /** A write that deletes or overwrites something the caller cannot read back. */
1596
+ const DESTRUCTIVE_WRITE = {
1597
+ readOnlyHint: false,
1598
+ destructiveHint: true,
1599
+ openWorldHint: false
1600
+ };
1601
+ /**
1602
+ * Compact registration for tools that send one workspace document: the input
1603
+ * is parsed strictly against its zod shape before anything is sent, and every
1604
+ * failure goes through runTool (so a transport error never leaks request
1605
+ * variables). `request` sends one document and returns its `root` field, null
1606
+ * when the answer has none.
1607
+ */
1608
+ function fluidgridsToolkit(server, ctx, track) {
1609
+ const tool = (name, title, description, shape, annotations, handler) => {
1610
+ registerTool(server, ctx, track(name), {
1611
+ title,
1612
+ description,
1613
+ inputSchema: shape,
1614
+ annotations
1615
+ }, async (args) => runTool(ctx, name, () => handler(z.object(shape).strict().parse(args))));
1616
+ };
1617
+ async function request(document, root, variables = {}) {
1618
+ return (await ctx.gql.workspace.request(document, definedInput(variables)))?.[root] ?? null;
1619
+ }
1620
+ return {
1621
+ tool,
1622
+ request
1623
+ };
1624
+ }
1121
1625
 
1122
1626
  // src/modules/fluidgrids/tools/credentials.ts
1123
1627
  function pagination(limit, offset) {
@@ -1280,12 +1784,157 @@ function registerCredentialTools(server, ctx, track) {
1280
1784
  }));
1281
1785
  }
1282
1786
 
1283
- // src/modules/fluidgrids/tools/insights.ts
1284
- const ISO_DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
1285
- function normalizeDate(value, endOfDay) {
1286
- if (typeof value !== "string" || !ISO_DATE_ONLY.test(value)) return value;
1287
- return `${value}T${endOfDay ? "23:59:59" : "00:00:00"}Z`;
1787
+ // src/modules/fluidgrids/tools/data.ts
1788
+ /**
1789
+ * FluidGrids workflow data tools (BOFF-10887): variables, data tables, static
1790
+ * data and pinned node data.
1791
+ *
1792
+ * Variables are workflow configuration, so they can be created, changed and
1793
+ * deleted here. A secret or externally backed variable's value never reaches
1794
+ * the client: the backend returns null for it, and these tools drop it again
1795
+ * in case a backend ever does not. Revealing a value is left to the app.
1796
+ *
1797
+ * Data tables and static data are customer data the workflows read and write
1798
+ * at run time; they are read-only here. Pins only affect TEST runs.
1799
+ */
1800
+ const text$2 = z.string().trim().min(1);
1801
+ const VariableScopeEnum = z.enum(["WORKSPACE", "PROJECT"]);
1802
+ const SecretProviderEnum = z.enum([
1803
+ "NONE",
1804
+ "AWS_SECRETS_MANAGER",
1805
+ "AZURE_KEY_VAULT",
1806
+ "GCP_SECRET_MANAGER",
1807
+ "VAULT"
1808
+ ]);
1809
+ const StaticDataScopeEnum = z.enum(["GLOBAL", "NODE"]);
1810
+ const FilterOpEnum = z.enum([
1811
+ "EQ",
1812
+ "NEQ",
1813
+ "GT",
1814
+ "GTE",
1815
+ "LT",
1816
+ "LTE",
1817
+ "CONTAINS",
1818
+ "IS_NULL",
1819
+ "IS_NOT_NULL"
1820
+ ]);
1821
+ /** Drop the value of a secret or externally backed variable, whatever the backend sent. */
1822
+ function shown(variable) {
1823
+ if (!variable) return variable;
1824
+ return variable.isSecret === true || variable.externalProvider !== void 0 && variable.externalProvider !== "NONE" ? {
1825
+ ...variable,
1826
+ value: null
1827
+ } : variable;
1828
+ }
1829
+ function shownResult(result) {
1830
+ return result?.variable ? {
1831
+ ...result,
1832
+ variable: shown(result.variable)
1833
+ } : result;
1834
+ }
1835
+ /** The SDK's rule: a variable holds a value or points at an external secret, never both. */
1836
+ function variableSourceError(provider, externalRef, value, creating) {
1837
+ if (provider !== void 0 && provider !== "NONE") {
1838
+ if (creating && externalRef === void 0) return "externalRef is required with an externalProvider other than NONE.";
1839
+ if (value !== void 0) return "A variable has a value or an external reference, not both.";
1840
+ } else if (externalRef !== void 0 && (provider === "NONE" || creating)) return "externalRef needs an externalProvider other than NONE.";
1841
+ }
1842
+ function registerDataTools(server, ctx, track) {
1843
+ const { tool, request } = fluidgridsToolkit(server, ctx, track);
1844
+ tool(mcpToolName(ctx.productName, "variables_list"), "List Variables", "Workflow variables ($vars), in key order (at most 500). Secret and externally backed values are returned as null.", {
1845
+ projectId: text$2.optional().describe("Only this project"),
1846
+ scope: VariableScopeEnum.optional().describe("WORKSPACE or PROJECT")
1847
+ }, READ_ONLY, async (args) => {
1848
+ const page = await request(LIST_WORKFLOW_VARIABLES, "workflowVariables", args);
1849
+ if (!page?.variables) return jsonResult(page);
1850
+ return jsonResult({
1851
+ ...page,
1852
+ variables: page.variables.map((v) => shown(v))
1853
+ });
1854
+ });
1855
+ tool(mcpToolName(ctx.productName, "variables_get"), "Get Variable", "One workflow variable; null when there is none. A secret or externally backed value is returned as null.", { id: text$2.describe("Variable ID") }, READ_ONLY, async (args) => jsonResult(shown(await request(GET_WORKFLOW_VARIABLE, "workflowVariable", args))));
1856
+ tool(mcpToolName(ctx.productName, "variables_create"), "Create Variable", "Create a workflow variable. Give it a value (isSecret: true stores it encrypted and never shows it again), or point it at an external secret with externalProvider + externalRef. scope PROJECT needs a projectId. A refusal (for example a taken key) comes back as success: false.", {
1857
+ key: z.string().regex(/^[A-Za-z0-9_-]+$/, "Letters, digits, _ and - only").describe("Variable key, used as $vars.<key>"),
1858
+ value: z.string().optional().describe("Value (leave out for an external reference)"),
1859
+ isSecret: z.boolean().optional().describe("Store encrypted and never show it again"),
1860
+ description: z.string().optional().describe("Description"),
1861
+ scope: VariableScopeEnum.optional().describe("WORKSPACE (default) or PROJECT"),
1862
+ projectId: text$2.optional().describe("Project ID, with scope PROJECT only"),
1863
+ externalProvider: SecretProviderEnum.optional().describe("External secret store"),
1864
+ externalRef: text$2.optional().describe("Name of the secret in that store")
1865
+ }, INTERNAL_WRITE, async (args) => {
1866
+ if (args.scope === "PROJECT" && args.projectId === void 0) return errorResult("projectId is required when scope is 'PROJECT'.");
1867
+ if (args.scope !== "PROJECT" && args.projectId !== void 0) return errorResult("projectId only goes with scope 'PROJECT'.");
1868
+ const sourceError = variableSourceError(args.externalProvider, args.externalRef, args.value, true);
1869
+ if (sourceError) return errorResult(sourceError);
1870
+ return jsonResult(shownResult(await request(CREATE_WORKFLOW_VARIABLE, "createWorkflowVariable", { input: definedInput({ ...args }) })));
1871
+ });
1872
+ tool(mcpToolName(ctx.productName, "variables_update"), "Update Variable", "Change a workflow variable. Workflows read the new value on their next run. The old value of a secret variable cannot be read back, so overwriting it is final.", {
1873
+ id: text$2.describe("Variable ID"),
1874
+ value: z.string().optional().describe("New value"),
1875
+ isSecret: z.boolean().optional().describe("Store encrypted"),
1876
+ description: z.string().optional().describe("Description"),
1877
+ externalProvider: SecretProviderEnum.optional().describe("External secret store"),
1878
+ externalRef: text$2.optional().describe("Name of the secret in that store")
1879
+ }, DESTRUCTIVE_WRITE, async ({ id, ...input }) => {
1880
+ const sourceError = variableSourceError(input.externalProvider, input.externalRef, input.value, false);
1881
+ if (sourceError) return errorResult(sourceError);
1882
+ const changes = definedInput(input);
1883
+ if (Object.keys(changes).length === 0) return errorResult("Nothing to update.");
1884
+ return jsonResult(shownResult(await request(UPDATE_WORKFLOW_VARIABLE, "updateWorkflowVariable", {
1885
+ id,
1886
+ input: changes
1887
+ })));
1888
+ });
1889
+ tool(mcpToolName(ctx.productName, "variables_delete"), "Delete Variable", "Delete a workflow variable. Workflows that read it get no value from their next run on.", { id: text$2.describe("Variable ID") }, DESTRUCTIVE_WRITE, async (args) => jsonResult(await request(DELETE_WORKFLOW_VARIABLE, "deleteWorkflowVariable", args)));
1890
+ tool(mcpToolName(ctx.productName, "data_tables_list"), "List Data Tables", "The data tables of the workspace with their columns and row counts. `total` is how many match.", {
1891
+ search: z.string().optional().describe("Name search"),
1892
+ limit: z.number().int().min(1).optional().describe("Page size"),
1893
+ offset: z.number().int().min(0).optional().describe("Offset")
1894
+ }, READ_ONLY, async (args) => jsonResult(await request(LIST_DATA_TABLES, "dataTables", args)));
1895
+ tool(mcpToolName(ctx.productName, "data_tables_get"), "Get Data Table", "One data table with its columns; null when there is none.", { id: text$2.describe("Data table ID") }, READ_ONLY, async (args) => jsonResult(await request(GET_DATA_TABLE, "dataTable", args)));
1896
+ tool(mcpToolName(ctx.productName, "data_tables_query_rows"), "Query Data Table Rows", "Rows of a data table, newest first, optionally filtered by column. IS_NULL and IS_NOT_NULL take no value; the other operators need one.", {
1897
+ tableId: text$2.describe("Data table ID"),
1898
+ filters: z.array(z.object({
1899
+ column: text$2.describe("Column key"),
1900
+ op: FilterOpEnum.describe("Comparison"),
1901
+ value: z.unknown().optional().describe("Value to compare with")
1902
+ }).strict()).optional().describe("All must match"),
1903
+ limit: z.number().int().min(1).max(5e3).optional().describe("Page size, 1-5000"),
1904
+ offset: z.number().int().min(0).optional().describe("Offset")
1905
+ }, READ_ONLY, async ({ filters, ...rest }) => {
1906
+ for (const [index, filter] of (filters ?? []).entries()) {
1907
+ const takesNoValue = filter.op === "IS_NULL" || filter.op === "IS_NOT_NULL";
1908
+ if (takesNoValue && filter.value !== void 0) return errorResult(`filters[${index}]: ${filter.op} takes no value.`);
1909
+ if (!takesNoValue && (filter.value === void 0 || filter.value === null)) return errorResult(`filters[${index}]: ${filter.op} needs a value.`);
1910
+ }
1911
+ return jsonResult(await request(QUERY_DATA_TABLE_ROWS, "dataTableRows", { input: definedInput({
1912
+ ...rest,
1913
+ filters
1914
+ }) }));
1915
+ });
1916
+ tool(mcpToolName(ctx.productName, "static_data_get"), "Get Static Data", "The state a workflow keeps between runs (for example a polling trigger’s cursor): the GLOBAL blob, or one NODE blob by nodeId. Null when there is none.", {
1917
+ workflowKey: text$2.describe("Workflow key"),
1918
+ scope: StaticDataScopeEnum.describe("GLOBAL, or NODE with a nodeId"),
1919
+ nodeId: text$2.optional().describe("Graph node ID (NODE scope only)")
1920
+ }, READ_ONLY, async (args) => {
1921
+ if (args.scope === "NODE" && args.nodeId === void 0) return errorResult("nodeId is required with the NODE scope.");
1922
+ if (args.scope === "GLOBAL" && args.nodeId !== void 0) return errorResult("nodeId applies to the NODE scope only.");
1923
+ return jsonResult(await request(GET_WORKFLOW_STATIC_DATA, "workflowStaticData", args));
1924
+ });
1925
+ tool(mcpToolName(ctx.productName, "static_data_list"), "List Static Data", "Every static-data blob of a workflow: the GLOBAL one first, then one per node.", { workflowKey: text$2.describe("Workflow key") }, READ_ONLY, async (args) => jsonResult(await request(LIST_WORKFLOW_STATIC_DATA, "workflowStaticDataList", args)));
1926
+ tool(mcpToolName(ctx.productName, "pinned_data_pin"), "Pin Node Data", "Pin the output a node returns in TEST runs of one stored workflow version (by its row id, not its key). Replaces the node’s earlier pin. PRODUCTION runs never use pins.", {
1927
+ id: text$2.describe("Workflow definition (version row) ID"),
1928
+ nodeId: text$2.describe("Graph node ID"),
1929
+ data: z.unknown().refine((value) => value !== void 0 && value !== null, "data must be a JSON value").describe("The output to pin, as JSON")
1930
+ }, INTERNAL_WRITE, async (args) => jsonResult(await request(PIN_NODE_DATA, "pinNodeData", args)));
1931
+ tool(mcpToolName(ctx.productName, "pinned_data_unpin"), "Unpin Node Data", "Remove the pinned output of a node, so TEST runs execute it again. The pinned data is gone afterwards.", {
1932
+ id: text$2.describe("Workflow definition (version row) ID"),
1933
+ nodeId: text$2.describe("Graph node ID")
1934
+ }, DESTRUCTIVE_WRITE, async (args) => jsonResult(await request(UNPIN_NODE_DATA, "unpinNodeData", args)));
1288
1935
  }
1936
+
1937
+ // src/modules/fluidgrids/tools/insights.ts
1289
1938
  /**
1290
1939
  * Read-only cross-cutting tools: dashboard, usage, search and system config.
1291
1940
  * Grouped in one file because each is one or two operations and they share no
@@ -1362,6 +2011,155 @@ function registerInsightTools(server, ctx, track) {
1362
2011
  }));
1363
2012
  }
1364
2013
 
2014
+ // src/modules/fluidgrids/tools/inspect.ts
2015
+ /**
2016
+ * FluidGrids inspection tools (BOFF-10887): read what a workflow, a run, a node
2017
+ * or the workspace's integrations look like, without changing anything. The two
2018
+ * writes here only bring something back: a workflow version as a new DRAFT, and
2019
+ * a deleted scheduled job.
2020
+ *
2021
+ * Operations the SDK has that are deliberately NOT tools (re-running a run or a
2022
+ * node, deciding a tool approval, configuring log streams or secrets providers,
2023
+ * installing nodes, live subscriptions) are listed with the reason in
2024
+ * .parity-allowlist.yaml.
2025
+ */
2026
+ const text$1 = z.string().trim().min(1);
2027
+ const limit = z.number().int().min(1);
2028
+ const offset = z.number().int().min(0);
2029
+ const date = (what) => z.string().describe(`${what}: ISO 8601 date-time, or a date (YYYY-MM-DD) for the whole day`);
2030
+ function registerInspectTools(server, ctx, track) {
2031
+ const { tool, request } = fluidgridsToolkit(server, ctx, track);
2032
+ tool(mcpToolName(ctx.productName, "workflows_summary"), "Workflow Summary", "How many versions a workflow has, which is the latest, and when it was created and last changed.", { workflowKey: text$1.describe("Workflow key") }, READ_ONLY, async (args) => jsonResult(await request(GET_WORKFLOW_SUMMARY, "workflowSummary", args)));
2033
+ tool(mcpToolName(ctx.productName, "workflows_diff_versions"), "Diff Workflow Versions", "How two versions of a workflow differ: one entry per changed path of the definition (at most 2000; `truncated` says when more changed).", {
2034
+ workflowKey: text$1.describe("Workflow key"),
2035
+ fromVersion: text$1.describe("Older version"),
2036
+ toVersion: text$1.describe("Newer version")
2037
+ }, READ_ONLY, async (args) => jsonResult(await request(DIFF_WORKFLOW_VERSIONS, "workflowVersionDiff", args)));
2038
+ tool(mcpToolName(ctx.productName, "workflows_restore_version"), "Restore Workflow Version", "Copy an old version of a workflow into a new DRAFT version. The old version and the active one are not changed; publish the draft to make it live.", {
2039
+ workflowKey: text$1.describe("Workflow key"),
2040
+ version: text$1.describe("Version to copy")
2041
+ }, INTERNAL_WRITE, async (args) => jsonResult(await request(RESTORE_WORKFLOW_VERSION, "restoreWorkflowVersion", args)));
2042
+ tool(mcpToolName(ctx.productName, "runs_hierarchy"), "Run Hierarchy", "The tree of sub-workflow runs a run started, up to six levels deep, with the node of the parent that started each one.", { runId: text$1.describe("Run ID") }, READ_ONLY, async (args) => jsonResult(await request(GET_RUN_HIERARCHY, "workflowRunHierarchy", args)));
2043
+ tool(mcpToolName(ctx.productName, "runs_node_states"), "Run Node States", "Every node execution of a run with its status, error and output. Poll this to follow a run while it is going: MCP has no live subscription.", { runId: text$1.describe("Run ID") }, READ_ONLY, async (args) => jsonResult(await request(LIST_NODE_STATES, "nodeStates", args)));
2044
+ tool(mcpToolName(ctx.productName, "runs_node_state"), "Run Node State", "One node execution with the inputs it received. Pass the node state `id` from fluidgrids_runs_node_states, or a `runId` and graph `nodeId` (refused when that node ran in parallel instances; then pass the id).", {
2045
+ id: text$1.optional().describe("Node state ID"),
2046
+ runId: text$1.optional().describe("Run ID (with nodeId)"),
2047
+ nodeId: text$1.optional().describe("Graph node ID (with runId)")
2048
+ }, READ_ONLY, async ({ id, runId, nodeId }) => {
2049
+ if (id !== void 0) {
2050
+ if (runId !== void 0 || nodeId !== void 0) return errorResult("Pass either id, or runId and nodeId, not both.");
2051
+ return jsonResult(await request(GET_NODE_STATE, "nodeState", { id }));
2052
+ }
2053
+ if (runId === void 0 || nodeId === void 0) return errorResult("Pass a node state id, or both runId and nodeId.");
2054
+ const matching = (await request("\n query FluidgridsListNodeStates($runId: String!) {\n nodeStates(runId: $runId) { \n id nodeId nodeType nodeVersion status error errorType attemptCount startTime endTime duration\n output\n }\n }\n", "nodeStates", { runId }) ?? []).filter((state) => state.nodeId === nodeId);
2055
+ if (matching.length === 0) return jsonResult(null);
2056
+ if (matching.length > 1) return errorResult(`Node ${nodeId} has ${matching.length} states in run ${runId} (parallel instances); pass one of these ids instead: ${matching.map((s) => s.id).join(", ")}`);
2057
+ return jsonResult(await request(GET_NODE_STATE, "nodeState", { id: matching[0].id }));
2058
+ });
2059
+ tool(mcpToolName(ctx.productName, "runs_can_run_from_node"), "Can Run From Node", "Read-only check whether a new run could start at a node of a past run, reusing its upstream outputs, and what blocks it if not.", {
2060
+ sourceRunId: text$1.describe("The past run to reuse"),
2061
+ nodeId: text$1.describe("Graph node ID to start at")
2062
+ }, READ_ONLY, async (args) => jsonResult(await request(CAN_RUN_FROM_NODE, "runFromNodeEligibility", { input: args })));
2063
+ tool(mcpToolName(ctx.productName, "nodes_list_custom"), "List Custom Nodes", "The custom nodes registered for the workspace, page by page.", {
2064
+ page: limit.optional().describe("Page number, from 1"),
2065
+ limit: limit.optional().describe("Page size")
2066
+ }, READ_ONLY, async ({ page, limit: size }) => {
2067
+ const pagination = definedInput({
2068
+ page,
2069
+ limit: size
2070
+ });
2071
+ return jsonResult(await request(LIST_CUSTOM_NODES, "customNodes", { pagination: Object.keys(pagination).length > 0 ? pagination : void 0 }));
2072
+ });
2073
+ tool(mcpToolName(ctx.productName, "nodes_manifest"), "Node Manifest", "The manifest of one node version (inputs, operations, credentials), as JSON. Null when there is no such node. It can be large.", {
2074
+ nodeType: text$1.describe("Node type, e.g. internal:http"),
2075
+ version: text$1.describe("Node version")
2076
+ }, READ_ONLY, async (args) => jsonResult(await request(GET_NODE_MANIFEST, "nodeManifest", args)));
2077
+ tool(mcpToolName(ctx.productName, "nodes_usage_status"), "Node Usage Status", "Which workflows of the workspace use a node version.", {
2078
+ nodeType: text$1.describe("Node type"),
2079
+ nodeVersion: text$1.describe("Node version")
2080
+ }, READ_ONLY, async (args) => jsonResult(await request(GET_NODE_USAGE_STATUS, "nodeUsageStatus", args)));
2081
+ tool(mcpToolName(ctx.productName, "nodes_list_operation_configs"), "List Operation Configs", "The stored configurations of node operations, newest first, optionally for one node type and version.", {
2082
+ nodeType: text$1.optional().describe("Node type"),
2083
+ nodeVersion: text$1.optional().describe("Node version"),
2084
+ limit: limit.optional().describe("Page size"),
2085
+ offset: offset.optional().describe("Offset")
2086
+ }, READ_ONLY, async ({ nodeType, nodeVersion, limit: size, offset: from }) => jsonResult(await request(LIST_OPERATION_CONFIGS, "operationConfigs", {
2087
+ nodeType,
2088
+ nodeVersion,
2089
+ pagination: workflowPagination(size, from)
2090
+ })));
2091
+ tool(mcpToolName(ctx.productName, "nodes_get_operation_config"), "Get Operation Config", "The stored configuration of one operation of one node version; null when there is none.", {
2092
+ nodeType: text$1.describe("Node type"),
2093
+ nodeVersion: text$1.describe("Node version"),
2094
+ operationName: text$1.describe("Operation name")
2095
+ }, READ_ONLY, async (args) => jsonResult(await request(GET_OPERATION_CONFIG, "operationConfig", args)));
2096
+ tool(mcpToolName(ctx.productName, "nodes_list_installations"), "List Node Installations", "The nodes this workspace has installed, whether each is enabled, and its workspace settings.", {}, READ_ONLY, async () => jsonResult(await request(LIST_NODE_INSTALLATIONS, "workspaceNodeInstallations")));
2097
+ tool(mcpToolName(ctx.productName, "webhooks_list_deliveries"), "List Webhook Deliveries", "The newest requests that reached one webhook, with validation result, the run it started and any error. Credentials in headers are masked by the backend; bodies are what the sender sent.", {
2098
+ eventRegistrationId: text$1.describe("Webhook (event registration) ID"),
2099
+ limit: limit.optional().describe("How many (default 50)")
2100
+ }, READ_ONLY, async (args) => jsonResult(await request(LIST_WEBHOOK_DELIVERIES, "webhookDeliveryLogs", args)));
2101
+ tool(mcpToolName(ctx.productName, "webhooks_list_all_deliveries"), "List All Webhook Deliveries", "The newest webhook requests across every webhook of the workspace. Filter with validationPassed: false to find rejected ones.", {
2102
+ limit: z.number().int().min(1).max(100).optional().describe("How many, 1-100 (default 50)"),
2103
+ offset: offset.optional().describe("Offset"),
2104
+ validationPassed: z.boolean().optional().describe("Only passed (true) or failed (false)")
2105
+ }, READ_ONLY, async (args) => jsonResult(await request(LIST_ALL_WEBHOOK_DELIVERIES, "allWebhookDeliveries", args)));
2106
+ tool(mcpToolName(ctx.productName, "webhooks_list_filters"), "List Webhook Filters", "The event filters a request must pass before a webhook starts a run.", { eventRegistrationId: text$1.describe("Webhook (event registration) ID") }, READ_ONLY, async (args) => jsonResult(await request(LIST_WEBHOOK_EVENT_FILTERS, "eventFilters", args)));
2107
+ tool(mcpToolName(ctx.productName, "scheduled_jobs_scheduler_status"), "Scheduler Status", "A snapshot of the workflow scheduler: whether it runs and how many schedules the answering process holds.", {}, READ_ONLY, async () => jsonResult(await request(GET_SCHEDULER_STATUS, "workflowScheduledJobsStatus")));
2108
+ tool(mcpToolName(ctx.productName, "scheduled_jobs_restore"), "Restore Scheduled Job", "Bring back a deleted scheduled job. It runs on its schedule again if it was enabled.", { jobId: text$1.describe("Scheduled job ID") }, {
2109
+ ...INTERNAL_WRITE,
2110
+ openWorldHint: true
2111
+ }, async (args) => jsonResult(await request(RESTORE_SCHEDULED_JOB, "restoreScheduledJob", args)));
2112
+ tool(mcpToolName(ctx.productName, "dashboard_error_analytics"), "Error Analytics", "Failed runs and nodes over a window (the 30 days before endDate, now by default): errors by type, the workflows and nodes that fail most, and a daily trend.", {
2113
+ startDate: date("Start of the window").optional(),
2114
+ endDate: date("End of the window").optional(),
2115
+ limit: limit.optional().describe("How many top workflows and nodes")
2116
+ }, READ_ONLY, async ({ startDate, endDate, limit: top }) => jsonResult(await request(GET_ERROR_ANALYTICS, "errorAnalytics", { input: definedInput({
2117
+ startDate: normalizeDate(startDate, false),
2118
+ endDate: normalizeDate(endDate, true),
2119
+ limit: top
2120
+ }) })));
2121
+ tool(mcpToolName(ctx.productName, "usage_time_series"), "Usage Time Series", "Runs (by outcome), node executions and durations per time bucket over a date range.", {
2122
+ startDate: date("Start of the range"),
2123
+ endDate: date("End of the range"),
2124
+ granularity: z.enum([
2125
+ "hour",
2126
+ "day",
2127
+ "week",
2128
+ "month"
2129
+ ]).optional().describe("Default day"),
2130
+ userId: text$1.optional().describe("Only runs this user started")
2131
+ }, READ_ONLY, async ({ startDate, endDate, granularity, userId }) => jsonResult(await request(GET_USAGE_TIME_SERIES, "usageTimeSeries", { input: definedInput({
2132
+ startDate: normalizeDate(startDate, false),
2133
+ endDate: normalizeDate(endDate, true),
2134
+ granularity,
2135
+ userId
2136
+ }) })));
2137
+ tool(mcpToolName(ctx.productName, "usage_detailed_node_usage"), "Detailed Node Usage", "Executions, outcomes and duration statistics per node type and version over a date range.", {
2138
+ startDate: date("Start of the range"),
2139
+ endDate: date("End of the range"),
2140
+ nodeType: text$1.optional().describe("Only this node type")
2141
+ }, READ_ONLY, async ({ startDate, endDate, nodeType }) => jsonResult(await request(GET_DETAILED_NODE_USAGE, "detailedNodeUsage", { input: definedInput({
2142
+ startDate: normalizeDate(startDate, false),
2143
+ endDate: normalizeDate(endDate, true),
2144
+ nodeType
2145
+ }) })));
2146
+ tool(mcpToolName(ctx.productName, "usage_billing_summary"), "Usage Billing Summary", "Runs, node executions, node minutes and the estimated cost over a date range. Read-only: nothing is charged.", {
2147
+ startDate: date("Start of the range"),
2148
+ endDate: date("End of the range")
2149
+ }, READ_ONLY, async ({ startDate, endDate }) => jsonResult(await request(GET_BILLING_SUMMARY, "billingSummary", { input: {
2150
+ startDate: normalizeDate(startDate, false),
2151
+ endDate: normalizeDate(endDate, true)
2152
+ } })));
2153
+ tool(mcpToolName(ctx.productName, "tool_approvals_list_pending"), "List Pending Tool Approvals", "AI Agent tool calls that wait for a person to approve or reject them. Deciding is left to a person in the FluidGrids app on purpose.", {
2154
+ limit: limit.optional().describe("Page size (default 50)"),
2155
+ offset: offset.optional().describe("Offset")
2156
+ }, READ_ONLY, async (args) => jsonResult(await request(LIST_PENDING_TOOL_APPROVALS, "pendingToolApprovals", args)));
2157
+ tool(mcpToolName(ctx.productName, "tool_approvals_get"), "Get Tool Approval", "One tool-approval request: the tool calls it holds, the decisions made, and its timeout.", { id: text$1.describe("Tool approval request ID") }, READ_ONLY, async (args) => jsonResult(await request(GET_TOOL_APPROVAL_REQUEST, "toolApprovalRequest", args)));
2158
+ tool(mcpToolName(ctx.productName, "log_streams_list"), "List Log Streams", "Where the workspace streams run logs, and how the last dispatch went. Stored secrets are never returned (`hasSecret` says whether one is set).", {}, READ_ONLY, async () => jsonResult(await request(LIST_LOG_STREAM_DESTINATIONS, "logStreamDestinations")));
2159
+ tool(mcpToolName(ctx.productName, "log_streams_get"), "Get Log Stream", "One log stream destination; the stored secret is never returned.", { id: text$1.describe("Log stream destination ID") }, READ_ONLY, async (args) => jsonResult(await request(GET_LOG_STREAM_DESTINATION, "logStreamDestination", args)));
2160
+ tool(mcpToolName(ctx.productName, "secrets_providers_list"), "List Secrets Providers", "The external secret stores the workspace has configured (AWS, Azure, GCP, Vault) and their last connection test. No credential is returned.", {}, READ_ONLY, async () => jsonResult(await request(LIST_SECRETS_PROVIDER_CONFIGS, "secretsProviderConfigs")));
2161
+ }
2162
+
1365
2163
  // src/modules/fluidgrids/tools/nodes.ts
1366
2164
  const PublishTypeEnum = z.enum([
1367
2165
  "BUILTIN",
@@ -2399,6 +3197,8 @@ const fluidgridsModule = {
2399
3197
  registerWebhookTools(server, ctx, trackTool);
2400
3198
  registerScheduledJobTools(server, ctx, trackTool);
2401
3199
  registerInsightTools(server, ctx, trackTool);
3200
+ registerInspectTools(server, ctx, trackTool);
3201
+ registerDataTools(server, ctx, trackTool);
2402
3202
  registerFluidgridsResources(server, ctx, trackResource);
2403
3203
  registerFluidgridsPrompts(server, ctx, trackPrompt);
2404
3204
  return {