@intangle/mcp-server 2.5.5 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.ts CHANGED
@@ -364,10 +364,70 @@ try {
364
364
  return makeApiCall("fetch", { id, ids })
365
365
  }
366
366
 
367
+ async function handleFetchConversationMessages(args: any) {
368
+ const { space_id, conversation_id } = args as {
369
+ space_id?: string
370
+ conversation_id?: string
371
+ }
372
+
373
+ if (!space_id || !conversation_id) {
374
+ throw new Error("space_id and conversation_id are required")
375
+ }
376
+
377
+ return makeApiCall("conversation-messages", args)
378
+ }
379
+
380
+ async function handleSubscribeConversation(args: any) {
381
+ const { space_id, conversation_id } = args as {
382
+ space_id?: string
383
+ conversation_id?: string
384
+ }
385
+
386
+ if (!space_id || !conversation_id) {
387
+ throw new Error("space_id and conversation_id are required")
388
+ }
389
+
390
+ return makeApiCall("conversation-subscribe", args)
391
+ }
392
+
393
+ async function handleConversationInbox(args: any) {
394
+ const { space_id } = args as { space_id?: string }
395
+
396
+ if (!space_id) {
397
+ throw new Error("space_id is required")
398
+ }
399
+
400
+ return makeApiCall("conversation-inbox", args)
401
+ }
402
+
403
+ async function handleMarkConversationRead(args: any) {
404
+ const { space_id, conversation_id } = args as {
405
+ space_id?: string
406
+ conversation_id?: string
407
+ }
408
+
409
+ if (!space_id || !conversation_id) {
410
+ throw new Error("space_id and conversation_id are required")
411
+ }
412
+
413
+ return makeApiCall("conversation-read", args)
414
+ }
415
+
367
416
  async function handleViewSpaces() {
368
417
  return makeApiCall("list-spaces", {})
369
418
  }
370
419
 
420
+ async function handleViewGroups(args: any) {
421
+ const { space_id } = args as { space_id?: string }
422
+ if (!space_id) {
423
+ throw new Error(
424
+ "space_id is required. Use view_spaces to see available options."
425
+ )
426
+ }
427
+
428
+ return makeApiCall("view-groups", { space_id })
429
+ }
430
+
371
431
  async function handleViewProjects(args: any) {
372
432
  const { space_id } = args as { space_id: string }
373
433
  if (!space_id) {
@@ -391,15 +451,110 @@ try {
391
451
  )
392
452
  }
393
453
 
394
- if (slug && !space_id) {
454
+ if (!space_id) {
395
455
  throw new Error(
396
- "space_id is required when using slug. Use view_spaces to see available options."
456
+ "space_id is required. Use view_spaces to see available options."
397
457
  )
398
458
  }
399
459
 
400
460
  return makeApiCall("view-project", { project_id, space_id, slug })
401
461
  }
402
462
 
463
+ async function handleCreateGroup(args: any) {
464
+ const { space_id, name } = args as { space_id?: string; name?: string }
465
+ if (!space_id || !name) {
466
+ throw new Error("space_id and name are required")
467
+ }
468
+
469
+ return makeApiCall("create-group", { space_id, name })
470
+ }
471
+
472
+ async function handleRenameGroup(args: any) {
473
+ const { space_id, group_id, name } = args as {
474
+ space_id?: string
475
+ group_id?: string
476
+ name?: string
477
+ }
478
+
479
+ if (!space_id || !group_id || !name) {
480
+ throw new Error("space_id, group_id, and name are required")
481
+ }
482
+
483
+ return makeApiCall("rename-group", { space_id, group_id, name })
484
+ }
485
+
486
+ async function handleDeleteGroup(args: any) {
487
+ const { space_id, group_id } = args as {
488
+ space_id?: string
489
+ group_id?: string
490
+ }
491
+
492
+ if (!space_id || !group_id) {
493
+ throw new Error("space_id and group_id are required")
494
+ }
495
+
496
+ return makeApiCall("delete-group", { space_id, group_id })
497
+ }
498
+
499
+ async function handleCreateProject(args: any) {
500
+ const { space_id, name, group_id } = args as {
501
+ space_id?: string
502
+ name?: string
503
+ group_id?: string
504
+ }
505
+
506
+ if (!space_id || !name) {
507
+ throw new Error("space_id and name are required")
508
+ }
509
+
510
+ return makeApiCall("create-project", { space_id, name, group_id })
511
+ }
512
+
513
+ async function handleRenameProject(args: any) {
514
+ const { space_id, project_id, name } = args as {
515
+ space_id?: string
516
+ project_id?: string
517
+ name?: string
518
+ }
519
+
520
+ if (!space_id || !project_id || !name) {
521
+ throw new Error("space_id, project_id, and name are required")
522
+ }
523
+
524
+ return makeApiCall("rename-project", { space_id, project_id, name })
525
+ }
526
+
527
+ async function handleDeleteProject(args: any) {
528
+ const { space_id, project_id } = args as {
529
+ space_id?: string
530
+ project_id?: string
531
+ }
532
+
533
+ if (!space_id || !project_id) {
534
+ throw new Error("space_id and project_id are required")
535
+ }
536
+
537
+ return makeApiCall("delete-project", { space_id, project_id })
538
+ }
539
+
540
+ async function handleAssignProjectToGroup(args: any) {
541
+ const { space_id, project_id, group_id } = args as {
542
+ space_id?: string
543
+ project_id?: string
544
+ group_id?: string | null
545
+ }
546
+
547
+ if (!space_id || !project_id) {
548
+ throw new Error("space_id and project_id are required")
549
+ }
550
+
551
+ return makeApiCall("assign-project-to-group", {
552
+ space_id,
553
+ project_id,
554
+ group_id,
555
+ })
556
+ }
557
+
403
558
  async function handleCreateSpace(args: any) {
404
559
  return makeApiCall("create-space", args)
405
560
  }
@@ -448,20 +603,56 @@ try {
448
603
  })
