@burdenoff/mcp-libs 2026.1110.2 → 2026.1110.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -313,6 +313,464 @@ var CREATE_DASHBOARD_FROM_GENERATION = `
313
313
  }
314
314
  }
315
315
  `;
316
+ var UPDATE_DASHBOARD = `
317
+ mutation BigConsoleMcpUpdateDashboard($input: BigConsoleUpdateDashboardInput!) {
318
+ updateBigConsoleDashboard(input: $input) {
319
+ id
320
+ name
321
+ description
322
+ category
323
+ visibility
324
+ status
325
+ version
326
+ updatedAt
327
+ }
328
+ }
329
+ `;
330
+ var CLONE_DASHBOARD = `
331
+ mutation BigConsoleMcpCloneDashboard($input: BigConsoleCloneDashboardInput!) {
332
+ cloneDashboard(input: $input) {
333
+ id
334
+ name
335
+ description
336
+ category
337
+ createdAt
338
+ }
339
+ }
340
+ `;
341
+ var SEARCH_DASHBOARDS = `
342
+ query BigConsoleMcpSearchDashboards(
343
+ $query: String!
344
+ $category: BigConsoleDashboardCategory
345
+ $visibility: BigConsoleDashboardVisibility
346
+ $first: Int
347
+ $after: String
348
+ ) {
349
+ searchDashboards(
350
+ query: $query
351
+ category: $category
352
+ visibility: $visibility
353
+ first: $first
354
+ after: $after
355
+ ) {
356
+ id
357
+ name
358
+ description
359
+ category
360
+ visibility
361
+ status
362
+ createdAt
363
+ }
364
+ }
365
+ `;
366
+ var GET_WIDGET = `
367
+ query BigConsoleMcpGetWidget($id: ID!) {
368
+ getWidget(id: $id) {
369
+ id
370
+ pageId
371
+ dashboardId
372
+ type
373
+ title
374
+ renderer
375
+ config
376
+ position
377
+ dataSinkId
378
+ parserId
379
+ refreshInterval
380
+ lastRefreshedAt
381
+ createdAt
382
+ updatedAt
383
+ }
384
+ }
385
+ `;
386
+ var LIST_WIDGETS_BY_DASHBOARD = `
387
+ query BigConsoleMcpListWidgetsByDashboard($dashboardId: ID!, $type: BigConsoleWidgetType) {
388
+ listWidgetsByDashboard(dashboardId: $dashboardId, type: $type) {
389
+ id
390
+ pageId
391
+ type
392
+ title
393
+ renderer
394
+ position
395
+ dataSinkId
396
+ parserId
397
+ updatedAt
398
+ }
399
+ }
400
+ `;
401
+ var UPDATE_WIDGET = `
402
+ mutation BigConsoleMcpUpdateWidget($input: BigConsoleUpdateWidgetInput!) {
403
+ updateBigConsoleWidget(input: $input) {
404
+ id
405
+ type
406
+ title
407
+ position
408
+ updatedAt
409
+ }
410
+ }
411
+ `;
412
+ var DUPLICATE_WIDGET = `
413
+ mutation BigConsoleMcpDuplicateWidget(
414
+ $id: ID!
415
+ $newPosition: BigConsoleWidgetPositionInput
416
+ $newTitle: String
417
+ ) {
418
+ duplicateWidget(id: $id, newPosition: $newPosition, newTitle: $newTitle) {
419
+ id
420
+ pageId
421
+ type
422
+ title
423
+ position
424
+ createdAt
425
+ }
426
+ }
427
+ `;
428
+ var REFRESH_WIDGET_DATA = `
429
+ mutation BigConsoleMcpRefreshWidgetData($widgetId: ID!) {
430
+ refreshWidgetData(widgetId: $widgetId) {
431
+ fetchedAt
432
+ }
433
+ }
434
+ `;
435
+ var GET_WIDGET_TYPES = `
436
+ query BigConsoleMcpGetWidgetTypes {
437
+ getWidgetTypes {
438
+ type
439
+ label
440
+ category
441
+ description
442
+ defaultConfig
443
+ defaultSize {
444
+ width
445
+ height
446
+ }
447
+ }
448
+ }
449
+ `;
450
+ var GET_WIDGET_RENDERERS = `
451
+ query BigConsoleMcpGetWidgetRenderers {
452
+ getAvailableRenderers {
453
+ type
454
+ name
455
+ description
456
+ supportedWidgetTypes
457
+ }
458
+ }
459
+ `;
460
+ var REFRESH_DATA_SINK = `
461
+ mutation BigConsoleMcpRefreshDataSink($input: RefreshDataSinkInput!) {
462
+ refreshDataSink(input: $input) {
463
+ id
464
+ key
465
+ name
466
+ status
467
+ lastRefreshedAt
468
+ }
469
+ }
470
+ `;
471
+ var INVALIDATE_DATA_SINK_CACHE = `
472
+ mutation BigConsoleMcpInvalidateDataSinkCache($id: ID) {
473
+ invalidateDataSinkCache(id: $id) {
474
+ success
475
+ count
476
+ invalidatedIds
477
+ message
478
+ }
479
+ }
480
+ `;
481
+ var GET_PARSER = `
482
+ query BigConsoleMcpGetParser($id: ID!) {
483
+ parser(id: $id) {
484
+ id
485
+ consoleId
486
+ name
487
+ description
488
+ type
489
+ expression
490
+ inputSinkKey
491
+ outputKey
492
+ outputWidgetId
493
+ ttl
494
+ status
495
+ version
496
+ createdAt
497
+ updatedAt
498
+ }
499
+ }
500
+ `;
501
+ var EXECUTE_PARSER = `
502
+ mutation BigConsoleMcpExecuteParser($id: ID!) {
503
+ executeParser(id: $id) {
504
+ success
505
+ error
506
+ executionTimeMs
507
+ }
508
+ }
509
+ `;
510
+ var GET_PIPELINE = `
511
+ query BigConsoleMcpGetPipeline($id: ID!) {
512
+ pipeline(id: $id) {
513
+ id
514
+ consoleId
515
+ name
516
+ description
517
+ status
518
+ stages {
519
+ id
520
+ position
521
+ parserId
522
+ parserName
523
+ parserType
524
+ expression
525
+ inputKey
526
+ outputKey
527
+ enabled
528
+ onError
529
+ fallbackValue
530
+ description
531
+ }
532
+ lastExecutedAt
533
+ version
534
+ createdAt
535
+ updatedAt
536
+ }
537
+ }
538
+ `;
539
+ var LIST_PIPELINES = `
540
+ query BigConsoleMcpListPipelines($filter: PipelineFilterInput, $first: Int, $after: String) {
541
+ listPipelines(filter: $filter, first: $first, after: $after) {
542
+ edges {
543
+ node {
544
+ id
545
+ consoleId
546
+ name
547
+ description
548
+ status
549
+ lastExecutedAt
550
+ version
551
+ updatedAt
552
+ }
553
+ }
554
+ totalCount
555
+ pageInfo {
556
+ hasNextPage
557
+ endCursor
558
+ }
559
+ }
560
+ }
561
+ `;
562
+ var CREATE_PIPELINE = `
563
+ mutation BigConsoleMcpCreatePipeline($input: CreatePipelineInput!) {
564
+ createPipeline(input: $input) {
565
+ id
566
+ consoleId
567
+ name
568
+ status
569
+ version
570
+ }
571
+ }
572
+ `;
573
+ var UPDATE_PIPELINE = `
574
+ mutation BigConsoleMcpUpdatePipeline($id: ID!, $input: UpdatePipelineInput!, $version: Int!) {
575
+ updatePipeline(id: $id, input: $input, version: $version) {
576
+ id
577
+ name
578
+ status
579
+ version
580
+ updatedAt
581
+ }
582
+ }
583
+ `;
584
+ var EXECUTE_PIPELINE = `
585
+ mutation BigConsoleMcpExecutePipeline($input: ExecutePipelineInput!) {
586
+ executePipeline(input: $input) {
587
+ id
588
+ pipelineId
589
+ status
590
+ startedAt
591
+ }
592
+ }
593
+ `;
594
+ var TEST_PIPELINE = `
595
+ mutation BigConsoleMcpTestPipeline($input: TestPipelineInput!) {
596
+ testPipeline(input: $input) {
597
+ id
598
+ pipelineId
599
+ status
600
+ startedAt
601
+ completedAt
602
+ totalExecutionTimeMs
603
+ error
604
+ }
605
+ }
606
+ `;
607
+ var LIST_PIPELINE_EXECUTIONS = `
608
+ query BigConsoleMcpListPipelineExecutions($pipelineId: ID!, $first: Int, $after: String) {
609
+ listPipelineExecutions(pipelineId: $pipelineId, first: $first, after: $after) {
610
+ id
611
+ pipelineVersion
612
+ status
613
+ startedAt
614
+ completedAt
615
+ totalExecutionTimeMs
616
+ error
617
+ }
618
+ }
619
+ `;
620
+ var GET_LINKED_WORKFLOW = `
621
+ query BigConsoleMcpGetLinkedWorkflow($id: ID!) {
622
+ workflow(id: $id) {
623
+ id
624
+ name
625
+ key
626
+ description
627
+ externalWorkflowId
628
+ status
629
+ lastExecutedAt
630
+ lastExecutionId
631
+ executionCount
632
+ linkedDataSinkCount
633
+ version
634
+ createdAt
635
+ updatedAt
636
+ }
637
+ }
638
+ `;
639
+ var LIST_LINKED_WORKFLOWS = `
640
+ query BigConsoleMcpListLinkedWorkflows($filter: FluidGridsWorkflowFilterInput) {
641
+ workflows(filter: $filter) {
642
+ id
643
+ name
644
+ key
645
+ description
646
+ status
647
+ lastExecutedAt
648
+ executionCount
649
+ linkedDataSinkCount
650
+ version
651
+ updatedAt
652
+ }
653
+ }
654
+ `;
655
+ var GET_LINKED_WORKFLOW_BY_KEY = `
656
+ query BigConsoleMcpGetLinkedWorkflowByKey($key: String!) {
657
+ workflowByKey(key: $key) {
658
+ id
659
+ name
660
+ key
661
+ description
662
+ externalWorkflowId
663
+ status
664
+ lastExecutedAt
665
+ executionCount
666
+ linkedDataSinkCount
667
+ version
668
+ updatedAt
669
+ }
670
+ }
671
+ `;
672
+ var LIST_LINKED_WORKFLOW_DATA_SINK_LINKS = `
673
+ query BigConsoleMcpListLinkedWorkflowDataSinkLinks($workflowId: ID!) {
674
+ workflowDataSinkLinks(workflowId: $workflowId) {
675
+ id
676
+ dataSinkId
677
+ workflowId
678
+ isEnabled
679
+ priority
680
+ dataMapping
681
+ updatedAt
682
+ }
683
+ }
684
+ `;
685
+ var CREATE_LINKED_WORKFLOW = `
686
+ mutation BigConsoleMcpCreateLinkedWorkflow($input: CreateWorkflowInput!) {
687
+ createWorkflow(input: $input) {
688
+ id
689
+ name
690
+ key
691
+ status
692
+ version
693
+ }
694
+ }
695
+ `;
696
+ var UPDATE_LINKED_WORKFLOW = `
697
+ mutation BigConsoleMcpUpdateLinkedWorkflow($id: ID!, $input: UpdateWorkflowInput!, $version: Int!) {
698
+ updateWorkflow(id: $id, input: $input, version: $version) {
699
+ id
700
+ name
701
+ status
702
+ version
703
+ updatedAt
704
+ }
705
+ }
706
+ `;
707
+ var EXECUTE_LINKED_WORKFLOW = `
708
+ mutation BigConsoleMcpExecuteLinkedWorkflow($id: ID!, $triggerData: JSON) {
709
+ executeWorkflow(id: $id, triggerData: $triggerData) {
710
+ id
711
+ name
712
+ status
713
+ lastExecutedAt
714
+ lastExecutionId
715
+ }
716
+ }
717
+ `;
718
+ var LIST_PROMPT_GENERATIONS = `
719
+ query BigConsoleMcpListPromptGenerations($status: PromptGenerationStatus, $first: Int, $after: String) {
720
+ listPromptGenerations(status: $status, first: $first, after: $after) {
721
+ edges {
722
+ node {
723
+ id
724
+ prompt
725
+ status
726
+ dashboardId
727
+ errorMessage
728
+ createdAt
729
+ completedAt
730
+ }
731
+ }
732
+ totalCount
733
+ pageInfo {
734
+ hasNextPage
735
+ endCursor
736
+ }
737
+ }
738
+ }
739
+ `;
740
+ var CANCEL_PROMPT_GENERATION = `
741
+ mutation BigConsoleMcpCancelPromptGeneration($generationId: ID!) {
742
+ cancelPromptGeneration(generationId: $generationId) {
743
+ id
744
+ status
745
+ }
746
+ }
747
+ `;
748
+ var GET_PROMPT_SUGGESTIONS = `
749
+ query BigConsoleMcpGetPromptSuggestions($category: String, $search: String, $limit: Int) {
750
+ getPromptSuggestions(category: $category, search: $search, limit: $limit) {
751
+ id
752
+ title
753
+ prompt
754
+ category
755
+ exampleDescription
756
+ tags
757
+ }
758
+ }
759
+ `;
760
+ var PREVIEW_PROMPT_ANALYSIS = `
761
+ query BigConsoleMcpPreviewPromptAnalysis($prompt: String!) {
762
+ previewPromptAnalysis(prompt: $prompt) {
763
+ detectedIntent
764
+ detectedMetrics
765
+ dataRequirements
766
+ suggestedCategory
767
+ suggestedWidgetTypes
768
+ suggestedRefinements
769
+ estimatedWidgetCount
770
+ confidence
771
+ }
772
+ }
773
+ `;
316
774
  var WORKSPACE_NOTE = "Operates on the workspace selected via auth_select_workspace \u2014 this tool takes no workspace or token argument. Authorization is enforced at the gateway from the authenticated session.";
