@vibescope/mcp-server 0.2.0 → 0.2.2

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 (104) hide show
  1. package/README.md +60 -7
  2. package/dist/api-client.d.ts +251 -1
  3. package/dist/api-client.js +82 -3
  4. package/dist/handlers/blockers.js +9 -8
  5. package/dist/handlers/bodies-of-work.js +96 -63
  6. package/dist/handlers/connectors.d.ts +45 -0
  7. package/dist/handlers/connectors.js +183 -0
  8. package/dist/handlers/cost.d.ts +10 -0
  9. package/dist/handlers/cost.js +112 -50
  10. package/dist/handlers/decisions.js +32 -19
  11. package/dist/handlers/deployment.js +144 -122
  12. package/dist/handlers/discovery.d.ts +7 -0
  13. package/dist/handlers/discovery.js +96 -7
  14. package/dist/handlers/fallback.js +29 -23
  15. package/dist/handlers/file-checkouts.d.ts +20 -0
  16. package/dist/handlers/file-checkouts.js +133 -0
  17. package/dist/handlers/findings.d.ts +6 -0
  18. package/dist/handlers/findings.js +96 -40
  19. package/dist/handlers/git-issues.js +40 -36
  20. package/dist/handlers/ideas.js +49 -31
  21. package/dist/handlers/index.d.ts +3 -0
  22. package/dist/handlers/index.js +9 -0
  23. package/dist/handlers/milestones.js +39 -32
  24. package/dist/handlers/organizations.js +99 -91
  25. package/dist/handlers/progress.js +24 -13
  26. package/dist/handlers/project.js +68 -28
  27. package/dist/handlers/requests.js +18 -14
  28. package/dist/handlers/roles.d.ts +18 -0
  29. package/dist/handlers/roles.js +130 -0
  30. package/dist/handlers/session.js +58 -17
  31. package/dist/handlers/sprints.js +93 -81
  32. package/dist/handlers/tasks.d.ts +2 -0
  33. package/dist/handlers/tasks.js +189 -91
  34. package/dist/handlers/types.d.ts +64 -2
  35. package/dist/handlers/types.js +48 -1
  36. package/dist/handlers/validation.js +21 -17
  37. package/dist/index.js +7 -2716
  38. package/dist/token-tracking.d.ts +74 -0
  39. package/dist/token-tracking.js +122 -0
  40. package/dist/tools.js +685 -9
  41. package/dist/utils.d.ts +5 -0
  42. package/dist/utils.js +17 -0
  43. package/docs/TOOLS.md +2053 -0
  44. package/package.json +4 -1
  45. package/scripts/generate-docs.ts +212 -0
  46. package/src/api-client.test.ts +718 -0
  47. package/src/api-client.ts +320 -6
  48. package/src/handlers/__test-setup__.ts +16 -0
  49. package/src/handlers/blockers.test.ts +31 -19
  50. package/src/handlers/blockers.ts +9 -8
  51. package/src/handlers/bodies-of-work.test.ts +55 -32
  52. package/src/handlers/bodies-of-work.ts +115 -115
  53. package/src/handlers/connectors.test.ts +834 -0
  54. package/src/handlers/connectors.ts +229 -0
  55. package/src/handlers/cost.test.ts +34 -44
  56. package/src/handlers/cost.ts +136 -85
  57. package/src/handlers/decisions.test.ts +37 -27
  58. package/src/handlers/decisions.ts +35 -30
  59. package/src/handlers/deployment.ts +180 -208
  60. package/src/handlers/discovery.test.ts +4 -5
  61. package/src/handlers/discovery.ts +98 -8
  62. package/src/handlers/fallback.test.ts +26 -22
  63. package/src/handlers/fallback.ts +36 -33
  64. package/src/handlers/file-checkouts.test.ts +670 -0
  65. package/src/handlers/file-checkouts.ts +165 -0
  66. package/src/handlers/findings.test.ts +178 -19
  67. package/src/handlers/findings.ts +112 -74
  68. package/src/handlers/git-issues.test.ts +51 -43
  69. package/src/handlers/git-issues.ts +44 -84
  70. package/src/handlers/ideas.test.ts +28 -23
  71. package/src/handlers/ideas.ts +61 -59
  72. package/src/handlers/index.ts +9 -0
  73. package/src/handlers/milestones.test.ts +33 -28
  74. package/src/handlers/milestones.ts +52 -50
  75. package/src/handlers/organizations.test.ts +104 -83
  76. package/src/handlers/organizations.ts +117 -142
  77. package/src/handlers/progress.test.ts +20 -14
  78. package/src/handlers/progress.ts +26 -24
  79. package/src/handlers/project.test.ts +34 -27
  80. package/src/handlers/project.ts +95 -63
  81. package/src/handlers/requests.test.ts +27 -18
  82. package/src/handlers/requests.ts +21 -17
  83. package/src/handlers/roles.test.ts +303 -0
  84. package/src/handlers/roles.ts +208 -0
  85. package/src/handlers/session.test.ts +47 -0
  86. package/src/handlers/session.ts +71 -26
  87. package/src/handlers/sprints.test.ts +71 -50
  88. package/src/handlers/sprints.ts +113 -146
  89. package/src/handlers/tasks.test.ts +77 -15
  90. package/src/handlers/tasks.ts +231 -156
  91. package/src/handlers/tool-categories.test.ts +66 -0
  92. package/src/handlers/types.ts +81 -2
  93. package/src/handlers/validation.test.ts +78 -45
  94. package/src/handlers/validation.ts +23 -25
  95. package/src/index.ts +12 -2732
  96. package/src/token-tracking.test.ts +453 -0
  97. package/src/token-tracking.ts +164 -0
  98. package/src/tools.ts +685 -9
  99. package/src/utils.test.ts +2 -2
  100. package/src/utils.ts +17 -0
  101. package/dist/config/tool-categories.d.ts +0 -31
  102. package/dist/config/tool-categories.js +0 -253
  103. package/dist/knowledge.d.ts +0 -6
  104. package/dist/knowledge.js +0 -218