449
604
  }
450
605
 
606
+ async function handleUpdateFolders(args: any) {
607
+ if (!args.space_id) {
608
+ throw new Error(
609
+ "space_id is required. Use view_spaces to see available options."
610
+ )
611
+ }
612
+
613
+ const hasOperation =
614
+ !!args.list ||
615
+ (Array.isArray(args.create) && args.create.length > 0) ||
616
+ (Array.isArray(args.rename) && args.rename.length > 0) ||
617
+ (Array.isArray(args.move_items) && args.move_items.length > 0) ||
618
+ (Array.isArray(args.delete) && args.delete.length > 0)
619
+
620
+ if (!hasOperation) {
621
+ throw new Error(
622
+ "At least one operation is required: list, create, rename, move_items, or delete."
623
+ )
624
+ }
625
+
626
+ return makeApiCall("update-folders", {
627
+ space_id: args.space_id,
628
+ list: args.list,
629
+ create: args.create,
630
+ rename: args.rename,
631
+ move_items: args.move_items,
632
+ delete: args.delete,
633
+ })
634
+ }
635
+
451
636
  async function handleMessage(args: any) {
452
637
  if (!args.space_id || !args.content) {
453
638
  throw new Error("space_id and content are required")
454
639
  }
455
640
 
641
+ // Keep one-turn MCP calls safely under common external tool-call deadlines
642
+ // while still allowing caller override for longer jobs.
456
643
  const timeoutMs =
457
644
  typeof args.timeout_ms === "number" && Number.isFinite(args.timeout_ms)
458
645
  ? Math.max(10_000, Math.min(300_000, Math.trunc(args.timeout_ms)))
459
- : undefined
646
+ : 100_000
460
647
 
461
648
  // Give backend a little extra headroom beyond requested assistant timeout.
462
- const requestTimeout = timeoutMs ? timeoutMs + 10_000 : undefined
649
+ const requestTimeout = timeoutMs + 10_000
463
650
 
464
- return makeApiCall("message", args, requestTimeout)
651
+ return makeApiCall(
652
+ "message",
653
+ { ...args, timeout_ms: timeoutMs },
654
+ requestTimeout
655
+ )
465
656
  }
466
657
 
467
658
  server.setRequestHandler(CallToolRequestSchema, async (request: any) => {
@@ -477,16 +668,51 @@ try {
477
668
  case "fetch_items":
478
669
  result = await handleFetch(args)
479
670
  break
671
+ case "fetch_conversation_messages":
672
+ result = await handleFetchConversationMessages(args)
673
+ break
674
+ case "subscribe_conversation":
675
+ result = await handleSubscribeConversation(args)
676
+ break
677
+ case "list_conversation_inbox":
678
+ result = await handleConversationInbox(args)
679
+ break
680
+ case "mark_conversation_read":
681
+ result = await handleMarkConversationRead(args)
682
+ break
480
683
  case "view_spaces":
481
684
  result = await handleViewSpaces()
482
685
  break
483
- // PROJECTS DISABLED - Projects have been disabled. May be re-enabled later.
484
- // case "view_projects":
485
- // result = await handleViewProjects(args)
486
- // break
487
- // case "view_project":
488
- // result = await handleViewProject(args)
489
- // break
686
+ case "view_groups":
687
+ result = await handleViewGroups(args)
688
+ break
689
+ case "create_group":
690
+ result = await handleCreateGroup(args)
691
+ break
692
+ case "rename_group":
693
+ result = await handleRenameGroup(args)
694
+ break
695
+ case "delete_group":
696
+ result = await handleDeleteGroup(args)
697
+ break
698
+ case "view_projects":
699
+ result = await handleViewProjects(args)
700
+ break
701
+ case "view_project":
702
+ result = await handleViewProject(args)
703
+ break
704
+ case "create_project":
705
+ result = await handleCreateProject(args)
706
+ break
707
+ case "rename_project":
708
+ result = await handleRenameProject(args)
709
+ break
710
+ case "delete_project":
711
+ result = await handleDeleteProject(args)
712
+ break
713
+ case "assign_project_to_group":
714
+ result = await handleAssignProjectToGroup(args)
715
+ break
490
716
  case "create_space":
491
717
  result = await handleCreateSpace(args)
492
718
  break
@@ -500,6 +726,9 @@ try {
500
726
  case "update_space":
501
727
  result = await handleUpdateSpace(args)
502
728
  break
729
+ case "update_folders":
730
+ result = await handleUpdateFolders(args)
731
+ break
503
732
  case "message":
504
733
  result = await handleMessage(args)
505
734
  break
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intangle/mcp-server",
3
- "version": "2.5.5",
3
+ "version": "2.6.0",
4
4
  "description": "Model Context Protocol server for Intangle - AI context that persists across conversations",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",