317
775
  var WIDGET_TYPES = [
318
776
  "LINE_CHART",
@@ -393,6 +851,58 @@ var VersionInt = z.number().int().describe(
393
851
  var VERSION_OMITTED_MESSAGE = "version is required for optimistic locking \u2014 read the current version from a get/list call first and send it back unchanged. A stale version is rejected by the backend, so re-read and retry rather than guessing or incrementing.";
394
852
  var PageSize = z.number().int().min(1).max(100).default(20).describe("Page size (max 100)");
395
853
  var PageCursor = z.string().optional().describe("Pagination cursor from pageInfo.endCursor");
854
+ var DashboardLayoutEnum = z.enum(["FLEX", "GRID", "TABS"]).describe("Dashboard layout");
855
+ var PipelineStatusEnum = z.enum(["active", "draft", "error", "inactive"]).describe("Pipeline status");
856
+ var WorkflowStatusEnum = z.enum(["active", "archived", "draft", "error", "paused"]).describe("Workflow status");
857
+ var PromptGenerationStatusEnum = z.enum(["PENDING", "PROCESSING", "GENERATING", "COMPLETED", "FAILED", "CANCELLED"]).describe("Generation status");
858
+
859
+ // src/modules/bigconsole/tools/call.ts
860
+ var READ_ONLY = {
861
+ readOnlyHint: true,
862
+ destructiveHint: false,
863
+ idempotentHint: true
864
+ };
865
+ var WRITE = { readOnlyHint: false, destructiveHint: false };
866
+ var WRITE_EXTERNAL = {
867
+ readOnlyHint: false,
868
+ destructiveHint: false,
869
+ openWorldHint: true
870
+ };
871
+ function describeTool(text) {
872
+ return `${text} ${WORKSPACE_NOTE}`;
873
+ }
874
+ function isClientErrorShape(error) {
875
+ return typeof error === "object" && error !== null && "response" in error && "request" in error;
876
+ }
877
+ function safeErrorMessage(error) {
878
+ if (isClientErrorShape(error)) {
879
+ const errors = error.response?.errors;
880
+ if (Array.isArray(errors) && errors.length > 0) {
881
+ const joined = errors.map((e) => e?.message).filter((m) => typeof m === "string" && m.length > 0).join("; ");
882
+ if (joined) return joined;
883
+ }
884
+ const status = error.response?.status;
885
+ return status === void 0 ? "GraphQL request failed" : `GraphQL error (status ${status})`;
886
+ }
887
+ return error instanceof Error ? error.message : String(error);
888
+ }
889
+ function definedInput(obj) {
890
+ const out = {};
891
+ for (const [key, value] of Object.entries(obj)) {
892
+ if (value !== void 0) out[key] = value;
893
+ }
894
+ return out;
895
+ }
896
+ async function gqlCall(ctx, label, root, document, variables) {
897
+ try {
898
+ const data = await ctx.gql.workspace.request(document, variables);
899
+ return jsonResult(data[root]);
900
+ } catch (error) {
901
+ const message = safeErrorMessage(error);
902
+ ctx.logger.error(`bigconsole ${label} failed`, { error: message });
903
+ return errorResult(`Failed (${label}): ${message}`);
904
+ }
905
+ }
396
906
 
397
907
  // src/modules/bigconsole/tools/dashboards.ts
398
908
  function registerDashboardTools(server, ctx, track) {
@@ -594,6 +1104,69 @@ function registerDashboardTools(server, ctx, track) {
594
1104
  }
595
1105
  }
596
1106
  );
1107
+ server.registerTool(
1108
+ track(mcpToolName(ctx.productName, "dashboard_update")),
1109
+ {
1110
+ title: "Update Dashboard",
1111
+ description: describeTool(
1112
+ "Update a dashboard's name, description, category, visibility, layout or tags. Only the fields you pass change. It cannot archive, restore or publish the dashboard."
1113
+ ),
1114
+ annotations: WRITE,
1115
+ inputSchema: {
1116
+ id: z.string().describe("Dashboard ID"),
1117
+ name: z.string().optional().describe("New dashboard name"),
1118
+ description: z.string().optional().describe("New description"),
1119
+ category: DashboardCategoryEnum.optional(),
1120
+ visibility: DashboardVisibilityEnum.optional(),
1121
+ layout: DashboardLayoutEnum.optional(),
1122
+ tagIds: z.array(z.string()).optional().describe("Replacement tag IDs")
1123
+ }
1124
+ },
1125
+ async (args) => gqlCall(ctx, "dashboard_update", "updateBigConsoleDashboard", UPDATE_DASHBOARD, {
1126
+ input: definedInput(args)
1127
+ })
1128
+ );
1129
+ server.registerTool(
1130
+ track(mcpToolName(ctx.productName, "dashboard_clone")),
1131
+ {
1132
+ title: "Clone Dashboard",
1133
+ description: describeTool(
1134
+ "Copy a dashboard under a new name, optionally with its widgets and comments. The copy is not shared with anyone the original was shared with."
1135
+ ),
1136
+ annotations: WRITE,
1137
+ inputSchema: {
1138
+ sourceDashboardId: z.string().describe("Dashboard to copy"),
1139
+ name: z.string().describe("Name of the copy"),
1140
+ includeWidgets: z.boolean().optional().describe("Copy the widgets too"),
1141
+ includeComments: z.boolean().optional().describe("Copy the comments too")
1142
+ }
1143
+ },
1144
+ async (args) => gqlCall(ctx, "dashboard_clone", "cloneDashboard", CLONE_DASHBOARD, {
1145
+ input: definedInput(args)
1146
+ })
1147
+ );
1148
+ server.registerTool(
1149
+ track(mcpToolName(ctx.productName, "dashboards_search")),
1150
+ {
1151
+ title: "Search Dashboards",
1152
+ description: describeTool(
1153
+ "Search dashboards by name and description text, with optional category and visibility filters. Returns a plain list (no totals); page with first and after."
1154
+ ),
1155
+ annotations: READ_ONLY,
1156
+ inputSchema: {
1157
+ query: z.string().describe("Search text"),
1158
+ category: DashboardCategoryEnum.optional(),
1159
+ visibility: DashboardVisibilityEnum.optional(),
1160
+ first: PageSize,
1161
+ after: PageCursor
1162
+ }
1163
+ },
1164
+ async ({ query, category, visibility, first, after }) => gqlCall(ctx, "dashboards_search", "searchDashboards", SEARCH_DASHBOARDS, {
1165
+ query,
1166
+ first: first ?? 20,
1167
+ ...definedInput({ category, visibility, after })
1168
+ })
1169
+ );
597
1170
  }