package/src/tools.ts CHANGED
@@ -8,7 +8,9 @@ export const tools: Tool[] = [
8
8
  {
9
9
  name: 'start_work_session',
10
10
  description: `CALL THIS FIRST when beginning work on a project.
11
- Returns session info, persona, role, and next task. Use mode:'full' for complete context.`,
11
+ Returns session info, persona, role, and next_task. Start the next_task IMMEDIATELY without asking the user.
12
+
13
+ Use mode:'full' for complete context, mode:'lite' (default) for minimal tokens.`,
12
14
  inputSchema: {
13
15
  type: 'object',
14
16
  properties: {
@@ -190,6 +192,40 @@ Returns session info, persona, role, and next task. Use mode:'full' for complete
190
192
  required: ['project_id'],
191
193
  },
192
194
  },
195
+ {
196
+ name: 'get_body_of_work_costs',
197
+ description: 'Get cost breakdown by body of work with phase-level details. Returns costs for pre/core/post phases and model breakdown.',
198
+ inputSchema: {
199
+ type: 'object',
200
+ properties: {
201
+ body_of_work_id: {
202
+ type: 'string',
203
+ description: 'Body of work UUID (optional if project_id provided)',
204
+ },
205
+ project_id: {
206
+ type: 'string',
207
+ description: 'Project UUID to get all body of work costs (optional if body_of_work_id provided)',
208
+ },
209
+ },
210
+ },
211
+ },
212
+ {
213
+ name: 'get_sprint_costs',
214
+ description: 'Get cost breakdown by sprint with velocity metrics. Returns cost per story point and phase breakdown.',
215
+ inputSchema: {
216
+ type: 'object',
217
+ properties: {
218
+ sprint_id: {
219
+ type: 'string',
220
+ description: 'Sprint UUID (optional if project_id provided)',
221
+ },
222
+ project_id: {
223
+ type: 'string',
224
+ description: 'Project UUID to get all sprint costs (optional if sprint_id provided)',
225
+ },
226
+ },
227
+ },
228
+ },
193
229
  // Knowledge Base Query Tool
194
230
  {
195
231
  name: 'query_knowledge_base',
@@ -234,7 +270,7 @@ Returns session info, persona, role, and next task. Use mode:'full' for complete
234
270
  properties: {
235
271
  category: {
236
272
  type: 'string',
237
- enum: ['session', 'project', 'tasks', 'milestones', 'progress', 'blockers', 'decisions', 'ideas', 'findings', 'validation', 'deployment', 'fallback', 'requests', 'organizations', 'cost', 'knowledge'],
273
+ enum: ['session', 'project', 'tasks', 'milestones', 'progress', 'blockers', 'decisions', 'ideas', 'findings', 'validation', 'deployment', 'fallback', 'bodies_of_work', 'sprints', 'requests', 'organizations', 'cost', 'git_issues', 'knowledge', 'discovery', 'subtasks', 'worktrees', 'roles', 'file_locks'],
238
274
  description: 'Category to list (omit for all categories)',
239
275
  },
240
276
  },
@@ -430,7 +466,9 @@ Returns session info, persona, role, and next task. Use mode:'full' for complete
430
466
  },
431
467
  {
432
468
  name: 'get_next_task',
433
- description: 'Get highest priority pending task. Skips claimed tasks. Check deployment_blocks_tasks first.',
469
+ description: `Get highest priority pending task. Start it IMMEDIATELY by calling update_task(task_id, status: "in_progress").
470
+
471
+ Do NOT ask the user for permission. Follow the directive in the response.`,
434
472
  inputSchema: {
435
473
  type: 'object',
436
474
  properties: {
@@ -486,7 +524,13 @@ Returns session info, persona, role, and next task. Use mode:'full' for complete
486
524
  },
487
525
  {
488
526
  name: 'update_task',
489
- description: 'Update task status, progress, or details. Include progress_note with progress_percentage.',
527
+ description: `Update task status, progress, or details. Include progress_note with progress_percentage.
528
+
529
+ IMPORTANT: When setting status to "in_progress", you MUST provide git_branch AND worktree_path to enable cleanup tracking.
530
+ Create worktree first: git worktree add ../PROJECT-task-TASKID -b feature/TASKID-description BASE_BRANCH
531
+ Then call: update_task(task_id, status: "in_progress", git_branch: "feature/TASKID-description", worktree_path: "../PROJECT-task-TASKID")
532
+
533
+ For projects without git branching (trunk-based or none), use skip_worktree_requirement: true.`,
490
534
  inputSchema: {
491
535
  type: 'object',
492
536
  properties: {
@@ -522,20 +566,35 @@ Returns session info, persona, role, and next task. Use mode:'full' for complete
522
566
  },
523
567
  git_branch: {
524
568
  type: 'string',
525
- description: 'Git branch associated with this task',
569
+ description: 'Git branch associated with this task. REQUIRED when status is "in_progress" (unless skip_worktree_requirement is true)',
570
+ },
571
+ worktree_path: {
572
+ type: 'string',
573
+ description: 'Git worktree path for this task (e.g., "../project-task-abc123"). Store this for cleanup tracking across sessions.',
526
574
  },
527
575
  model_capability: {
528
576
  type: 'string',
529
577
  enum: ['haiku', 'sonnet', 'opus'],
530
578
  description: 'Recommended model capability: haiku (simple tasks), sonnet (standard), opus (complex reasoning)',
531
579
  },
580
+ skip_worktree_requirement: {
581
+ type: 'boolean',
582
+ description: 'Skip git_branch requirement for projects without branching workflows (trunk-based or none). Default: false',
583
+ },
532
584
  },
533
585
  required: ['task_id'],
534
586
  },
535
587
  },
536
588
  {
537
589
  name: 'complete_task',
538
- description: 'Mark task done. Returns next_task and context counts (validation, blockers, deployment).',
590
+ description: `Mark task done. Returns next_task which you MUST start immediately without asking the user.
591
+
592
+ CRITICAL: After calling this tool, you must:
593
+ 1. If next_task is returned → Start it immediately by calling update_task(task_id, status: "in_progress")
594
+ 2. If no next_task → Call get_next_task() or start a fallback_activity
595
+ 3. NEVER ask the user "What should I do next?" or "Should I continue?"
596
+
597
+ The auto_continue: true flag in the response means you are expected to continue working autonomously.`,
539
598
  inputSchema: {
540
599
  type: 'object',
541
600
  properties: {
@@ -1107,6 +1166,46 @@ Returns subtasks with aggregate completion stats.`,
1107
1166
  required: ['parent_task_id'],
1108
1167
  },
1109
1168
  },
