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