598
1171
  function registerDataSinkTools(server, ctx, track) {
599
1172
  server.registerTool(
@@ -732,6 +1305,48 @@ function registerDataSinkTools(server, ctx, track) {
732
1305
  }
733
1306
  }
734
1307
  );
1308
+ server.registerTool(
1309
+ track(mcpToolName(ctx.productName, "datasink_refresh")),
1310
+ {
1311
+ title: "Refresh Data Sink",
1312
+ description: describeTool(
1313
+ "Pull fresh data into a sink from its source now. Give id or key. Returns the sink status and when it was last refreshed, not the rows."
1314
+ ),
1315
+ annotations: WRITE,
1316
+ inputSchema: {
1317
+ id: z.string().optional().describe("Data sink ID"),
1318
+ key: z.string().optional().describe("Data sink key \u2014 alternative to id"),
1319
+ forceRefresh: z.boolean().optional().describe("Ignore the cache TTL"),
1320
+ queryParams: z.record(z.string(), z.unknown()).optional().describe("Source query params")
1321
+ }
1322
+ },
1323
+ async (args) => {
1324
+ if (args.id === void 0 === (args.key === void 0)) {
1325
+ return errorResult("Provide exactly one of id or key.");
1326
+ }
1327
+ return gqlCall(ctx, "datasink_refresh", "refreshDataSink", REFRESH_DATA_SINK, {
1328
+ input: definedInput(args)
1329
+ });
1330
+ }
1331
+ );
1332
+ server.registerTool(
1333
+ track(mcpToolName(ctx.productName, "datasink_invalidate_cache")),
1334
+ {
1335
+ title: "Invalidate Data Sink Cache",
1336
+ description: describeTool(
1337
+ "Drop the cached data of one sink (id) or, with no id, of every sink in the workspace. The next read fetches from the source again. Stored data is not deleted."
1338
+ ),
1339
+ annotations: WRITE,
1340
+ inputSchema: { id: z.string().optional().describe("Data sink ID; omit for all sinks") }
1341
+ },
1342
+ async ({ id }) => gqlCall(
1343
+ ctx,
1344
+ "datasink_invalidate_cache",
1345
+ "invalidateDataSinkCache",
1346
+ INVALIDATE_DATA_SINK_CACHE,
1347
+ definedInput({ id })
1348
+ )
1349
+ );
735
1350
  }
