@burdenoff/mcp-libs 2026.522.1 → 2026.525.1

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.
Files changed (73) hide show
  1. package/dist/chunk-HRWIDQJE.js +1771 -0
  2. package/dist/chunk-HRWIDQJE.js.map +1 -0
  3. package/dist/modules/auth/index.cjs +317 -0
  4. package/dist/modules/auth/index.cjs.map +1 -1
  5. package/dist/modules/auth/index.js +289 -1
  6. package/dist/modules/auth/index.js.map +1 -1
  7. package/dist/modules/channels/index.cjs +47 -0
  8. package/dist/modules/channels/index.cjs.map +1 -1
  9. package/dist/modules/channels/index.js +47 -0
  10. package/dist/modules/channels/index.js.map +1 -1
  11. package/dist/modules/conversations/index.cjs +1355 -0
  12. package/dist/modules/conversations/index.cjs.map +1 -1
  13. package/dist/modules/conversations/index.js +1355 -0
  14. package/dist/modules/conversations/index.js.map +1 -1
  15. package/dist/modules/devportal/index.cjs +281 -0
  16. package/dist/modules/devportal/index.cjs.map +1 -1
  17. package/dist/modules/devportal/index.js +281 -0
  18. package/dist/modules/devportal/index.js.map +1 -1
  19. package/dist/modules/export/index.cjs +348 -0
  20. package/dist/modules/export/index.cjs.map +1 -1
  21. package/dist/modules/export/index.js +348 -0
  22. package/dist/modules/export/index.js.map +1 -1
  23. package/dist/modules/files/index.cjs +244 -2
  24. package/dist/modules/files/index.cjs.map +1 -1
  25. package/dist/modules/files/index.js +244 -2
  26. package/dist/modules/files/index.js.map +1 -1
  27. package/dist/modules/integrations/index.cjs +539 -0
  28. package/dist/modules/integrations/index.cjs.map +1 -1
  29. package/dist/modules/integrations/index.js +539 -0
  30. package/dist/modules/integrations/index.js.map +1 -1
  31. package/dist/modules/organizations/index.cjs +211 -0
  32. package/dist/modules/organizations/index.cjs.map +1 -1
  33. package/dist/modules/organizations/index.js +211 -0
  34. package/dist/modules/organizations/index.js.map +1 -1
  35. package/dist/modules/products/index.cjs +131 -0
  36. package/dist/modules/products/index.cjs.map +1 -1
  37. package/dist/modules/products/index.js +131 -0
  38. package/dist/modules/products/index.js.map +1 -1
  39. package/dist/modules/rbac/index.cjs +114 -0
  40. package/dist/modules/rbac/index.cjs.map +1 -1
  41. package/dist/modules/rbac/index.js +114 -0
  42. package/dist/modules/rbac/index.js.map +1 -1
  43. package/dist/modules/sandbox/index.cjs +864 -0
  44. package/dist/modules/sandbox/index.cjs.map +1 -1
  45. package/dist/modules/sandbox/index.js +699 -1
  46. package/dist/modules/sandbox/index.js.map +1 -1
  47. package/dist/modules/scheduler/index.cjs +860 -0
  48. package/dist/modules/scheduler/index.cjs.map +1 -1
  49. package/dist/modules/scheduler/index.js +860 -0
  50. package/dist/modules/scheduler/index.js.map +1 -1
  51. package/dist/modules/security/index.cjs +51 -0
  52. package/dist/modules/security/index.cjs.map +1 -1
  53. package/dist/modules/security/index.js +51 -0
  54. package/dist/modules/security/index.js.map +1 -1
  55. package/dist/modules/store/index.cjs +102 -0
  56. package/dist/modules/store/index.cjs.map +1 -1
  57. package/dist/modules/store/index.js +102 -0
  58. package/dist/modules/store/index.js.map +1 -1
  59. package/dist/modules/tours/index.cjs +43 -0
  60. package/dist/modules/tours/index.cjs.map +1 -1
  61. package/dist/modules/tours/index.js +43 -0
  62. package/dist/modules/tours/index.js.map +1 -1
  63. package/dist/modules/vibecontrols/index.cjs +4618 -668
  64. package/dist/modules/vibecontrols/index.cjs.map +1 -1
  65. package/dist/modules/vibecontrols/index.js +3626 -434
  66. package/dist/modules/vibecontrols/index.js.map +1 -1
  67. package/dist/modules/workspaces/index.cjs +46 -3
  68. package/dist/modules/workspaces/index.cjs.map +1 -1
  69. package/dist/modules/workspaces/index.js +46 -3
  70. package/dist/modules/workspaces/index.js.map +1 -1
  71. package/package.json +4 -3
  72. package/dist/chunk-4GBVJ4OY.js +0 -847
  73. package/dist/chunk-4GBVJ4OY.js.map +0 -1