1169
+ {
1170
+ name: 'get_stale_worktrees',
1171
+ description: `Get worktrees that need cleanup.
1172
+
1173
+ Returns tasks with worktree_path set where:
1174
+ - Task is completed or cancelled (worktree should have been cleaned up)
1175
+ - Task has been abandoned (no activity for 24+ hours while in_progress)
1176
+
1177
+ IMPORTANT: Call this on session start to clean up orphaned worktrees from previous sessions.
1178
+ For each stale worktree:
1179
+ 1. Run: git worktree remove <worktree_path>
1180
+ 2. Call: clear_worktree_path(task_id)`,
1181
+ inputSchema: {
1182
+ type: 'object',
1183
+ properties: {
1184
+ project_id: {
1185
+ type: 'string',
1186
+ description: 'Project UUID',
1187
+ },
1188
+ },
1189
+ required: ['project_id'],
1190
+ },
1191
+ },
1192
+ {
1193
+ name: 'clear_worktree_path',
1194
+ description: `Clear the worktree_path from a task after cleanup.
1195
+
1196
+ Call this AFTER removing the worktree with git worktree remove.
1197
+ This marks the task as cleaned up so it won't appear in get_stale_worktrees.`,
1198
+ inputSchema: {
1199
+ type: 'object',
1200
+ properties: {
1201
+ task_id: {
1202
+ type: 'string',
1203
+ description: 'Task UUID',
1204
+ },
1205
+ },
1206
+ required: ['task_id'],
1207
+ },
1208
+ },
1110
1209
  {
1111
1210
  name: 'heartbeat',
1112
1211
  description: `Send heartbeat to maintain 'active' status. Call every 30-60 seconds.`,
@@ -1435,8 +1534,14 @@ Returns subtasks with aggregate completion stats.`,
1435
1534
  },
1436
1535
  schedule_type: {
1437
1536
  type: 'string',
1438
- description: 'Schedule type: once (one-time), daily, weekly, or monthly',
1439
- enum: ['once', 'daily', 'weekly', 'monthly'],
1537
+ description: 'Schedule type: once (one-time), hourly, daily, weekly, or monthly',
1538
+ enum: ['once', 'hourly', 'daily', 'weekly', 'monthly'],
1539
+ },
1540
+ hours_interval: {
1541
+ type: 'number',
1542
+ description: 'For hourly schedules, the number of hours between runs (1-24, default: 1)',
1543
+ minimum: 1,
1544
+ maximum: 24,
1440
1545
  },
1441
1546
  auto_trigger: {
1442
1547
  type: 'boolean',
@@ -1499,7 +1604,13 @@ Returns subtasks with aggregate completion stats.`,
1499
1604
  schedule_type: {
1500
1605
  type: 'string',
1501
1606
  description: 'New schedule type',
1502
- enum: ['once', 'daily', 'weekly', 'monthly'],
1607
+ enum: ['once', 'hourly', 'daily', 'weekly', 'monthly'],
1608
+ },
1609
+ hours_interval: {
1610
+ type: 'number',
1611
+ description: 'For hourly schedules, the number of hours between runs (1-24)',
1612
+ minimum: 1,
1613
+ maximum: 24,
1503
1614
  },
1504
1615
  auto_trigger: {
1505
1616
  type: 'boolean',
@@ -1597,6 +1708,7 @@ Returns subtasks with aggregate completion stats.`,
1597
1708
  'documentation_review',
1598
1709
  'dependency_audit',
1599
1710
  'validate_completed_tasks',
1711
+ 'worktree_cleanup',
1600
1712
  ],
1601
1713
  },
1602
1714
  },
@@ -2528,5 +2640,569 @@ Only returns tasks where all dependencies are completed.`,
2528
2640
  required: ['project_id'],
2529
2641
  },
2530
2642
  },
