@intangle/mcp-server 2.5.6 → 2.6.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.
- package/dist/index.js +132 -9
- package/dist/tool-definitions.js +381 -55
- package/index.ts +199 -9
- package/package.json +1 -1
- package/tool-definitions.ts +430 -55
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 (
|
|
454
|
+
if (!space_id) {
|
|
395
455
|
throw new Error(
|
|
396
|
-
"space_id is required
|
|
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
|
}
|
|
@@ -513,16 +668,51 @@ try {
|
|
|
513
668
|
case "fetch_items":
|
|
514
669
|
result = await handleFetch(args)
|
|
515
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
|
|
516
683
|
case "view_spaces":
|
|
517
684
|
result = await handleViewSpaces()
|
|
518
685
|
break
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
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
|
|
526
716
|
case "create_space":
|
|
527
717
|
result = await handleCreateSpace(args)
|
|
528
718
|
break
|