736
1351
  var TERMINAL_STATUSES = ["COMPLETED", "FAILED", "CANCELLED"];
737
1352
  var TERMINAL_SET = new Set(TERMINAL_STATUSES);
@@ -874,6 +1489,144 @@ function registerGenerateTools(server, ctx, track) {
874
1489
  }
875
1490
  );
876
1491
  }
1492
+ function registerLinkedWorkflowTools(server, ctx, track) {
1493
+ server.registerTool(
1494
+ track(mcpToolName(ctx.productName, "linked_workflow_get")),
1495
+ {
1496
+ title: "Get Linked Workflow",
1497
+ description: describeTool(
1498
+ "One BigConsole workflow by ID, with its current version. These are the workflows registered in BigConsole to feed data sinks, not FluidGrids workflow definitions. The webhook URL and config are not returned."
1499
+ ),
1500
+ annotations: READ_ONLY,
1501
+ inputSchema: { id: z.string().describe("Workflow ID") }
1502
+ },
1503
+ async ({ id }) => gqlCall(ctx, "linked_workflow_get", "workflow", GET_LINKED_WORKFLOW, { id })
1504
+ );
1505
+ server.registerTool(
1506
+ track(mcpToolName(ctx.productName, "linked_workflows_list")),
1507
+ {
1508
+ title: "List Linked Workflows",
1509
+ description: describeTool(
1510
+ "The BigConsole workflows in the workspace, filtered by key, status or search text. The list is not paged."
1511
+ ),
1512
+ annotations: READ_ONLY,
1513
+ inputSchema: {
1514
+ key: z.string().optional().describe("Exact workflow key"),
1515
+ status: WorkflowStatusEnum.optional(),
1516
+ searchQuery: z.string().optional().describe("Search text")
1517
+ }
1518
+ },
1519
+ async ({ key, status, searchQuery }) => {
1520
+ const filter = definedInput({ key, status, searchQuery });
1521
+ return gqlCall(
1522
+ ctx,
1523
+ "linked_workflows_list",
1524
+ "workflows",
1525
+ LIST_LINKED_WORKFLOWS,
1526
+ Object.keys(filter).length > 0 ? { filter } : {}
1527
+ );
1528
+ }
1529
+ );
1530
+ server.registerTool(
1531
+ track(mcpToolName(ctx.productName, "linked_workflow_get_by_key")),
1532
+ {
1533
+ title: "Get Linked Workflow By Key",
1534
+ description: describeTool("One BigConsole workflow by its unique key."),
1535
+ annotations: READ_ONLY,
1536
+ inputSchema: { key: z.string().describe("Workflow key") }
1537
+ },
1538
+ async ({ key }) => gqlCall(ctx, "linked_workflow_get_by_key", "workflowByKey", GET_LINKED_WORKFLOW_BY_KEY, {
1539
+ key
1540
+ })
1541
+ );
1542
+ server.registerTool(
1543
+ track(mcpToolName(ctx.productName, "linked_workflow_data_sink_links")),
1544
+ {
1545
+ title: "List Linked Workflow Data Sink Links",
1546
+ description: describeTool(
1547
+ "The data sinks a BigConsole workflow feeds, with each link's priority, mapping and whether it is enabled."
1548
+ ),
1549
+ annotations: READ_ONLY,
1550
+ inputSchema: { workflowId: z.string().describe("Workflow ID") }
1551
+ },
1552
+ async ({ workflowId }) => gqlCall(
1553
+ ctx,
1554
+ "linked_workflow_data_sink_links",
1555
+ "workflowDataSinkLinks",
1556
+ LIST_LINKED_WORKFLOW_DATA_SINK_LINKS,
1557
+ { workflowId }
1558
+ )
1559
+ );
1560
+ server.registerTool(
1561
+ track(mcpToolName(ctx.productName, "linked_workflow_create")),
1562
+ {
1563
+ title: "Create Linked Workflow",
1564
+ description: describeTool(
1565
+ "Register a BigConsole workflow. key and name are required. Link it to an external FluidGrids workflow with externalWorkflowId and to data sinks with dataSinkKeys."
1566
+ ),
1567
+ annotations: WRITE,
1568
+ inputSchema: {
1569
+ key: z.string().describe("Unique workflow key"),
1570
+ name: z.string().describe("Workflow name"),
1571
+ description: z.string().optional().describe("What the workflow does"),
1572
+ externalWorkflowId: z.string().optional().describe("FluidGrids workflow to link"),
1573
+ dataSinkKeys: z.array(DataSinkKey).optional().describe("Data sinks the workflow feeds"),
1574
+ status: WorkflowStatusEnum.optional(),
1575
+ config: z.record(z.string(), z.unknown()).optional().describe("Workflow settings")
1576
+ }
1577
+ },
1578
+ async (args) => gqlCall(ctx, "linked_workflow_create", "createWorkflow", CREATE_LINKED_WORKFLOW, {
1579
+ input: definedInput(args)
1580
+ })
1581
+ );
1582
+ server.registerTool(
1583
+ track(mcpToolName(ctx.productName, "linked_workflow_update")),
1584
+ {
1585
+ title: "Update Linked Workflow",
1586
+ description: describeTool(
1587
+ "Update a BigConsole workflow with optimistic locking. `version` is REQUIRED \u2014 read it from linked_workflow_get first and send it back unchanged; a stale version is rejected, so re-read and retry."
1588
+ ),
1589
+ annotations: WRITE,
1590
+ inputSchema: {
1591
+ id: z.string().describe("Workflow ID"),
1592
+ version: VersionInt.optional(),
1593
+ name: z.string().optional().describe("New name"),
1594
+ description: z.string().optional().describe("New description"),
1595
+ status: WorkflowStatusEnum.optional(),
1596
+ config: z.record(z.string(), z.unknown()).optional().describe("Replacement settings")
1597
+ }
1598
+ },
1599
+ async ({ id, version, ...fields }) => {
1600
+ if (version === void 0) return errorResult(VERSION_OMITTED_MESSAGE);
1601
+ return gqlCall(ctx, "linked_workflow_update", "updateWorkflow", UPDATE_LINKED_WORKFLOW, {
1602
+ id,
1603
+ version,
1604
+ input: definedInput(fields)
1605
+ });
1606
+ }
1607
+ );
1608
+ server.registerTool(
1609
+ track(mcpToolName(ctx.productName, "linked_workflow_execute")),
1610
+ {
1611
+ title: "Execute Linked Workflow",
1612
+ description: describeTool(
1613
+ "Run a BigConsole workflow now, passing optional trigger data. It starts the linked external workflow, which can change data in the sinks it feeds and reach other systems, so confirm with the user before running one you did not create."
1614
+ ),
1615
+ annotations: WRITE_EXTERNAL,
1616
+ inputSchema: {
1617
+ id: z.string().describe("Workflow ID"),
1618
+ triggerData: z.unknown().optional().describe("Payload passed to the workflow")
1619
+ }
1620
+ },
1621
+ async (args) => gqlCall(
1622
+ ctx,
1623
+ "linked_workflow_execute",
1624
+ "executeWorkflow",
1625
+ EXECUTE_LINKED_WORKFLOW,
1626
+ definedInput(args)
1627
+ )
1628
+ );
1629
+ }
877
1630
  function registerParserTools(server, ctx, track) {
878
1631
  server.registerTool(
879
1632
  track(mcpToolName(ctx.productName, "parsers_list")),
@@ -1041,6 +1794,272 @@ function registerParserTools(server, ctx, track) {
1041
1794
  }
1042
1795
  }
1043
1796
  );