2643
+ // ============================================================================
2644
+ // Sprint Tools
2645
+ // ============================================================================
2646
+ {
2647
+ name: 'create_sprint',
2648
+ description: `Create a new sprint. Sprints are time-bounded bodies of work with velocity tracking.
2649
+ Sprints start in 'planning' status where tasks can be added with story points.`,
2650
+ inputSchema: {
2651
+ type: 'object',
2652
+ properties: {
2653
+ project_id: {
2654
+ type: 'string',
2655
+ description: 'Project UUID',
2656
+ },
2657
+ title: {
2658
+ type: 'string',
2659
+ description: 'Sprint title (e.g., "Sprint 5" or "Q1 Release")',
2660
+ },
2661
+ goal: {
2662
+ type: 'string',
2663
+ description: 'Sprint goal statement',
2664
+ },
2665
+ start_date: {
2666
+ type: 'string',
2667
+ description: 'Start date (YYYY-MM-DD)',
2668
+ },
2669
+ end_date: {
2670
+ type: 'string',
2671
+ description: 'End date (YYYY-MM-DD)',
2672
+ },
2673
+ auto_deploy_on_completion: {
2674
+ type: 'boolean',
2675
+ description: 'Automatically request deployment when sprint completes (default: false)',
2676
+ },
2677
+ deploy_environment: {
2678
+ type: 'string',
2679
+ enum: ['development', 'staging', 'production'],
2680
+ description: 'Target environment for auto-deploy (default: production)',
2681
+ },
2682
+ deploy_version_bump: {
2683
+ type: 'string',
2684
+ enum: ['patch', 'minor', 'major'],
2685
+ description: 'Version bump for auto-deploy (default: minor)',
2686
+ },
2687
+ },
2688
+ required: ['project_id', 'title', 'start_date', 'end_date'],
2689
+ },
2690
+ },
2691
+ {
2692
+ name: 'update_sprint',
2693
+ description: `Update a sprint's details. Can update title, goal, dates, and deployment settings.`,
2694
+ inputSchema: {
2695
+ type: 'object',
2696
+ properties: {
2697
+ sprint_id: {
2698
+ type: 'string',
2699
+ description: 'Sprint UUID',
2700
+ },
2701
+ title: {
2702
+ type: 'string',
2703
+ description: 'New sprint title',
2704
+ },
2705
+ goal: {
2706
+ type: 'string',
2707
+ description: 'New sprint goal',
2708
+ },
2709
+ start_date: {
2710
+ type: 'string',
2711
+ description: 'New start date (YYYY-MM-DD)',
2712
+ },
2713
+ end_date: {
2714
+ type: 'string',
2715
+ description: 'New end date (YYYY-MM-DD)',
2716
+ },
2717
+ auto_deploy_on_completion: {
2718
+ type: 'boolean',
2719
+ description: 'Auto-deploy setting',
2720
+ },
2721
+ deploy_environment: {
2722
+ type: 'string',
2723
+ enum: ['development', 'staging', 'production'],
2724
+ description: 'Target environment',
2725
+ },
2726
+ deploy_version_bump: {
2727
+ type: 'string',
2728
+ enum: ['patch', 'minor', 'major'],
2729
+ description: 'Version bump type',
2730
+ },
2731
+ },
2732
+ required: ['sprint_id'],
2733
+ },
2734
+ },
2735
+ {
2736
+ name: 'get_sprint',
2737
+ description: `Get a sprint with all its tasks organized by phase (pre/core/post).
2738
+ Includes progress percentage, velocity points, and committed points.
2739
+ Use summary_only: true to get task counts and next task instead of full task arrays (saves tokens).`,
2740
+ inputSchema: {
2741
+ type: 'object',
2742
+ properties: {
2743
+ sprint_id: {
2744
+ type: 'string',
2745
+ description: 'Sprint UUID',
2746
+ },
2747
+ summary_only: {
2748
+ type: 'boolean',
2749
+ description: 'Return task counts and next task instead of full task arrays (default: false)',
2750
+ },
2751
+ },
2752
+ required: ['sprint_id'],
2753
+ },
2754
+ },
2755
+ {
2756
+ name: 'get_sprints',
2757
+ description: `List sprints for a project with velocity metrics.
2758
+ Returns sprints sorted by sprint_number descending (most recent first).`,
2759
+ inputSchema: {
2760
+ type: 'object',
2761
+ properties: {
2762
+ project_id: {
2763
+ type: 'string',
2764
+ description: 'Project UUID',
2765
+ },
2766
+ status: {
2767
+ type: 'string',
2768
+ enum: ['planning', 'active', 'in_review', 'retrospective', 'completed', 'cancelled'],
2769
+ description: 'Filter by sprint status (optional)',
2770
+ },
2771
+ limit: {
2772
+ type: 'number',
2773
+ description: 'Max sprints to return (default: 20, max: 100)',
2774
+ },
2775
+ },
2776
+ required: ['project_id'],
2777
+ },
2778
+ },
2779
+ {
2780
+ name: 'delete_sprint',
2781
+ description: `Delete a sprint. Tasks are preserved but no longer grouped.`,
2782
+ inputSchema: {
2783
+ type: 'object',
2784
+ properties: {
2785
+ sprint_id: {
2786
+ type: 'string',
2787
+ description: 'Sprint UUID',
2788
+ },
2789
+ },
2790
+ required: ['sprint_id'],
2791
+ },
2792
+ },
2793
+ {
2794
+ name: 'start_sprint',
2795
+ description: `Start a sprint. Transitions from 'planning' to 'active' status.
2796
+ Locks the committed_points at the current total story points.`,
2797
+ inputSchema: {
2798
+ type: 'object',
2799
+ properties: {
2800
+ sprint_id: {
2801
+ type: 'string',
2802
+ description: 'Sprint UUID',
2803
+ },
2804
+ },
2805
+ required: ['sprint_id'],
2806
+ },
2807
+ },
2808
+ {
2809
+ name: 'complete_sprint',
2810
+ description: `Complete a sprint. Handles retrospective phase and auto-deployment if configured.
2811
+ Status flow: active → in_review → retrospective → completed`,
2812
+ inputSchema: {
2813
+ type: 'object',
2814
+ properties: {
2815
+ sprint_id: {
2816
+ type: 'string',
2817
+ description: 'Sprint UUID',
2818
+ },
2819
+ retrospective_notes: {
2820
+ type: 'string',
2821
+ description: 'Sprint retrospective notes',
2822
+ },
2823
+ skip_retrospective: {
2824
+ type: 'boolean',
2825
+ description: 'Skip retrospective phase and go directly to completed (default: false)',
2826
+ },
2827
+ },
2828
+ required: ['sprint_id'],
2829
+ },
2830
+ },
2831
+ {
2832
+ name: 'add_task_to_sprint',
2833
+ description: `Add a task to a sprint with optional story points.
2834
+ Tasks can be added during 'planning' status. Story points contribute to committed_points.`,
2835
+ inputSchema: {
2836
+ type: 'object',
2837
+ properties: {
2838
+ sprint_id: {
2839
+ type: 'string',
2840
+ description: 'Sprint UUID',
2841
+ },
2842
+ task_id: {
2843
+ type: 'string',
2844
+ description: 'Task UUID to add',
2845
+ },
2846
+ story_points: {
2847
+ type: 'number',
2848
+ description: 'Story point estimate (optional, must be non-negative integer)',
2849
+ },
2850
+ phase: {
2851
+ type: 'string',
2852
+ enum: ['pre', 'core', 'post'],
2853
+ description: 'Task phase (default: core)',
2854
+ },
2855
+ },
2856
+ required: ['sprint_id', 'task_id'],
2857
+ },
2858
+ },
2859
+ {
2860
+ name: 'remove_task_from_sprint',
2861
+ description: `Remove a task from a sprint. Task is preserved but returns to backlog.`,
2862
+ inputSchema: {
2863
+ type: 'object',
2864
+ properties: {
2865
+ sprint_id: {
2866
+ type: 'string',
2867
+ description: 'Sprint UUID',
2868
+ },
2869
+ task_id: {
2870
+ type: 'string',
2871
+ description: 'Task UUID to remove',
2872
+ },
2873
+ },
2874
+ required: ['sprint_id', 'task_id'],
2875
+ },
2876
+ },
2877
+ {
2878
+ name: 'get_sprint_backlog',
2879
+ description: `Get tasks from backlog/pending that can be added to a sprint.
2880
+ Returns tasks not already assigned to any body of work or sprint.`,
2881
+ inputSchema: {
2882
+ type: 'object',
2883
+ properties: {
2884
+ project_id: {
2885
+ type: 'string',
2886
+ description: 'Project UUID',
2887
+ },
2888
+ sprint_id: {
2889
+ type: 'string',
2890
+ description: 'Sprint UUID to exclude already-added tasks (optional)',
2891
+ },
2892
+ },
2893
+ required: ['project_id'],
2894
+ },
2895
+ },
2896
+ {
2897
+ name: 'get_sprint_velocity',
2898
+ description: `Get velocity metrics for completed sprints.
2899
+ Returns committed vs completed points and average velocity.`,
2900
+ inputSchema: {
2901
+ type: 'object',
2902
+ properties: {
2903
+ project_id: {
2904
+ type: 'string',
2905
+ description: 'Project UUID',
2906
+ },
2907
+ limit: {
2908
+ type: 'number',
2909
+ description: 'Number of sprints to analyze (default: 10, max: 50)',
2910
+ },
2911
+ },
2912
+ required: ['project_id'],
2913
+ },
2914
+ },
2915
+ // ============================================================================
2916
+ // Git Issue Tools
2917
+ // ============================================================================
2918
+ {
2919
+ name: 'add_git_issue',
2920
+ description: `Record a git-related issue (merge conflict, push failure, etc.). Auto-created by claim_validation when conflicts detected.`,
2921
+ inputSchema: {
2922
+ type: 'object',
2923
+ properties: {
2924
+ project_id: {
2925
+ type: 'string',
2926
+ description: 'Project UUID',
2927
+ },
2928
+ issue_type: {
2929
+ type: 'string',
2930
+ enum: ['merge_conflict', 'push_failed', 'rebase_needed', 'branch_diverged', 'pr_not_mergeable'],
2931
+ description: 'Type of git issue',
2932
+ },
2933
+ branch: {
2934
+ type: 'string',
2935
+ description: 'Branch where the issue occurred',
2936
+ },
2937
+ target_branch: {
2938
+ type: 'string',
2939
+ description: 'Target branch for merge/rebase (optional)',
2940
+ },
2941
+ pr_url: {
2942
+ type: 'string',
2943
+ description: 'Pull request URL if applicable (optional)',
2944
+ },
2945
+ conflicting_files: {
2946
+ type: 'array',
2947
+ items: { type: 'string' },
2948
+ description: 'List of files with conflicts (optional)',
2949
+ },
2950
+ error_message: {
2951
+ type: 'string',
2952
+ description: 'Error message from git operation (optional)',
2953
+ },
2954
+ task_id: {
2955
+ type: 'string',
2956
+ description: 'Related task UUID (optional)',
2957
+ },
2958
+ },
2959
+ required: ['project_id', 'issue_type', 'branch'],
2960
+ },
2961
+ },
2962
+ {
2963
+ name: 'resolve_git_issue',
2964
+ description: `Mark a git issue as resolved.`,
2965
+ inputSchema: {
2966
+ type: 'object',
2967
+ properties: {
2968
+ git_issue_id: {
2969
+ type: 'string',
2970
+ description: 'Git issue UUID',
2971
+ },
2972
+ resolution_note: {
2973
+ type: 'string',
2974
+ description: 'How the issue was resolved (optional)',
2975
+ },
2976
+ auto_resolved: {
2977
+ type: 'boolean',
2978
+ description: 'Whether this was auto-resolved (e.g., PR became mergeable)',
2979
+ },
2980
+ },
2981
+ required: ['git_issue_id'],
2982
+ },
2983
+ },
2984
+ {
2985
+ name: 'get_git_issues',
2986
+ description: `Get git issues for a project, optionally filtered by status, type, or branch.`,
2987
+ inputSchema: {
2988
+ type: 'object',
2989
+ properties: {
2990
+ project_id: {
2991
+ type: 'string',
2992
+ description: 'Project UUID',
2993
+ },
2994
+ status: {
2995
+ type: 'string',
2996
+ enum: ['open', 'resolved'],
2997
+ description: 'Filter by status (default: open)',
2998
+ },
2999
+ issue_type: {
3000
+ type: 'string',
3001
+ enum: ['merge_conflict', 'push_failed', 'rebase_needed', 'branch_diverged', 'pr_not_mergeable'],
3002
+ description: 'Filter by issue type (optional)',
3003
+ },
3004
+ branch: {
3005
+ type: 'string',
3006
+ description: 'Filter by branch (optional)',
3007
+ },
3008
+ limit: {
3009
+ type: 'number',
3010
+ description: 'Max issues to return (default: 50)',
3011
+ },
3012
+ },
3013
+ required: ['project_id'],
3014
+ },
3015
+ },
3016
+ {
3017
+ name: 'delete_git_issue',
3018
+ description: `Delete a git issue.`,
3019
+ inputSchema: {
3020
+ type: 'object',
3021
+ properties: {
3022
+ git_issue_id: {
3023
+ type: 'string',
3024
+ description: 'Git issue UUID',
3025
+ },
3026
+ },
3027
+ required: ['git_issue_id'],
3028
+ },
3029
+ },
3030
+ // ============================================================================
3031
+ // Connector Tools (External Integrations)
3032
+ // ============================================================================
3033
+ {
3034
+ name: 'get_connectors',
3035
+ description: `List connectors for a project. Connectors enable sending events to external services (Slack, Discord, webhooks, etc.).`,
3036
+ inputSchema: {
3037
+ type: 'object',
3038
+ properties: {
3039
+ project_id: {
3040
+ type: 'string',
3041
+ description: 'Project UUID',
3042
+ },
3043
+ type: {
3044
+ type: 'string',
3045
+ enum: ['webhook', 'slack', 'discord', 'github', 'custom'],
3046
+ description: 'Filter by connector type (optional)',
3047
+ },
3048
+ status: {
3049
+ type: 'string',
3050
+ enum: ['active', 'disabled'],
3051
+ description: 'Filter by status (optional)',
3052
+ },
3053
+ limit: {
3054
+ type: 'number',
3055
+ description: 'Max connectors to return (default: 50)',
3056
+ },
3057
+ offset: {
3058
+ type: 'number',
3059
+ description: 'Pagination offset (default: 0)',
3060
+ },
3061
+ },
3062
+ required: ['project_id'],
3063
+ },
3064
+ },
3065
+ {
3066
+ name: 'get_connector',
3067
+ description: `Get a single connector with full details including configuration (sensitive fields are masked).`,
3068
+ inputSchema: {
3069
+ type: 'object',
3070
+ properties: {
3071
+ connector_id: {
3072
+ type: 'string',
3073
+ description: 'Connector UUID',
3074
+ },
3075
+ },
3076
+ required: ['connector_id'],
3077
+ },
3078
+ },
3079
+ {
3080
+ name: 'add_connector',
3081
+ description: `Add a new connector for external integrations. Supports webhook, Slack, Discord, GitHub, and custom connectors.`,
3082
+ inputSchema: {
3083
+ type: 'object',
3084
+ properties: {
3085
+ project_id: {
3086
+ type: 'string',
3087
+ description: 'Project UUID',
3088
+ },
3089
+ name: {
3090
+ type: 'string',
3091
+ description: 'Connector name (e.g., "Slack Notifications")',
3092
+ },
3093
+ type: {
3094
+ type: 'string',
3095
+ enum: ['webhook', 'slack', 'discord', 'github', 'custom'],
3096
+ description: 'Connector type',
3097
+ },
3098
+ description: {
3099
+ type: 'string',
3100
+ description: 'Optional description',
3101
+ },
3102
+ config: {
3103
+ type: 'object',
3104
+ description: 'Type-specific configuration (e.g., { webhook_url: "..." } for Slack)',
3105
+ },
3106
+ events: {
3107
+ type: 'object',
3108
+ description: 'Event subscriptions (e.g., { task_completed: true, blocker_added: true })',
3109
+ },
3110
+ },
3111
+ required: ['project_id', 'name', 'type'],
3112
+ },
3113
+ },
3114
+ {
3115
+ name: 'update_connector',
3116
+ description: `Update a connector's configuration, events, or status.`,
3117
+ inputSchema: {
3118
+ type: 'object',
3119
+ properties: {
3120
+ connector_id: {
3121
+ type: 'string',
3122
+ description: 'Connector UUID',
3123
+ },
3124
+ name: {
3125
+ type: 'string',
3126
+ description: 'Updated name',
3127
+ },
3128
+ description: {
3129
+ type: 'string',
3130
+ description: 'Updated description',
3131
+ },
3132
+ config: {
3133
+ type: 'object',
3134
+ description: 'Updated configuration (merged with existing)',
3135
+ },
3136
+ events: {
3137
+ type: 'object',
3138
+ description: 'Updated event subscriptions',
3139
+ },
3140
+ status: {
3141
+ type: 'string',
3142
+ enum: ['active', 'disabled'],
3143
+ description: 'Enable or disable the connector',
3144
+ },
3145
+ },
3146
+ required: ['connector_id'],
3147
+ },
3148
+ },
3149
+ {
3150
+ name: 'delete_connector',
3151
+ description: `Delete a connector.`,
3152
+ inputSchema: {
3153
+ type: 'object',
3154
+ properties: {
3155
+ connector_id: {
3156
+ type: 'string',
3157
+ description: 'Connector UUID',
3158
+ },
3159
+ },
3160
+ required: ['connector_id'],
3161
+ },
3162
+ },
3163
+ {
3164
+ name: 'test_connector',
3165
+ description: `Test a connector by sending a test event. Returns success/failure status.`,
3166
+ inputSchema: {
3167
+ type: 'object',
3168
+ properties: {
3169
+ connector_id: {
3170
+ type: 'string',
3171
+ description: 'Connector UUID to test',
3172
+ },
3173
+ },
3174
+ required: ['connector_id'],
3175
+ },
3176
+ },
3177
+ {
3178
+ name: 'get_connector_events',
3179
+ description: `Get event history for a connector or project. Shows delivery status and errors.`,
3180
+ inputSchema: {
3181
+ type: 'object',
3182
+ properties: {
3183
+ connector_id: {
3184
+ type: 'string',
3185
+ description: 'Connector UUID (optional if project_id provided)',
3186
+ },
3187
+ project_id: {
3188
+ type: 'string',
3189
+ description: 'Project UUID (optional if connector_id provided)',
3190
+ },
3191
+ status: {
3192
+ type: 'string',
3193
+ enum: ['pending', 'sent', 'failed', 'retrying'],
3194
+ description: 'Filter by delivery status (optional)',
3195
+ },
3196
+ limit: {
3197
+ type: 'number',
3198
+ description: 'Max events to return (default: 50)',
3199
+ },
3200
+ offset: {
3201
+ type: 'number',
3202
+ description: 'Pagination offset (default: 0)',
3203
+ },
3204
+ },
3205
+ },
3206
+ },
2531
3207
  ];
2532
3208