@@ -52,6 +52,109 @@ var GET_INTEGRATION_LOGS = `
52
52
  }
53
53
  }
54
54
  `;
55
+ var UPDATE_CONNECTION = `
56
+ mutation UpdateConnection($id: ID!, $input: UpdateConnectionInput!) {
57
+ updateConnection(id: $id, input: $input) { id name status }
58
+ }
59
+ `;
60
+ var REVOKE_CONNECTION = `
61
+ mutation RevokeConnection($connectionId: ID!) {
62
+ revokeConnection(connectionId: $connectionId) { id name status }
63
+ }
64
+ `;
65
+ var TEST_CONNECTION = `
66
+ mutation TestConnection($connectionId: ID!) {
67
+ testConnection(connectionId: $connectionId) { success message latencyMs }
68
+ }
69
+ `;
70
+ var LINK_INTEGRATION_TO_CHANNEL = `
71
+ mutation LinkIntegrationToChannel($channelId: String!, $connectionId: ID!, $organizationId: String!) {
72
+ linkIntegrationToChannel(channelId: $channelId, connectionId: $connectionId, organizationId: $organizationId) {
73
+ id name status channelId organizationId
74
+ }
75
+ }
76
+ `;
77
+ var REFRESH_CONNECTION_TOKEN = `
78
+ mutation RefreshConnectionToken($connectionId: ID!) {
79
+ refreshConnectionToken(connectionId: $connectionId) { id status }
80
+ }
81
+ `;
82
+ var AUTHENTICATE_API_KEY = `
83
+ mutation AuthenticateWithApiKey($input: ApiKeyAuthInput!) {
84
+ authenticateWithApiKey(input: $input) { id name status }
85
+ }
86
+ `;
87
+ var AUTHENTICATE_BASIC = `
88
+ mutation AuthenticateWithBasicAuth($input: BasicAuthInput!) {
89
+ authenticateWithBasicAuth(input: $input) { id name status }
90
+ }
91
+ `;
92
+ var AUTHENTICATE_BEARER = `
93
+ mutation AuthenticateWithBearerToken($input: BearerTokenAuthInput!) {
94
+ authenticateWithBearerToken(input: $input) { id name status }
95
+ }
96
+ `;
97
+ var INITIATE_OAUTH = `
98
+ mutation InitiateOAuth($input: InitiateOAuthInput!) {
99
+ initiateOAuth(input: $input) { redirectUrl state }
100
+ }
101
+ `;
102
+ var COMPLETE_OAUTH = `
103
+ mutation CompleteOAuth($input: CompleteOAuthInput!) {
104
+ completeOAuth(input: $input) { id name status }
105
+ }
106
+ `;
107
+ var GET_PROVIDER_BY_KEY = `
108
+ query GetProviderByKey($key: String!) {
109
+ getProviderByKey(key: $key) { id key name authType category connectionCount isEnabled }
110
+ }
111
+ `;
112
+ var GET_PROVIDER_CATALOG = `
113
+ query GetProviderCatalog($pagination: IntegrationsPaginationInput) {
114
+ getProviderCatalog(pagination: $pagination) {
115
+ items { id key name category authType isEnabled }
116
+ total hasMore
117
+ }
118
+ }
119
+ `;
120
+ var GET_CONNECTIONS_BY_PROVIDER = `
121
+ query GetConnectionsByProvider($providerId: ID!, $pagination: IntegrationsPaginationInput) {
122
+ getConnectionsByProvider(providerId: $providerId, pagination: $pagination) {
123
+ items { id name providerId status grantedScopes }
124
+ total hasMore
125
+ }
126
+ }
127
+ `;
128
+ var ENABLE_PROVIDER = `
129
+ mutation EnableProvider($id: ID!) {
130
+ enableProvider(id: $id) { id key name isEnabled }
131
+ }
132
+ `;
133
+ var DISABLE_PROVIDER = `
134
+ mutation DisableProvider($id: ID!) {
135
+ disableProvider(id: $id) { id key name isEnabled }
136
+ }
137
+ `;
138
+ var TAG_CONNECTION = `
139
+ mutation TagConnection($input: TagConnectionInput!) {
140
+ tagConnection(input: $input) { id entityId tagId source }
141
+ }
142
+ `;
143
+ var UNTAG_CONNECTION = `
144
+ mutation UntagConnection($input: UntagConnectionInput!) {
145
+ untagConnection(input: $input)
146
+ }
147
+ `;
148
+ var REPLACE_CONNECTION_TAGS = `
149
+ mutation ReplaceConnectionTags($input: ReplaceConnectionTagsInput!) {
150
+ replaceConnectionTags(input: $input) { id entityId tagId source }
151
+ }
152
+ `;
153
+ var GET_CONNECTION_TAGS = `
154
+ query GetConnectionTags($input: GetConnectionTagsInput!) {
155
+ getConnectionTags(input: $input) { id entityId tagId source assignedAt }
156
+ }
157
+ `;
55
158
 