1797
+ server.registerTool(
1798
+ track(mcpToolName(ctx.productName, "parser_get")),
1799
+ {
1800
+ title: "Get Parser",
1801
+ description: describeTool(
1802
+ "One parser with its expression and current version. Read it before parser_update: the update needs the version back unchanged."
1803
+ ),
1804
+ annotations: READ_ONLY,
1805
+ inputSchema: { id: z.string().describe("Parser ID") }
1806
+ },
1807
+ async ({ id }) => gqlCall(ctx, "parser_get", "parser", GET_PARSER, { id })
1808
+ );
1809
+ server.registerTool(
1810
+ track(mcpToolName(ctx.productName, "parser_execute")),
1811
+ {
1812
+ title: "Execute Parser",
1813
+ description: describeTool(
1814
+ "Run a stored parser against its input sink and write the result under its output key. Returns success, error and timing, not the output rows. Use parser_test_expression first to try an expression without storing anything."
1815
+ ),
1816
+ annotations: WRITE,
1817
+ inputSchema: { id: z.string().describe("Parser ID") }
1818
+ },
1819
+ async ({ id }) => gqlCall(ctx, "parser_execute", "executeParser", EXECUTE_PARSER, { id })
1820
+ );
1821
+ }
1822
+ var StageErrorHandling = z.enum(["fail", "fallback", "skip"]).describe("What a failing stage does: fail the run, use fallbackValue, or skip the stage");
1823
+ var StageFields = {
1824
+ parserName: z.string().optional().describe("Display name of the parser"),
1825
+ parserType: ParserTypeEnum.optional(),
1826
+ expression: z.string().optional().describe("Expression override for this stage"),
1827
+ enabled: z.boolean().optional().describe("Whether the stage runs (default true)"),
1828
+ onError: StageErrorHandling.optional(),
1829
+ fallbackValue: z.unknown().optional().describe('Value used when onError is "fallback"'),
1830
+ description: z.string().optional().describe("What the stage does")
1831
+ };
1832
+ var CreateStage = z.object({
1833
+ parserId: z.string().describe("Stored parser this stage runs"),
1834
+ inputKey: z.string().describe("Data key the stage reads"),
1835
+ outputKey: z.string().describe("Data key the stage writes"),
1836
+ ...StageFields
1837
+ });
1838
+ var UpdateStage = z.object({
1839
+ id: z.string().optional().describe("Existing stage ID; omit to add a stage"),
1840
+ parserId: z.string().optional().describe("Stored parser this stage runs"),
1841
+ inputKey: z.string().optional().describe("Data key the stage reads"),
1842
+ outputKey: z.string().optional().describe("Data key the stage writes"),
1843
+ ...StageFields
1844
+ });
1845
+ function registerPipelineTools(server, ctx, track) {
1846
+ server.registerTool(
1847
+ track(mcpToolName(ctx.productName, "pipeline_get")),
1848
+ {
1849
+ title: "Get Pipeline",
1850
+ description: describeTool(
1851
+ "One pipeline with its ordered stages and current version. Read it before pipeline_update: the update needs the version back unchanged."
1852
+ ),
1853
+ annotations: READ_ONLY,
1854
+ inputSchema: { id: z.string().describe("Pipeline ID") }
1855
+ },
1856
+ async ({ id }) => gqlCall(ctx, "pipeline_get", "pipeline", GET_PIPELINE, { id })
1857
+ );
1858
+ server.registerTool(
1859
+ track(mcpToolName(ctx.productName, "pipelines_list")),
1860
+ {
1861
+ title: "List Pipelines",
1862
+ description: describeTool(
1863
+ "Pipelines in the workspace, metadata only (no stages; use pipeline_get). Filter by dashboard (consoleId) or status."
1864
+ ),
1865
+ annotations: READ_ONLY,
1866
+ inputSchema: {
1867
+ consoleId: z.string().optional().describe("Only pipelines of this dashboard"),
1868
+ status: PipelineStatusEnum.optional(),
1869
+ first: PageSize,
1870
+ after: PageCursor
1871
+ }
1872
+ },
1873
+ async ({ consoleId, status, first, after }) => {
1874
+ const filter = definedInput({ consoleId, status });
1875
+ return gqlCall(ctx, "pipelines_list", "listPipelines", LIST_PIPELINES, {
1876
+ first: first ?? 20,
1877
+ ...definedInput({ after }),
1878
+ ...Object.keys(filter).length > 0 ? { filter } : {}
1879
+ });
1880
+ }
1881
+ );
1882
+ server.registerTool(
1883
+ track(mcpToolName(ctx.productName, "pipeline_create")),
1884
+ {
1885
+ title: "Create Pipeline",
1886
+ description: describeTool(
1887
+ "Create a pipeline on a dashboard (consoleId) from ordered stages. Each stage names a stored parser and the data keys it reads and writes. Try it with pipeline_test before running it for real."
1888
+ ),
1889
+ annotations: WRITE,
1890
+ inputSchema: {
1891
+ consoleId: z.string().describe("Dashboard ID the pipeline belongs to"),
1892
+ name: z.string().describe("Pipeline name"),
1893
+ description: z.string().optional().describe("What the pipeline does"),
1894
+ status: PipelineStatusEnum.optional(),
1895
+ stages: z.array(CreateStage).optional().describe("Stages, in run order")
1896
+ }
1897
+ },
1898
+ async (args) => gqlCall(ctx, "pipeline_create", "createPipeline", CREATE_PIPELINE, {
1899
+ input: definedInput(args)
1900
+ })
1901
+ );
1902
+ server.registerTool(
1903
+ track(mcpToolName(ctx.productName, "pipeline_update")),
1904
+ {
1905
+ title: "Update Pipeline",
1906
+ description: describeTool(
1907
+ "Update a pipeline with optimistic locking. `version` is REQUIRED \u2014 read it from pipeline_get first and send it back unchanged; a stale version is rejected, so re-read and retry. A stages list you pass replaces the stored stages."
1908
+ ),
1909
+ annotations: WRITE,
1910
+ inputSchema: {
1911
+ id: z.string().describe("Pipeline ID"),
1912
+ version: VersionInt.optional(),
1913
+ name: z.string().optional().describe("New name"),
1914
+ description: z.string().optional().describe("New description"),
1915
+ status: PipelineStatusEnum.optional(),
1916
+ stages: z.array(UpdateStage).optional().describe("Replacement stages, in run order")
1917
+ }
1918
+ },
1919
+ async ({ id, version, ...fields }) => {
1920
+ if (version === void 0) return errorResult(VERSION_OMITTED_MESSAGE);
1921
+ return gqlCall(ctx, "pipeline_update", "updatePipeline", UPDATE_PIPELINE, {
1922
+ id,
1923
+ version,
1924
+ input: definedInput(fields)
1925
+ });
1926
+ }
1927
+ );
1928
+ server.registerTool(
1929
+ track(mcpToolName(ctx.productName, "pipeline_execute")),
1930
+ {
1931
+ title: "Execute Pipeline",
1932
+ description: describeTool(
1933
+ "Run a stored pipeline now. Its stages write their output keys, replacing what those keys held, so try the pipeline with pipeline_test first. Returns the execution record; follow it with pipeline_executions_list."
1934
+ ),
1935
+ annotations: WRITE,
1936
+ inputSchema: {
1937
+ pipelineId: z.string().describe("Pipeline ID"),
1938
+ inputData: z.unknown().optional().describe("Input for the first stage")
1939
+ }
1940
+ },
1941
+ async (args) => gqlCall(ctx, "pipeline_execute", "executePipeline", EXECUTE_PIPELINE, {
1942
+ input: definedInput(args)
1943
+ })
1944
+ );
1945
+ server.registerTool(
1946
+ track(mcpToolName(ctx.productName, "pipeline_test")),
1947
+ {
1948
+ title: "Test Pipeline",
1949
+ description: describeTool(
1950
+ "Run a pipeline in test mode on the inputData you give and return the execution record (status, timing, error). Use it to try a pipeline before pipeline_execute."
1951
+ ),
1952
+ annotations: WRITE,
1953
+ inputSchema: {
1954
+ pipelineId: z.string().describe("Pipeline ID"),
1955
+ inputData: z.unknown().describe("Sample input for the first stage")
1956
+ }
1957
+ },
1958
+ async (args) => gqlCall(ctx, "pipeline_test", "testPipeline", TEST_PIPELINE, {
1959
+ input: definedInput(args)
1960
+ })
1961
+ );
1962
+ server.registerTool(
1963
+ track(mcpToolName(ctx.productName, "pipeline_executions_list")),
1964
+ {
1965
+ title: "List Pipeline Executions",
1966
+ description: describeTool(
1967
+ "The past runs of a pipeline, newest first: status, timing and any error."
1968
+ ),
1969
+ annotations: READ_ONLY,
1970
+ inputSchema: {
1971
+ pipelineId: z.string().describe("Pipeline ID"),
1972
+ first: PageSize,
1973
+ after: PageCursor
1974
+ }
1975
+ },
1976
+ async ({ pipelineId, first, after }) => gqlCall(ctx, "pipeline_executions_list", "listPipelineExecutions", LIST_PIPELINE_EXECUTIONS, {
1977
+ pipelineId,
1978
+ first: first ?? 20,
1979
+ ...definedInput({ after })
1980
+ })
1981
+ );
1982
+ }
1983
+ function registerPromptTools(server, ctx, track) {
1984
+ server.registerTool(
1985
+ track(mcpToolName(ctx.productName, "prompt_generations_list")),
1986
+ {
1987
+ title: "List Prompt Generations",
1988
+ description: describeTool(
1989
+ "Earlier AI dashboard generations, newest first, optionally by status: prompt, status, resulting dashboard and any error."
1990
+ ),
1991
+ annotations: READ_ONLY,
1992
+ inputSchema: {
1993
+ status: PromptGenerationStatusEnum.optional(),
1994
+ first: PageSize,
1995
+ after: PageCursor
1996
+ }
1997
+ },
1998
+ async ({ status, first, after }) => gqlCall(ctx, "prompt_generations_list", "listPromptGenerations", LIST_PROMPT_GENERATIONS, {
1999
+ first: first ?? 20,
2000
+ ...definedInput({ status, after })
2001
+ })
2002
+ );
2003
+ server.registerTool(
2004
+ track(mcpToolName(ctx.productName, "prompt_generation_get")),
2005
+ {
2006
+ title: "Get Prompt Generation",
2007
+ description: describeTool(
2008
+ "One AI dashboard generation: status, error, the digest of the generated spec and the dashboard it produced."
2009
+ ),
2010
+ annotations: READ_ONLY,
2011
+ inputSchema: { id: z.string().describe("Generation ID") }
2012
+ },
2013
+ async ({ id }) => gqlCall(ctx, "prompt_generation_get", "getPromptGeneration", GET_PROMPT_GENERATION, { id })
2014
+ );
2015
+ server.registerTool(
2016
+ track(mcpToolName(ctx.productName, "prompt_generation_cancel")),
2017
+ {
2018
+ title: "Cancel Prompt Generation",
2019
+ description: describeTool(
2020
+ "Stop an AI dashboard generation that is still pending or running. A finished generation cannot be cancelled."
2021
+ ),
2022
+ annotations: WRITE,
2023
+ inputSchema: { generationId: z.string().describe("Generation ID") }
2024
+ },
2025
+ async ({ generationId }) => gqlCall(ctx, "prompt_generation_cancel", "cancelPromptGeneration", CANCEL_PROMPT_GENERATION, {
2026
+ generationId
2027
+ })
2028
+ );
2029
+ server.registerTool(
2030
+ track(mcpToolName(ctx.productName, "prompt_suggestions")),
2031
+ {
2032
+ title: "Get Prompt Suggestions",
2033
+ description: describeTool(
2034
+ "Example prompts for dashboard generation, filtered by category or search text."
2035
+ ),
2036
+ annotations: READ_ONLY,
2037
+ inputSchema: {
2038
+ category: z.string().optional().describe("Prompt category"),
2039
+ search: z.string().optional().describe("Search text"),
2040
+ limit: z.number().int().min(1).max(50).default(10).describe("Maximum suggestions")
2041
+ }
2042
+ },
2043
+ async ({ category, search, limit }) => gqlCall(
2044
+ ctx,
2045
+ "prompt_suggestions",
2046
+ "getPromptSuggestions",
2047
+ GET_PROMPT_SUGGESTIONS,
2048
+ definedInput({ category, search, limit: limit ?? 10 })
2049
+ )
2050
+ );
2051
+ server.registerTool(
2052
+ track(mcpToolName(ctx.productName, "prompt_analyze")),
2053
+ {
2054
+ title: "Analyze Prompt",
2055
+ description: describeTool(
2056
+ "Preview how BigConsole would read a prompt \u2014 intent, metrics, data needs, suggested widgets \u2014 without generating anything or using a generation."
2057
+ ),
2058
+ annotations: READ_ONLY,
2059
+ inputSchema: { prompt: z.string().describe("The dashboard prompt, in plain English") }
2060
+ },
2061
+ async ({ prompt }) => gqlCall(ctx, "prompt_analyze", "previewPromptAnalysis", PREVIEW_PROMPT_ANALYSIS, { prompt })
2062
+ );
1044
2063
  }