56
159
  // src/modules/integrations/tools.ts
57
160
  function registerIntegrationsTools(server, ctx, track) {
@@ -212,6 +315,442 @@ function registerIntegrationsTools(server, ctx, track) {
212
315
  }
213
316
  }
214
317
  );
318
+ server.registerTool(
319
+ track(mcpToolName(ctx.productName, "integrations_connections_update")),
320
+ {
321
+ title: "Update Connection",
322
+ description: "Update a connection (name, description, config JSON object).",
323
+ inputSchema: {
324
+ id: z.string().describe("Connection ID"),
325
+ name: z.string().optional(),
326
+ description: z.string().optional(),
327
+ config: z.record(z.string(), z.unknown()).optional()
328
+ }
329
+ },
330
+ async ({ id, name, description, config }) => {
331
+ try {
332
+ const input = {};
333
+ if (name !== void 0) input.name = name;
334
+ if (description !== void 0) input.description = description;
335
+ if (config !== void 0) input.config = config;
336
+ if (Object.keys(input).length === 0) {
337
+ return errorResult("Provide at least one of name, description, config");
338
+ }
339
+ const data = await ctx.gql.workspace.request(
340
+ UPDATE_CONNECTION,
341
+ { id, input }
342
+ );
343
+ return jsonResult(data.updateConnection);
344
+ } catch (error) {
345
+ ctx.logger.error("integrations_connections_update failed", { error: String(error) });
346
+ return errorResult(
347
+ `Failed to update connection: ${error instanceof Error ? error.message : String(error)}`
348
+ );
349
+ }
350
+ }
351
+ );
352
+ server.registerTool(
353
+ track(mcpToolName(ctx.productName, "integrations_connections_revoke")),
354
+ {
355
+ title: "Revoke Connection",
356
+ description: "Revoke a connection \u2014 invalidates tokens and marks as REVOKED.",
357
+ inputSchema: { connectionId: z.string().describe("Connection ID") }
358
+ },
359
+ async ({ connectionId }) => {
360
+ try {
361
+ const data = await ctx.gql.workspace.request(
362
+ REVOKE_CONNECTION,
363
+ { connectionId }
364
+ );
365
+ return jsonResult(data.revokeConnection);
366
+ } catch (error) {
367
+ ctx.logger.error("integrations_connections_revoke failed", { error: String(error) });
368
+ return errorResult(
369
+ `Failed to revoke connection: ${error instanceof Error ? error.message : String(error)}`
370
+ );
371
+ }
372
+ }
373
+ );
374
+ server.registerTool(
375
+ track(mcpToolName(ctx.productName, "integrations_connections_test")),
376
+ {
377
+ title: "Test Connection",
378
+ description: "Health/auth probe for a connection; returns success/message/latencyMs.",
379
+ inputSchema: { connectionId: z.string().describe("Connection ID") }
380
+ },
381
+ async ({ connectionId }) => {
382
+ try {
383
+ const data = await ctx.gql.workspace.request(TEST_CONNECTION, { connectionId });
384
+ return jsonResult(data.testConnection);
385
+ } catch (error) {
386
+ ctx.logger.error("integrations_connections_test failed", { error: String(error) });
387
+ return errorResult(
388
+ `Failed to test connection: ${error instanceof Error ? error.message : String(error)}`
389
+ );
390
+ }
391
+ }
392
+ );
393
+ server.registerTool(
394
+ track(mcpToolName(ctx.productName, "integrations_connections_link_channel")),
395
+ {
396
+ title: "Link Connection to Channel",
397
+ description: "Link an integration connection to a channel for DM/notification routing.",
398
+ inputSchema: {
399
+ channelId: z.string(),
400
+ connectionId: z.string(),
401
+ organizationId: z.string()
402
+ }
403
+ },
404
+ async ({ channelId, connectionId, organizationId }) => {
405
+ try {
406
+ const data = await ctx.gql.workspace.request(LINK_INTEGRATION_TO_CHANNEL, { channelId, connectionId, organizationId });
407
+ return jsonResult(data.linkIntegrationToChannel);
408
+ } catch (error) {
409
+ ctx.logger.error("integrations_connections_link_channel failed", {
410
+ error: String(error)
411
+ });
412
+ return errorResult(
413
+ `Failed to link connection: ${error instanceof Error ? error.message : String(error)}`
414
+ );
415
+ }
416
+ }
417
+ );
418
+ server.registerTool(
419
+ track(mcpToolName(ctx.productName, "integrations_connections_refresh_token")),
420
+ {
421
+ title: "Refresh Connection Token",
422
+ description: "Force a token refresh for an OAuth connection.",
423
+ inputSchema: { connectionId: z.string() }
424
+ },
425
+ async ({ connectionId }) => {
426
+ try {
427
+ const data = await ctx.gql.workspace.request(REFRESH_CONNECTION_TOKEN, { connectionId });
428
+ return jsonResult(data.refreshConnectionToken);
429
+ } catch (error) {
430
+ ctx.logger.error("integrations_connections_refresh_token failed", {
431
+ error: String(error)
432
+ });
433
+ return errorResult(
434
+ `Failed to refresh token: ${error instanceof Error ? error.message : String(error)}`
435
+ );
436
+ }
437
+ }
438
+ );
439
+ server.registerTool(
440
+ track(mcpToolName(ctx.productName, "integrations_auth_api_key")),
441
+ {
442
+ title: "Authenticate Connection (API Key)",
443
+ description: "Attach an API key to an existing connection.",
444
+ inputSchema: { connectionId: z.string(), apiKey: z.string() }
445
+ },
446
+ async ({ connectionId, apiKey }) => {
447
+ try {
448
+ const data = await ctx.gql.workspace.request(AUTHENTICATE_API_KEY, { input: { connectionId, apiKey } });
449
+ return jsonResult(data.authenticateWithApiKey);
450
+ } catch (error) {
451
+ ctx.logger.error("integrations_auth_api_key failed", { error: String(error) });
452
+ return errorResult(
453
+ `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`
454
+ );
455
+ }
456
+ }
457
+ );
458
+ server.registerTool(
459
+ track(mcpToolName(ctx.productName, "integrations_auth_basic")),
460
+ {
461
+ title: "Authenticate Connection (Basic Auth)",
462
+ description: "Attach Basic Auth credentials to an existing connection.",
463
+ inputSchema: {
464
+ connectionId: z.string(),
465
+ username: z.string(),
466
+ password: z.string()
467
+ }
468
+ },
469
+ async ({ connectionId, username, password }) => {
470
+ try {
471
+ const data = await ctx.gql.workspace.request(AUTHENTICATE_BASIC, { input: { connectionId, username, password } });
472
+ return jsonResult(data.authenticateWithBasicAuth);
473
+ } catch (error) {
474
+ ctx.logger.error("integrations_auth_basic failed", { error: String(error) });
475
+ return errorResult(
476
+ `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`
477
+ );
478
+ }
479
+ }
480
+ );
481
+ server.registerTool(
482
+ track(mcpToolName(ctx.productName, "integrations_auth_bearer")),
483
+ {
484
+ title: "Authenticate Connection (Bearer Token)",
485
+ description: "Attach a Bearer token to an existing connection.",
486
+ inputSchema: { connectionId: z.string(), token: z.string() }
487
+ },
488
+ async ({ connectionId, token }) => {
489
+ try {
490
+ const data = await ctx.gql.workspace.request(AUTHENTICATE_BEARER, { input: { connectionId, token } });
491
+ return jsonResult(data.authenticateWithBearerToken);
492
+ } catch (error) {
493
+ ctx.logger.error("integrations_auth_bearer failed", { error: String(error) });
494
+ return errorResult(
495
+ `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`
496
+ );
497
+ }
498
+ }
499
+ );
500
+ server.registerTool(
501
+ track(mcpToolName(ctx.productName, "integrations_auth_oauth_start")),
502
+ {
503
+ title: "Initiate OAuth Flow",
504
+ description: "Start an OAuth flow; returns redirectUrl + state for the client to use.",
505
+ inputSchema: {
506
+ connectionId: z.string(),
507
+ redirectUri: z.string(),
508
+ scopes: z.array(z.string()).optional()
509
+ }
510
+ },
511
+ async ({ connectionId, redirectUri, scopes }) => {
512
+ try {
513
+ const input = { connectionId, redirectUri };
514
+ if (scopes !== void 0) input.scopes = scopes;
515
+ const data = await ctx.gql.workspace.request(INITIATE_OAUTH, { input });
516
+ return jsonResult(data.initiateOAuth);
517
+ } catch (error) {
518
+ ctx.logger.error("integrations_auth_oauth_start failed", { error: String(error) });
519
+ return errorResult(
520
+ `Failed to initiate OAuth: ${error instanceof Error ? error.message : String(error)}`
521
+ );
522
+ }
523
+ }
524
+ );
525
+ server.registerTool(
526
+ track(mcpToolName(ctx.productName, "integrations_auth_oauth_complete")),
527
+ {
528
+ title: "Complete OAuth Flow",
529
+ description: "Complete an OAuth flow with code+state returned by the IdP.",
530
+ inputSchema: {
531
+ connectionId: z.string(),
532
+ code: z.string(),
533
+ redirectUri: z.string(),
534
+ state: z.string()
535
+ }
536
+ },
537
+ async ({ connectionId, code, redirectUri, state }) => {
538
+ try {
539
+ const data = await ctx.gql.workspace.request(
540
+ COMPLETE_OAUTH,
541
+ { input: { connectionId, code, redirectUri, state } }
542
+ );
543
+ return jsonResult(data.completeOAuth);
544
+ } catch (error) {
545
+ ctx.logger.error("integrations_auth_oauth_complete failed", { error: String(error) });
546
+ return errorResult(
547
+ `Failed to complete OAuth: ${error instanceof Error ? error.message : String(error)}`
548
+ );
549
+ }
550
+ }
551
+ );
552
+ server.registerTool(
553
+ track(mcpToolName(ctx.productName, "integrations_providers_get_by_key")),
554
+ {
555
+ title: "Get Provider By Key",
556
+ description: "Look up an integration provider by its string key (e.g. github, slack).",
557
+ inputSchema: { key: z.string() }
558
+ },
559
+ async ({ key }) => {
560
+ try {
561
+ const data = await ctx.gql.workspace.request(
562
+ GET_PROVIDER_BY_KEY,
563
+ { key }
564
+ );
565
+ if (!data.getProviderByKey) return errorResult(`Provider ${key} not found`);
566
+ return jsonResult(data.getProviderByKey);
567
+ } catch (error) {
568
+ ctx.logger.error("integrations_providers_get_by_key failed", { error: String(error) });
569
+ return errorResult(
570
+ `Failed to get provider: ${error instanceof Error ? error.message : String(error)}`
571
+ );
572
+ }
573
+ }
574
+ );
575
+ server.registerTool(
576
+ track(mcpToolName(ctx.productName, "integrations_providers_catalog")),
577
+ {
578
+ title: "Provider Catalog",
579
+ description: "Browseable catalog of integration providers (paginated).",
580
+ inputSchema: { limit: z.number().optional() }
581
+ },
582
+ async ({ limit }) => {
583
+ try {
584
+ const data = await ctx.gql.workspace.request(GET_PROVIDER_CATALOG, { pagination: { limit: limit ?? 100, offset: 0 } });
585
+ return jsonResult(data.getProviderCatalog);
586
+ } catch (error) {
587
+ ctx.logger.error("integrations_providers_catalog failed", { error: String(error) });
588
+ return errorResult(
589
+ `Failed to get catalog: ${error instanceof Error ? error.message : String(error)}`
590
+ );
591
+ }
592
+ }
593
+ );
594
+ server.registerTool(
595
+ track(mcpToolName(ctx.productName, "integrations_providers_connections")),
596
+ {
597
+ title: "Connections By Provider",
598
+ description: "List all connections that belong to a given provider.",
599
+ inputSchema: { providerId: z.string(), limit: z.number().optional() }
600
+ },
601
+ async ({ providerId, limit }) => {
602
+ try {
603
+ const data = await ctx.gql.workspace.request(GET_CONNECTIONS_BY_PROVIDER, {
604
+ providerId,
605
+ pagination: { limit: limit ?? 100, offset: 0 }
606
+ });
607
+ return jsonResult(data.getConnectionsByProvider);
608
+ } catch (error) {
609
+ ctx.logger.error("integrations_providers_connections failed", { error: String(error) });
610
+ return errorResult(
611
+ `Failed to list: ${error instanceof Error ? error.message : String(error)}`
612
+ );
613
+ }
614
+ }
615
+ );
616
+ server.registerTool(
617
+ track(mcpToolName(ctx.productName, "integrations_providers_enable")),
618
+ {
619
+ title: "Enable Provider",
620
+ description: "Enable an integration provider in this workspace.",
621
+ inputSchema: { id: z.string() }
622
+ },
623
+ async ({ id }) => {
624
+ try {
625
+ const data = await ctx.gql.workspace.request(
626
+ ENABLE_PROVIDER,
627
+ { id }
628
+ );
629
+ return jsonResult(data.enableProvider);
630
+ } catch (error) {
631
+ ctx.logger.error("integrations_providers_enable failed", { error: String(error) });
632
+ return errorResult(
633
+ `Failed to enable: ${error instanceof Error ? error.message : String(error)}`
634
+ );
635
+ }
636
+ }
637
+ );
638
+ server.registerTool(
639
+ track(mcpToolName(ctx.productName, "integrations_providers_disable")),
640
+ {
641
+ title: "Disable Provider",
642
+ description: "Disable an integration provider in this workspace.",
643
+ inputSchema: { id: z.string() }
644
+ },
645
+ async ({ id }) => {
646
+ try {
647
+ const data = await ctx.gql.workspace.request(
648
+ DISABLE_PROVIDER,
649
+ { id }
650
+ );
651
+ return jsonResult(data.disableProvider);
652
+ } catch (error) {
653
+ ctx.logger.error("integrations_providers_disable failed", { error: String(error) });
654
+ return errorResult(
655
+ `Failed to disable: ${error instanceof Error ? error.message : String(error)}`
656
+ );
657
+ }
658
+ }
659
+ );
660
+ server.registerTool(
661
+ track(mcpToolName(ctx.productName, "integrations_connections_tag_add")),
662
+ {
663
+ title: "Tag Connection",
664
+ description: "Add a tag assignment to a connection.",
665
+ inputSchema: {
666
+ entityId: z.string(),
667
+ tagId: z.string(),
668
+ source: z.string().optional()
669
+ }
670
+ },
671
+ async ({ entityId, tagId, source }) => {
672
+ try {
673
+ const input = { entityId, tagId };
674
+ if (source !== void 0) input.source = source;
675
+ const data = await ctx.gql.workspace.request(
676
+ TAG_CONNECTION,
677
+ { input }
678
+ );
679
+ return jsonResult(data.tagConnection);
680
+ } catch (error) {
681
+ ctx.logger.error("integrations_connections_tag_add failed", { error: String(error) });
682
+ return errorResult(
683
+ `Failed to tag: ${error instanceof Error ? error.message : String(error)}`
684
+ );
685
+ }
686
+ }
687
+ );
688
+ server.registerTool(
689
+ track(mcpToolName(ctx.productName, "integrations_connections_tag_remove")),
690
+ {
691
+ title: "Untag Connection",
692
+ description: "Remove a tag assignment from a connection.",
693
+ inputSchema: { entityId: z.string(), tagId: z.string() }
694
+ },
695
+ async ({ entityId, tagId }) => {
696
+ try {
697
+ const data = await ctx.gql.workspace.request(
698
+ UNTAG_CONNECTION,
699
+ { input: { entityId, tagId } }
700
+ );
701
+ return jsonResult({ removed: data.untagConnection });
702
+ } catch (error) {
703
+ ctx.logger.error("integrations_connections_tag_remove failed", { error: String(error) });
704
+ return errorResult(
705
+ `Failed to untag: ${error instanceof Error ? error.message : String(error)}`
706
+ );
707
+ }
708
+ }
709
+ );
710
+ server.registerTool(
711
+ track(mcpToolName(ctx.productName, "integrations_connections_tag_replace")),
712
+ {
713
+ title: "Replace Connection Tags",
714
+ description: "Replace all tag assignments on a connection.",
715
+ inputSchema: { entityId: z.string(), tagIds: z.array(z.string()) }
716
+ },
717
+ async ({ entityId, tagIds }) => {
718
+ try {
719
+ const data = await ctx.gql.workspace.request(
720
+ REPLACE_CONNECTION_TAGS,
721
+ { input: { entityId, tagIds } }
722
+ );
723
+ return jsonResult(data.replaceConnectionTags);
724
+ } catch (error) {
725
+ ctx.logger.error("integrations_connections_tag_replace failed", { error: String(error) });
726
+ return errorResult(
727
+ `Failed to replace tags: ${error instanceof Error ? error.message : String(error)}`
728
+ );
729
+ }
730
+ }
731
+ );
732
+ server.registerTool(
733
+ track(mcpToolName(ctx.productName, "integrations_connections_tag_list")),
734
+ {
735
+ title: "List Connection Tags",
736
+ description: "List tag assignments on a connection.",
737
+ inputSchema: { entityId: z.string() }
738
+ },
739
+ async ({ entityId }) => {
740
+ try {
741
+ const data = await ctx.gql.workspace.request(
742
+ GET_CONNECTION_TAGS,
743
+ { input: { entityId } }
744
+ );
745
+ return jsonResult(data.getConnectionTags);
746
+ } catch (error) {
747
+ ctx.logger.error("integrations_connections_tag_list failed", { error: String(error) });
748
+ return errorResult(
749
+ `Failed to list tags: ${error instanceof Error ? error.message : String(error)}`
750
+ );
751
+ }
752
+ }
753
+ );
215
754
  server.registerTool(
216
755
  track(mcpToolName(ctx.productName, "integrations_logs")),
217
756
  {