1045
2064
  function registerWidgetTools(server, ctx, track) {
1046
2065
  server.registerTool(
@@ -1086,6 +2105,119 @@ function registerWidgetTools(server, ctx, track) {
1086
2105
  }
1087
2106
  }
1088
2107
  );
2108
+ server.registerTool(
2109
+ track(mcpToolName(ctx.productName, "widget_get")),
2110
+ {
2111
+ title: "Get Widget",
2112
+ description: describeTool(
2113
+ "One widget with its full config. This is the only read that returns a widget config; read it before widget_update so you change the config rather than replace it blind."
2114
+ ),
2115
+ annotations: READ_ONLY,
2116
+ inputSchema: { id: z.string().describe("Widget ID") }
2117
+ },
2118
+ async ({ id }) => gqlCall(ctx, "widget_get", "getWidget", GET_WIDGET, { id })
2119
+ );
2120
+ server.registerTool(
2121
+ track(mcpToolName(ctx.productName, "widgets_list")),
2122
+ {
2123
+ title: "List Widgets",
2124
+ description: describeTool(
2125
+ "The widgets of one dashboard \u2014 id, page, type, title, renderer, position and bindings, never the config (use widget_get for that). Optionally filter by widget type."
2126
+ ),
2127
+ annotations: READ_ONLY,
2128
+ inputSchema: {
2129
+ dashboardId: z.string().describe("Dashboard ID"),
2130
+ type: WidgetTypeEnum.optional()
2131
+ }
2132
+ },
2133
+ async ({ dashboardId, type }) => gqlCall(
2134
+ ctx,
2135
+ "widgets_list",
2136
+ "listWidgetsByDashboard",
2137
+ LIST_WIDGETS_BY_DASHBOARD,
2138
+ definedInput({ dashboardId, type })
2139
+ )
2140
+ );
2141
+ server.registerTool(
2142
+ track(mcpToolName(ctx.productName, "widget_update")),
2143
+ {
2144
+ title: "Update Widget",
2145
+ description: describeTool(
2146
+ "Change a widget's title, config, position or data binding. Only the fields you pass change. A config you pass replaces the stored one, so start from widget_get. The same config rules as widget_create apply."
2147
+ ),
2148
+ annotations: WRITE,
2149
+ inputSchema: {
2150
+ id: z.string().describe("Widget ID"),
2151
+ title: z.string().optional().describe("New title"),
2152
+ config: WidgetConfig.optional(),
2153
+ position: WidgetPosition.optional(),
2154
+ parserId: z.string().optional().describe("Parser whose output the widget reads"),
2155
+ dataSinkId: z.string().optional().describe("Data sink the widget reads"),
2156
+ refreshInterval: z.number().int().min(0).optional().describe("Auto-refresh seconds")
2157
+ }
2158
+ },
2159
+ async (args) => gqlCall(ctx, "widget_update", "updateBigConsoleWidget", UPDATE_WIDGET, {
2160
+ input: definedInput(args)
2161
+ })
2162
+ );
2163
+ server.registerTool(
2164
+ track(mcpToolName(ctx.productName, "widget_duplicate")),
2165
+ {
2166
+ title: "Duplicate Widget",
2167
+ description: describeTool(
2168
+ "Copy a widget, optionally to a new grid position and under a new title."
2169
+ ),
2170
+ annotations: WRITE,
2171
+ inputSchema: {
2172
+ id: z.string().describe("Widget to copy"),
2173
+ newPosition: WidgetPosition.optional(),
2174
+ newTitle: z.string().optional().describe("Title of the copy")
2175
+ }
2176
+ },
2177
+ async ({ id, newPosition, newTitle }) => gqlCall(
2178
+ ctx,
2179
+ "widget_duplicate",
2180
+ "duplicateWidget",
2181
+ DUPLICATE_WIDGET,
2182
+ definedInput({ id, newPosition, newTitle })
2183
+ )
2184
+ );
2185
+ server.registerTool(
2186
+ track(mcpToolName(ctx.productName, "widget_refresh_data")),
2187
+ {
2188
+ title: "Refresh Widget Data",
2189
+ description: describeTool(
2190
+ "Re-fetch the data behind a widget so the next render is current. Returns when it was fetched, not the data."
2191
+ ),
2192
+ annotations: WRITE,
2193
+ inputSchema: { widgetId: z.string().describe("Widget ID") }
2194
+ },
2195
+ async ({ widgetId }) => gqlCall(ctx, "widget_refresh_data", "refreshWidgetData", REFRESH_WIDGET_DATA, { widgetId })
2196
+ );
2197
+ server.registerTool(
2198
+ track(mcpToolName(ctx.productName, "widget_types")),
2199
+ {
2200
+ title: "List Widget Types",
2201
+ description: describeTool(
2202
+ "Every widget type BigConsole knows, with its default config and size. widget_create accepts only the nine render-verified ones; this lists the rest for reference."
2203
+ ),
2204
+ annotations: READ_ONLY,
2205
+ inputSchema: {}
2206
+ },
2207
+ async () => gqlCall(ctx, "widget_types", "getWidgetTypes", GET_WIDGET_TYPES, {})
2208
+ );
2209
+ server.registerTool(
2210
+ track(mcpToolName(ctx.productName, "widget_renderers")),
2211
+ {
2212
+ title: "List Widget Renderers",
2213
+ description: describeTool(
2214
+ "The widget renderers available and the widget types each supports."
2215
+ ),
2216
+ annotations: READ_ONLY,
2217
+ inputSchema: {}
2218
+ },
2219
+ async () => gqlCall(ctx, "widget_renderers", "getAvailableRenderers", GET_WIDGET_RENDERERS, {})
2220
+ );
1089
2221
  }
1090
2222
 
1091
2223
  // src/modules/bigconsole/index.ts
@@ -1106,6 +2238,9 @@ var bigconsoleModule = {
1106
2238
  registerParserTools(server, ctx, track);
1107
2239
  registerWidgetTools(server, ctx, track);
1108
2240
  registerGenerateTools(server, ctx, track);
2241
+ registerPipelineTools(server, ctx, track);
2242
+ registerLinkedWorkflowTools(server, ctx, track);
2243
+ registerPromptTools(server, ctx, track);
1109
2244
  return { tools, resources: [], prompts: [] };
1110
2245
  }
1111
2246
  };