@vibescope/mcp-server 0.2.1 → 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 (93) hide show
  1. package/README.md +60 -7
  2. package/dist/api-client.d.ts +187 -0
  3. package/dist/api-client.js +48 -0
  4. package/dist/handlers/blockers.js +9 -8
  5. package/dist/handlers/bodies-of-work.js +14 -14
  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 +54 -0
  10. package/dist/handlers/decisions.js +3 -3
  11. package/dist/handlers/deployment.js +35 -19
  12. package/dist/handlers/discovery.d.ts +7 -0
  13. package/dist/handlers/discovery.js +61 -2
  14. package/dist/handlers/fallback.js +5 -4
  15. package/dist/handlers/file-checkouts.d.ts +2 -0
  16. package/dist/handlers/file-checkouts.js +38 -6
  17. package/dist/handlers/findings.js +13 -12
  18. package/dist/handlers/git-issues.js +4 -4
  19. package/dist/handlers/ideas.js +5 -5
  20. package/dist/handlers/index.d.ts +1 -0
  21. package/dist/handlers/index.js +3 -0
  22. package/dist/handlers/milestones.js +5 -5
  23. package/dist/handlers/organizations.js +13 -13
  24. package/dist/handlers/progress.js +2 -2
  25. package/dist/handlers/project.js +6 -6
  26. package/dist/handlers/requests.js +3 -3
  27. package/dist/handlers/session.js +28 -9
  28. package/dist/handlers/sprints.js +17 -17
  29. package/dist/handlers/tasks.d.ts +2 -0
  30. package/dist/handlers/tasks.js +78 -20
  31. package/dist/handlers/types.d.ts +64 -2
  32. package/dist/handlers/types.js +48 -1
  33. package/dist/handlers/validation.js +3 -3
  34. package/dist/index.js +7 -2716
  35. package/dist/token-tracking.d.ts +74 -0
  36. package/dist/token-tracking.js +122 -0
  37. package/dist/tools.js +298 -9
  38. package/dist/utils.d.ts +5 -0
  39. package/dist/utils.js +17 -0
  40. package/docs/TOOLS.md +2053 -0
  41. package/package.json +4 -1
  42. package/scripts/generate-docs.ts +212 -0
  43. package/src/api-client.test.ts +718 -0
  44. package/src/api-client.ts +231 -0
  45. package/src/handlers/__test-setup__.ts +9 -0
  46. package/src/handlers/blockers.test.ts +31 -19
  47. package/src/handlers/blockers.ts +9 -8
  48. package/src/handlers/bodies-of-work.test.ts +55 -32
  49. package/src/handlers/bodies-of-work.ts +14 -14
  50. package/src/handlers/connectors.test.ts +834 -0
  51. package/src/handlers/connectors.ts +229 -0
  52. package/src/handlers/cost.ts +66 -0
  53. package/src/handlers/decisions.test.ts +34 -25
  54. package/src/handlers/decisions.ts +3 -3
  55. package/src/handlers/deployment.ts +39 -19
  56. package/src/handlers/discovery.ts +61 -2
  57. package/src/handlers/fallback.test.ts +26 -22
  58. package/src/handlers/fallback.ts +5 -4
  59. package/src/handlers/file-checkouts.test.ts +242 -49
  60. package/src/handlers/file-checkouts.ts +44 -6
  61. package/src/handlers/findings.test.ts +38 -24
  62. package/src/handlers/findings.ts +13 -12
  63. package/src/handlers/git-issues.test.ts +51 -43
  64. package/src/handlers/git-issues.ts +4 -4
  65. package/src/handlers/ideas.test.ts +28 -23
  66. package/src/handlers/ideas.ts +5 -5
  67. package/src/handlers/index.ts +3 -0
  68. package/src/handlers/milestones.test.ts +33 -28
  69. package/src/handlers/milestones.ts +5 -5
  70. package/src/handlers/organizations.test.ts +104 -83
  71. package/src/handlers/organizations.ts +13 -13
  72. package/src/handlers/progress.test.ts +20 -14
  73. package/src/handlers/progress.ts +2 -2
  74. package/src/handlers/project.test.ts +34 -27
  75. package/src/handlers/project.ts +6 -6
  76. package/src/handlers/requests.test.ts +27 -18
  77. package/src/handlers/requests.ts +3 -3
  78. package/src/handlers/session.test.ts +47 -0
  79. package/src/handlers/session.ts +32 -9
  80. package/src/handlers/sprints.test.ts +71 -50
  81. package/src/handlers/sprints.ts +17 -17
  82. package/src/handlers/tasks.test.ts +77 -15
  83. package/src/handlers/tasks.ts +90 -21
  84. package/src/handlers/tool-categories.test.ts +66 -0
  85. package/src/handlers/types.ts +81 -2
  86. package/src/handlers/validation.test.ts +78 -45
  87. package/src/handlers/validation.ts +3 -3
  88. package/src/index.ts +12 -2732
  89. package/src/token-tracking.test.ts +453 -0
  90. package/src/token-tracking.ts +164 -0
  91. package/src/tools.ts +298 -9
  92. package/src/utils.test.ts +2 -2
  93. package/src/utils.ts +17 -0
package/dist/index.js CHANGED
@@ -7,6 +7,8 @@ import { initApiClient, getApiClient } from './api-client.js';
7
7
  import { ValidationError, } from './validators.js';
8
8
  import { RateLimiter, } from './utils.js';
9
9
  import { buildHandlerRegistry } from './handlers/index.js';
10
+ import { tools } from './tools.js';
11
+ import { createTokenUsage, trackTokenUsage as trackTokens, } from './token-tracking.js';
10
12
  // ============================================================================
11
13
  // Agent Instance Tracking
12
14
  // ============================================================================
@@ -18,38 +20,11 @@ let currentSessionId = null;
18
20
  let currentPersona = null;
19
21
  // Current role for this agent instance
20
22
  let currentRole = null;
21
- let sessionTokenUsage = {
22
- callCount: 0,
23
- totalTokens: 0,
24
- byTool: {},
25
- byModel: {},
26
- currentModel: null,
27
- };
28
- // Estimate tokens from JSON (rough: ~4 chars per token)
29
- function estimateTokens(obj) {
30
- return Math.ceil(JSON.stringify(obj).length / 4);
31
- }
32
- // Track token usage for a tool call (input = args, output = response)
23
+ // Token usage tracking for this session (using token-tracking module)
24
+ let sessionTokenUsage = createTokenUsage();
25
+ // Wrapper function to track token usage with the session's usage object
33
26
  function trackTokenUsage(toolName, args, response) {
34
- const inputTokens = estimateTokens(args);
35
- const outputTokens = estimateTokens(response);
36
- const totalTokens = inputTokens + outputTokens;
37
- sessionTokenUsage.callCount++;
38
- sessionTokenUsage.totalTokens += totalTokens;
39
- if (!sessionTokenUsage.byTool[toolName]) {
40
- sessionTokenUsage.byTool[toolName] = { calls: 0, tokens: 0 };
41
- }
42
- sessionTokenUsage.byTool[toolName].calls++;
43
- sessionTokenUsage.byTool[toolName].tokens += totalTokens;
44
- // Track by model if a model is set
45
- const model = sessionTokenUsage.currentModel;
46
- if (model) {
47
- if (!sessionTokenUsage.byModel[model]) {
48
- sessionTokenUsage.byModel[model] = { input: 0, output: 0 };
49
- }
50
- sessionTokenUsage.byModel[model].input += inputTokens;
51
- sessionTokenUsage.byModel[model].output += outputTokens;
52
- }
27
+ trackTokens(sessionTokenUsage, toolName, args, response);
53
28
  }
54
29
  // Global rate limiter instance (60 requests per minute per API key)
55
30
  const rateLimiter = new RateLimiter(60, 60000);
@@ -175,2691 +150,7 @@ async function validateApiKey() {
175
150
  scope: 'personal', // API handles authorization, scope not needed locally
176
151
  };
177
152
  }
178
- // ============================================================================
179
- // Tool Definitions
180
- // ============================================================================
181
- const tools = [
182
- {
183
- name: 'start_work_session',
184
- description: `CALL THIS FIRST when beginning work on a project.
185
- Returns session info, persona, and next task. Use mode:'full' for complete context.`,
186
- inputSchema: {
187
- type: 'object',
188
- properties: {
189
- project_id: {
190
- type: 'string',
191
- description: 'Project UUID',
192
- },
193
- git_url: {
194
- type: 'string',
195
- description: 'Git repository URL. Used to find project if project_id not provided.',
196
- },
197
- mode: {
198
- type: 'string',
199
- enum: ['lite', 'full'],
200
- description: 'Response mode: lite (default, minimal tokens) or full (complete context)',
201
- },
202
- model: {
203
- type: 'string',
204
- enum: ['opus', 'sonnet', 'haiku'],
205
- description: 'Claude model being used (for accurate cost tracking). E.g., "opus", "sonnet", "haiku".',
206
- },
207
- },
208
- },
209
- },
210
- {
211
- name: 'get_help',
212
- description: 'Get guidance on a specific topic. Use when unsure about workflows.',
213
- inputSchema: {
214
- type: 'object',
215
- properties: {
216
- topic: {
217
- type: 'string',
218
- enum: ['getting_started', 'tasks', 'validation', 'deployment', 'git', 'blockers', 'milestones', 'fallback', 'session', 'tokens', 'sprints', 'topics'],
219
- description: 'Help topic. Use "topics" to list all available.',
220
- },
221
- },
222
- required: ['topic'],
223
- },
224
- },
225
- {
226
- name: 'get_token_usage',
227
- description: 'Get token usage stats for this session. Monitor efficiency.',
228
- inputSchema: {
229
- type: 'object',
230
- properties: {},
231
- },
232
- },
233
- // Cost monitoring tools
234
- {
235
- name: 'get_cost_summary',
236
- description: 'Get cost summary (daily/weekly/monthly) for a project.',
237
- inputSchema: {
238
- type: 'object',
239
- properties: {
240
- project_id: {
241
- type: 'string',
242
- description: 'Project UUID',
243
- },
244
- period: {
245
- type: 'string',
246
- enum: ['daily', 'weekly', 'monthly'],
247
- description: 'Summary period (default: daily)',
248
- },
249
- limit: {
250
- type: 'number',
251
- description: 'Max records to return (default: 30)',
252
- },
253
- },
254
- required: ['project_id'],
255
- },
256
- },
257
- {
258
- name: 'get_cost_alerts',
259
- description: 'Get cost alerts for the current user.',
260
- inputSchema: {
261
- type: 'object',
262
- properties: {
263
- project_id: {
264
- type: 'string',
265
- description: 'Filter by project (optional)',
266
- },
267
- },
268
- },
269
- },
270
- {
271
- name: 'add_cost_alert',
272
- description: 'Add a cost alert threshold.',
273
- inputSchema: {
274
- type: 'object',
275
- properties: {
276
- project_id: {
277
- type: 'string',
278
- description: 'Project UUID (null for all projects)',
279
- },
280
- threshold_amount: {
281
- type: 'number',
282
- description: 'Amount in USD that triggers the alert',
283
- },
284
- threshold_period: {
285
- type: 'string',
286
- enum: ['daily', 'weekly', 'monthly'],
287
- description: 'Period for the threshold',
288
- },
289
- alert_type: {
290
- type: 'string',
291
- enum: ['warning', 'critical'],
292
- description: 'Alert severity (default: warning)',
293
- },
294
- },
295
- required: ['threshold_amount', 'threshold_period'],
296
- },
297
- },
298
- {
299
- name: 'update_cost_alert',
300
- description: 'Update a cost alert.',
301
- inputSchema: {
302
- type: 'object',
303
- properties: {
304
- alert_id: {
305
- type: 'string',
306
- description: 'Alert UUID',
307
- },
308
- threshold_amount: {
309
- type: 'number',
310
- description: 'New threshold amount in USD',
311
- },
312
- threshold_period: {
313
- type: 'string',
314
- enum: ['daily', 'weekly', 'monthly'],
315
- description: 'New period',
316
- },
317
- alert_type: {
318
- type: 'string',
319
- enum: ['warning', 'critical'],
320
- description: 'New alert type',
321
- },
322
- enabled: {
323
- type: 'boolean',
324
- description: 'Enable or disable the alert',
325
- },
326
- },
327
- required: ['alert_id'],
328
- },
329
- },
330
- {
331
- name: 'delete_cost_alert',
332
- description: 'Delete a cost alert.',
333
- inputSchema: {
334
- type: 'object',
335
- properties: {
336
- alert_id: {
337
- type: 'string',
338
- description: 'Alert UUID to delete',
339
- },
340
- },
341
- required: ['alert_id'],
342
- },
343
- },
344
- {
345
- name: 'get_task_costs',
346
- description: 'Get cost breakdown by task for a project.',
347
- inputSchema: {
348
- type: 'object',
349
- properties: {
350
- project_id: {
351
- type: 'string',
352
- description: 'Project UUID',
353
- },
354
- limit: {
355
- type: 'number',
356
- description: 'Max tasks to return (default: 20)',
357
- },
358
- },
359
- required: ['project_id'],
360
- },
361
- },
362
- {
363
- name: 'discover_tools',
364
- description: 'List tools by category. Use get_tool_info for details.',
365
- inputSchema: {
366
- type: 'object',
367
- properties: {
368
- category: {
369
- type: 'string',
370
- enum: ['session', 'project', 'tasks', 'milestones', 'progress', 'blockers', 'decisions', 'ideas', 'findings', 'validation', 'deployment', 'fallback', 'requests', 'organizations', 'cost'],
371
- description: 'Category to list (omit for all categories)',
372
- },
373
- },
374
- },
375
- },
376
- {
377
- name: 'get_tool_info',
378
- description: 'Get detailed tool documentation.',
379
- inputSchema: {
380
- type: 'object',
381
- properties: {
382
- tool_name: {
383
- type: 'string',
384
- description: 'Tool name',
385
- },
386
- },
387
- required: ['tool_name'],
388
- },
389
- },
390
- {
391
- name: 'get_project_context',
392
- description: 'Get full project context: goals, instructions, tasks, blockers, decisions.',
393
- inputSchema: {
394
- type: 'object',
395
- properties: {
396
- project_id: {
397
- type: 'string',
398
- description: 'Project UUID. If not provided, will list all projects.',
399
- },
400
- git_url: {
401
- type: 'string',
402
- description: 'Git repository URL. Used to find project if project_id not provided.',
403
- },
404
- },
405
- },
406
- },
407
- {
408
- name: 'get_git_workflow',
409
- description: 'Get git workflow config and branching instructions for the project.',
410
- inputSchema: {
411
- type: 'object',
412
- properties: {
413
- project_id: {
414
- type: 'string',
415
- description: 'Project UUID',
416
- },
417
- task_id: {
418
- type: 'string',
419
- description: 'Optional task ID to include branch naming suggestion',
420
- },
421
- },
422
- required: ['project_id'],
423
- },
424
- },
425
- {
426
- name: 'create_project',
427
- description: 'Create a new project to track in Vibescope.',
428
- inputSchema: {
429
- type: 'object',
430
- properties: {
431
- name: {
432
- type: 'string',
433
- description: 'Project display name',
434
- },
435
- description: {
436
- type: 'string',
437
- description: 'Brief project description',
438
- },
439
- goal: {
440
- type: 'string',
441
- description: 'What does "done" look like for this project?',
442
- },
443
- git_url: {
444
- type: 'string',
445
- description: 'Git repository URL (if available)',
446
- },
447
- tech_stack: {
448
- type: 'array',
449
- items: { type: 'string' },
450
- description: 'Technologies used (e.g., ["TypeScript", "React", "PostgreSQL"])',
451
- },
452
- },
453
- required: ['name'],
454
- },
455
- },
456
- {
457
- name: 'update_project',
458
- description: 'Update project details (name, description, goal, settings).',
459
- inputSchema: {
460
- type: 'object',
461
- properties: {
462
- project_id: {
463
- type: 'string',
464
- description: 'Project UUID',
465
- },
466
- name: { type: 'string' },
467
- description: { type: 'string' },
468
- goal: { type: 'string' },
469
- git_url: { type: 'string' },
470
- tech_stack: {
471
- type: 'array',
472
- items: { type: 'string' },
473
- },
474
- status: {
475
- type: 'string',
476
- enum: ['active', 'paused', 'completed', 'archived'],
477
- },
478
- git_workflow: {
479
- type: 'string',
480
- enum: ['none', 'trunk-based', 'github-flow', 'git-flow'],
481
- description: 'Git workflow: none (no branching), trunk-based (commit to main), github-flow (feature branches + PR), git-flow (develop/release branches)',
482
- },
483
- git_main_branch: {
484
- type: 'string',
485
- description: 'Main branch name (default: main)',
486
- },
487
- git_develop_branch: {
488
- type: 'string',
489
- description: 'Development branch name (used with git-flow)',
490
- },
491
- git_auto_branch: {
492
- type: 'boolean',
493
- description: 'Automatically create feature branches for new tasks',
494
- },
495
- git_auto_tag: {
496
- type: 'boolean',
497
- description: 'Automatically tag deployments on main branch',
498
- },
499
- deployment_instructions: {
500
- type: 'string',
501
- description: 'Instructions for how to deploy (e.g., "Push to main for Vercel auto-deploy", "Run fly deploy")',
502
- },
503
- },
504
- required: ['project_id'],
505
- },
506
- },
507
- {
508
- name: 'update_project_readme',
509
- description: 'Sync README content to the dashboard.',
510
- inputSchema: {
511
- type: 'object',
512
- properties: {
513
- project_id: {
514
- type: 'string',
515
- description: 'Project UUID',
516
- },
517
- readme_content: {
518
- type: 'string',
519
- description: 'README content in markdown format',
520
- },
521
- },
522
- required: ['project_id', 'readme_content'],
523
- },
524
- },
525
- {
526
- name: 'get_tasks',
527
- description: 'Get tasks for a project, optionally filtered by status. By default returns only root tasks (not subtasks).',
528
- inputSchema: {
529
- type: 'object',
530
- properties: {
531
- project_id: {
532
- type: 'string',
533
- description: 'Project UUID',
534
- },
535
- status: {
536
- type: 'string',
537
- enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'],
538
- description: 'Filter by status (optional)',
539
- },
540
- limit: {
541
- type: 'number',
542
- description: 'Max number of tasks to return (default 50)',
543
- },
544
- offset: {
545
- type: 'number',
546
- description: 'Number of tasks to skip for pagination (default 0)',
547
- },
548
- search_query: {
549
- type: 'string',
550
- description: 'Search tasks by title',
551
- },
552
- include_subtasks: {
553
- type: 'boolean',
554
- description: 'Include subtasks in results (default false). Use get_subtasks for subtasks of a specific task.',
555
- },
556
- },
557
- required: ['project_id'],
558
- },
559
- },
560
- {
561
- name: 'get_next_task',
562
- description: 'Get highest priority pending task. Skips claimed tasks. Check deployment_blocks_tasks first.',
563
- inputSchema: {
564
- type: 'object',
565
- properties: {
566
- project_id: {
567
- type: 'string',
568
- description: 'Project UUID',
569
- },
570
- },
571
- required: ['project_id'],
572
- },
573
- },
574
- {
575
- name: 'add_task',
576
- description: 'Add a new task. Priority 1=highest, 5=lowest. Include estimated_minutes. Use blocking=true for deployment finalization tasks that must complete before other work.',
577
- inputSchema: {
578
- type: 'object',
579
- properties: {
580
- project_id: {
581
- type: 'string',
582
- description: 'Project UUID',
583
- },
584
- title: {
585
- type: 'string',
586
- description: 'Task title',
587
- },
588
- description: {
589
- type: 'string',
590
- description: 'Detailed description',
591
- },
592
- priority: {
593
- type: 'number',
594
- minimum: 1,
595
- maximum: 5,
596
- description: 'Priority 1-5 (1 = highest)',
597
- },
598
- estimated_minutes: {
599
- type: 'number',
600
- minimum: 1,
601
- description: 'Estimated time to complete in minutes',
602
- },
603
- blocking: {
604
- type: 'boolean',
605
- description: 'When true, this task blocks all other work until complete (used for deployment finalization)',
606
- },
607
- task_type: {
608
- type: 'string',
609
- enum: ['frontend', 'backend', 'database', 'feature', 'bugfix', 'design', 'mcp', 'testing', 'docs', 'infra', 'other'],
610
- description: 'Task category (frontend, backend, database, feature, bugfix, design, mcp, testing, docs, infra, other)',
611
- },
612
- },
613
- required: ['project_id', 'title'],
614
- },
615
- },
616
- {
617
- name: 'update_task',
618
- description: 'Update task status, progress, or details. Include progress_note with progress_percentage.',
619
- inputSchema: {
620
- type: 'object',
621
- properties: {
622
- task_id: {
623
- type: 'string',
624
- description: 'Task UUID',
625
- },
626
- title: { type: 'string' },
627
- description: { type: 'string' },
628
- priority: {
629
- type: 'number',
630
- minimum: 1,
631
- maximum: 5,
632
- },
633
- status: {
634
- type: 'string',
635
- enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'],
636
- },
637
- progress_percentage: {
638
- type: 'number',
639
- minimum: 0,
640
- maximum: 100,
641
- description: '0-100 completion percentage',
642
- },
643
- progress_note: {
644
- type: 'string',
645
- description: 'Brief note (auto-logged)',
646
- },
647
- estimated_minutes: {
648
- type: 'number',
649
- minimum: 1,
650
- description: 'Revised time estimate',
651
- },
652
- git_branch: {
653
- type: 'string',
654
- description: 'Git branch associated with this task',
655
- },
656
- task_type: {
657
- type: 'string',
658
- enum: ['frontend', 'backend', 'database', 'feature', 'bugfix', 'design', 'mcp', 'testing', 'docs', 'infra', 'other'],
659
- description: 'Task category (frontend, backend, database, feature, bugfix, design, mcp, testing, docs, infra, other)',
660
- },
661
- },
662
- required: ['task_id'],
663
- },
664
- },
665
- {
666
- name: 'complete_task',
667
- description: 'Mark task done. Returns next_task and context counts (validation, blockers, deployment).',
668
- inputSchema: {
669
- type: 'object',
670
- properties: {
671
- task_id: {
672
- type: 'string',
673
- description: 'Task UUID',
674
- },
675
- summary: {
676
- type: 'string',
677
- description: 'Brief summary of what was done',
678
- },
679
- },
680
- required: ['task_id'],
681
- },
682
- },
683
- {
684
- name: 'log_progress',
685
- description: `Log progress update. Record significant milestones or observations.`,
686
- inputSchema: {
687
- type: 'object',
688
- properties: {
689
- project_id: {
690
- type: 'string',
691
- description: 'Project UUID',
692
- },
693
- task_id: {
694
- type: 'string',
695
- description: 'Task UUID (optional, links progress to specific task)',
696
- },
697
- summary: {
698
- type: 'string',
699
- description: 'Brief summary of progress',
700
- },
701
- details: {
702
- type: 'string',
703
- description: 'Detailed notes (optional)',
704
- },
705
- },
706
- required: ['project_id', 'summary'],
707
- },
708
- },
709
- {
710
- name: 'add_blocker',
711
- description: `Record a blocker preventing progress.`,
712
- inputSchema: {
713
- type: 'object',
714
- properties: {
715
- project_id: {
716
- type: 'string',
717
- description: 'Project UUID',
718
- },
719
- description: {
720
- type: 'string',
721
- description: 'What is blocking progress?',
722
- },
723
- },
724
- required: ['project_id', 'description'],
725
- },
726
- },
727
- {
728
- name: 'resolve_blocker',
729
- description: `Mark a blocker as resolved.`,
730
- inputSchema: {
731
- type: 'object',
732
- properties: {
733
- blocker_id: {
734
- type: 'string',
735
- description: 'Blocker UUID',
736
- },
737
- resolution_note: {
738
- type: 'string',
739
- description: 'How was it resolved?',
740
- },
741
- },
742
- required: ['blocker_id'],
743
- },
744
- },
745
- {
746
- name: 'get_blockers',
747
- description: `Get blockers for a project, optionally filtered by status.`,
748
- inputSchema: {
749
- type: 'object',
750
- properties: {
751
- project_id: {
752
- type: 'string',
753
- description: 'Project UUID',
754
- },
755
- status: {
756
- type: 'string',
757
- enum: ['open', 'resolved'],
758
- description: 'Filter by status (default: open)',
759
- },
760
- limit: {
761
- type: 'number',
762
- description: 'Max number of blockers to return (default 50, max 200)',
763
- },
764
- offset: {
765
- type: 'number',
766
- description: 'Number of blockers to skip for pagination (default 0)',
767
- },
768
- search_query: {
769
- type: 'string',
770
- description: 'Search blockers by description',
771
- },
772
- },
773
- required: ['project_id'],
774
- },
775
- },
776
- {
777
- name: 'log_decision',
778
- description: `Record an architectural or technical decision with rationale.`,
779
- inputSchema: {
780
- type: 'object',
781
- properties: {
782
- project_id: {
783
- type: 'string',
784
- description: 'Project UUID',
785
- },
786
- title: {
787
- type: 'string',
788
- description: 'Decision title (e.g., "Use PostgreSQL for database")',
789
- },
790
- description: {
791
- type: 'string',
792
- description: 'What was decided',
793
- },
794
- rationale: {
795
- type: 'string',
796
- description: 'Why this decision was made',
797
- },
798
- alternatives_considered: {
799
- type: 'array',
800
- items: { type: 'string' },
801
- description: 'Other options that were considered',
802
- },
803
- },
804
- required: ['project_id', 'title', 'description'],
805
- },
806
- },
807
- {
808
- name: 'get_decisions',
809
- description: `Get recorded decisions for a project.`,
810
- inputSchema: {
811
- type: 'object',
812
- properties: {
813
- project_id: {
814
- type: 'string',
815
- description: 'Project UUID',
816
- },
817
- limit: {
818
- type: 'number',
819
- description: 'Max number of decisions to return (default 50, max 200)',
820
- },
821
- offset: {
822
- type: 'number',
823
- description: 'Number of decisions to skip for pagination (default 0)',
824
- },
825
- search_query: {
826
- type: 'string',
827
- description: 'Search decisions by title or description',
828
- },
829
- },
830
- required: ['project_id'],
831
- },
832
- },
833
- {
834
- name: 'add_idea',
835
- description: `Record an idea for improvements or features. Starts as 'raw', can progress to 'shipped'.`,
836
- inputSchema: {
837
- type: 'object',
838
- properties: {
839
- project_id: {
840
- type: 'string',
841
- description: 'Project UUID',
842
- },
843
- title: {
844
- type: 'string',
845
- description: 'Idea title',
846
- },
847
- description: {
848
- type: 'string',
849
- description: 'Detailed description',
850
- },
851
- status: {
852
- type: 'string',
853
- enum: ['raw', 'exploring', 'planned', 'in_development', 'shipped'],
854
- description: 'Development stage (default: raw)',
855
- },
856
- },
857
- required: ['project_id', 'title'],
858
- },
859
- },
860
- {
861
- name: 'update_idea',
862
- description: `Update an idea's status or details.`,
863
- inputSchema: {
864
- type: 'object',
865
- properties: {
866
- idea_id: {
867
- type: 'string',
868
- description: 'Idea UUID',
869
- },
870
- title: {
871
- type: 'string',
872
- description: 'Updated title',
873
- },
874
- description: {
875
- type: 'string',
876
- description: 'Updated description',
877
- },
878
- status: {
879
- type: 'string',
880
- enum: ['raw', 'exploring', 'planned', 'in_development', 'shipped'],
881
- description: 'New development stage',
882
- },
883
- doc_url: {
884
- type: 'string',
885
- description: 'URL to feature documentation/specification',
886
- },
887
- },
888
- required: ['idea_id'],
889
- },
890
- },
891
- {
892
- name: 'get_ideas',
893
- description: `Get recorded ideas for a project, optionally filtered by status.`,
894
- inputSchema: {
895
- type: 'object',
896
- properties: {
897
- project_id: {
898
- type: 'string',
899
- description: 'Project UUID',
900
- },
901
- status: {
902
- type: 'string',
903
- enum: ['raw', 'exploring', 'planned', 'in_development', 'shipped'],
904
- description: 'Filter by status (optional)',
905
- },
906
- limit: {
907
- type: 'number',
908
- description: 'Max number of ideas to return (default 50, max 100)',
909
- },
910
- offset: {
911
- type: 'number',
912
- description: 'Number of ideas to skip for pagination (default 0)',
913
- },
914
- search_query: {
915
- type: 'string',
916
- description: 'Search ideas by title or description',
917
- },
918
- },
919
- required: ['project_id'],
920
- },
921
- },
922
- {
923
- name: 'delete_task',
924
- description: `Delete a task.`,
925
- inputSchema: {
926
- type: 'object',
927
- properties: {
928
- task_id: {
929
- type: 'string',
930
- description: 'Task UUID',
931
- },
932
- },
933
- required: ['task_id'],
934
- },
935
- },
936
- {
937
- name: 'add_task_reference',
938
- description: 'Add a reference URL to a task (docs, PRs, issues).',
939
- inputSchema: {
940
- type: 'object',
941
- properties: {
942
- task_id: {
943
- type: 'string',
944
- description: 'Task UUID',
945
- },
946
- url: {
947
- type: 'string',
948
- description: 'URL to add as reference',
949
- },
950
- label: {
951
- type: 'string',
952
- description: 'Optional label/title for the reference',
953
- },
954
- },
955
- required: ['task_id', 'url'],
956
- },
957
- },
958
- {
959
- name: 'remove_task_reference',
960
- description: `Remove a reference link from a task by URL.`,
961
- inputSchema: {
962
- type: 'object',
963
- properties: {
964
- task_id: {
965
- type: 'string',
966
- description: 'Task UUID',
967
- },
968
- url: {
969
- type: 'string',
970
- description: 'URL of the reference to remove',
971
- },
972
- },
973
- required: ['task_id', 'url'],
974
- },
975
- },
976
- {
977
- name: 'delete_idea',
978
- description: `Delete an idea.`,
979
- inputSchema: {
980
- type: 'object',
981
- properties: {
982
- idea_id: {
983
- type: 'string',
984
- description: 'Idea UUID',
985
- },
986
- },
987
- required: ['idea_id'],
988
- },
989
- },
990
- {
991
- name: 'convert_idea_to_task',
992
- description: `Convert an idea to a task. Creates a task from the idea's title and description, links them, and optionally updates the idea status to 'in_development'. Useful for planned ideas that are ready for implementation.`,
993
- inputSchema: {
994
- type: 'object',
995
- properties: {
996
- idea_id: {
997
- type: 'string',
998
- description: 'Idea UUID to convert',
999
- },
1000
- priority: {
1001
- type: 'number',
1002
- minimum: 1,
1003
- maximum: 5,
1004
- description: 'Task priority 1-5 (default: 3, 1 = highest)',
1005
- },
1006
- estimated_minutes: {
1007
- type: 'number',
1008
- minimum: 1,
1009
- description: 'Estimated time to complete in minutes',
1010
- },
1011
- update_status: {
1012
- type: 'boolean',
1013
- description: "Update idea status to 'in_development' (default: true)",
1014
- },
1015
- },
1016
- required: ['idea_id'],
1017
- },
1018
- },
1019
- // Findings (knowledge base)
1020
- {
1021
- name: 'add_finding',
1022
- description: 'Record a finding from an audit/review (performance, security, code quality, etc).',
1023
- inputSchema: {
1024
- type: 'object',
1025
- properties: {
1026
- project_id: { type: 'string', description: 'Project UUID' },
1027
- category: { type: 'string', enum: ['performance', 'security', 'code_quality', 'accessibility', 'documentation', 'architecture', 'testing', 'other'], description: 'Category of the finding (default: other)' },
1028
- title: { type: 'string', description: 'Brief title describing the finding' },
1029
- description: { type: 'string', description: 'Detailed description of the finding, including impact and suggested fix' },
1030
- severity: { type: 'string', enum: ['info', 'low', 'medium', 'high', 'critical'], description: 'Severity level (default: info)' },
1031
- file_path: { type: 'string', description: 'File path where the issue was found (optional)' },
1032
- line_number: { type: 'number', description: 'Line number in the file (optional)' },
1033
- related_task_id: { type: 'string', description: 'ID of related task if this finding came from a task (optional)' },
1034
- },
1035
- required: ['project_id', 'title'],
1036
- },
1037
- },
1038
- {
1039
- name: 'get_findings',
1040
- description: `Get findings for a project, optionally filtered by category, severity, or status.`,
1041
- inputSchema: {
1042
- type: 'object',
1043
- properties: {
1044
- project_id: { type: 'string', description: 'Project UUID' },
1045
- category: { type: 'string', enum: ['performance', 'security', 'code_quality', 'accessibility', 'documentation', 'architecture', 'testing', 'other'], description: 'Filter by category (optional)' },
1046
- severity: { type: 'string', enum: ['info', 'low', 'medium', 'high', 'critical'], description: 'Filter by severity (optional)' },
1047
- status: { type: 'string', enum: ['open', 'addressed', 'dismissed', 'wontfix'], description: 'Filter by status (default: all)' },
1048
- limit: { type: 'number', description: 'Max number of findings to return (default 50, max 200)' },
1049
- offset: { type: 'number', description: 'Number of findings to skip for pagination (default 0)' },
1050
- search_query: { type: 'string', description: 'Search findings by title or description' },
1051
- },
1052
- required: ['project_id'],
1053
- },
1054
- },
1055
- {
1056
- name: 'update_finding',
1057
- description: `Update a finding's status or details. Use to mark findings as addressed or dismissed.`,
1058
- inputSchema: {
1059
- type: 'object',
1060
- properties: {
1061
- finding_id: { type: 'string', description: 'Finding UUID' },
1062
- status: { type: 'string', enum: ['open', 'addressed', 'dismissed', 'wontfix'], description: 'New status' },
1063
- resolution_note: { type: 'string', description: 'Note explaining how the finding was addressed or why it was dismissed' },
1064
- title: { type: 'string', description: 'Updated title' },
1065
- description: { type: 'string', description: 'Updated description' },
1066
- severity: { type: 'string', enum: ['info', 'low', 'medium', 'high', 'critical'], description: 'Updated severity' },
1067
- },
1068
- required: ['finding_id'],
1069
- },
1070
- },
1071
- {
1072
- name: 'delete_finding',
1073
- description: `Delete a finding.`,
1074
- inputSchema: {
1075
- type: 'object',
1076
- properties: {
1077
- finding_id: { type: 'string', description: 'Finding UUID' },
1078
- },
1079
- required: ['finding_id'],
1080
- },
1081
- },
1082
- {
1083
- name: 'delete_blocker',
1084
- description: `Delete a blocker.`,
1085
- inputSchema: {
1086
- type: 'object',
1087
- properties: {
1088
- blocker_id: {
1089
- type: 'string',
1090
- description: 'Blocker UUID',
1091
- },
1092
- },
1093
- required: ['blocker_id'],
1094
- },
1095
- },
1096
- // Git Issues tools
1097
- {
1098
- name: 'add_git_issue',
1099
- description: `Record a git-related issue (merge conflict, push failure, etc.). Auto-created by claim_validation when conflicts detected.`,
1100
- inputSchema: {
1101
- type: 'object',
1102
- properties: {
1103
- project_id: {
1104
- type: 'string',
1105
- description: 'Project UUID',
1106
- },
1107
- issue_type: {
1108
- type: 'string',
1109
- enum: ['merge_conflict', 'push_failed', 'rebase_needed', 'branch_diverged', 'pr_not_mergeable'],
1110
- description: 'Type of git issue',
1111
- },
1112
- branch: {
1113
- type: 'string',
1114
- description: 'Branch where the issue occurred',
1115
- },
1116
- target_branch: {
1117
- type: 'string',
1118
- description: 'Target branch for merge/rebase (optional)',
1119
- },
1120
- pr_url: {
1121
- type: 'string',
1122
- description: 'Pull request URL if applicable (optional)',
1123
- },
1124
- conflicting_files: {
1125
- type: 'array',
1126
- items: { type: 'string' },
1127
- description: 'List of files with conflicts (optional)',
1128
- },
1129
- error_message: {
1130
- type: 'string',
1131
- description: 'Error message from git operation (optional)',
1132
- },
1133
- task_id: {
1134
- type: 'string',
1135
- description: 'Related task UUID (optional)',
1136
- },
1137
- },
1138
- required: ['project_id', 'issue_type', 'branch'],
1139
- },
1140
- },
1141
- {
1142
- name: 'resolve_git_issue',
1143
- description: `Mark a git issue as resolved.`,
1144
- inputSchema: {
1145
- type: 'object',
1146
- properties: {
1147
- git_issue_id: {
1148
- type: 'string',
1149
- description: 'Git issue UUID',
1150
- },
1151
- resolution_note: {
1152
- type: 'string',
1153
- description: 'How the issue was resolved (optional)',
1154
- },
1155
- auto_resolved: {
1156
- type: 'boolean',
1157
- description: 'Whether this was auto-resolved (e.g., PR became mergeable)',
1158
- },
1159
- },
1160
- required: ['git_issue_id'],
1161
- },
1162
- },
1163
- {
1164
- name: 'get_git_issues',
1165
- description: `Get git issues for a project, optionally filtered by status, type, or branch.`,
1166
- inputSchema: {
1167
- type: 'object',
1168
- properties: {
1169
- project_id: {
1170
- type: 'string',
1171
- description: 'Project UUID',
1172
- },
1173
- status: {
1174
- type: 'string',
1175
- enum: ['open', 'resolved'],
1176
- description: 'Filter by status (default: open)',
1177
- },
1178
- issue_type: {
1179
- type: 'string',
1180
- enum: ['merge_conflict', 'push_failed', 'rebase_needed', 'branch_diverged', 'pr_not_mergeable'],
1181
- description: 'Filter by issue type (optional)',
1182
- },
1183
- branch: {
1184
- type: 'string',
1185
- description: 'Filter by branch (optional)',
1186
- },
1187
- limit: {
1188
- type: 'number',
1189
- description: 'Max issues to return (default: 50)',
1190
- },
1191
- },
1192
- required: ['project_id'],
1193
- },
1194
- },
1195
- {
1196
- name: 'delete_git_issue',
1197
- description: `Delete a git issue.`,
1198
- inputSchema: {
1199
- type: 'object',
1200
- properties: {
1201
- git_issue_id: {
1202
- type: 'string',
1203
- description: 'Git issue UUID',
1204
- },
1205
- },
1206
- required: ['git_issue_id'],
1207
- },
1208
- },
1209
- {
1210
- name: 'delete_decision',
1211
- description: `Delete a decision.`,
1212
- inputSchema: {
1213
- type: 'object',
1214
- properties: {
1215
- decision_id: {
1216
- type: 'string',
1217
- description: 'Decision UUID',
1218
- },
1219
- },
1220
- required: ['decision_id'],
1221
- },
1222
- },
1223
- {
1224
- name: 'get_activity_feed',
1225
- description: `Get combined activity feed (tasks, progress, blockers, decisions) in chronological order.`,
1226
- inputSchema: {
1227
- type: 'object',
1228
- properties: {
1229
- project_id: {
1230
- type: 'string',
1231
- description: 'Project UUID',
1232
- },
1233
- types: {
1234
- type: 'array',
1235
- items: {
1236
- type: 'string',
1237
- enum: ['task', 'progress', 'blocker', 'decision'],
1238
- },
1239
- description: 'Filter by activity types (default: all)',
1240
- },
1241
- created_by: {
1242
- type: 'string',
1243
- enum: ['agent', 'user'],
1244
- description: 'Filter by creator (default: all)',
1245
- },
1246
- since: {
1247
- type: 'string',
1248
- description: 'ISO date string - only return activity after this time',
1249
- },
1250
- limit: {
1251
- type: 'number',
1252
- description: 'Max number of items to return (default 50, max 200)',
1253
- },
1254
- },
1255
- required: ['project_id'],
1256
- },
1257
- },
1258
- {
1259
- name: 'batch_update_tasks',
1260
- description: 'Update multiple tasks at once. Include progress_note with progress_percentage.',
1261
- inputSchema: {
1262
- type: 'object',
1263
- properties: {
1264
- updates: {
1265
- type: 'array',
1266
- description: 'Array of task updates to apply',
1267
- items: {
1268
- type: 'object',
1269
- properties: {
1270
- task_id: { type: 'string', description: 'Task UUID' },
1271
- status: { type: 'string', enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'] },
1272
- progress_percentage: { type: 'number', minimum: 0, maximum: 100 },
1273
- progress_note: { type: 'string', description: 'Brief note about what was achieved' },
1274
- priority: { type: 'number', minimum: 1, maximum: 5 },
1275
- },
1276
- required: ['task_id'],
1277
- },
1278
- },
1279
- },
1280
- required: ['updates'],
1281
- },
1282
- },
1283
- {
1284
- name: 'batch_complete_tasks',
1285
- description: `Mark multiple tasks as completed at once.`,
1286
- inputSchema: {
1287
- type: 'object',
1288
- properties: {
1289
- completions: {
1290
- type: 'array',
1291
- description: 'Array of task completions',
1292
- items: {
1293
- type: 'object',
1294
- properties: {
1295
- task_id: { type: 'string', description: 'Task UUID' },
1296
- summary: { type: 'string', description: 'Optional completion summary' },
1297
- },
1298
- required: ['task_id'],
1299
- },
1300
- },
1301
- },
1302
- required: ['completions'],
1303
- },
1304
- },
1305
- // =========================================================================
1306
- // Subtask Tools
1307
- // =========================================================================
1308
- {
1309
- name: 'add_subtask',
1310
- description: `Add a subtask to break down a larger task into smaller workable pieces.
1311
- Subtasks can be claimed and worked on independently by any agent.
1312
- Subtasks inherit the project from their parent task.
1313
- Max depth is 1 (subtasks cannot have their own subtasks).`,
1314
- inputSchema: {
1315
- type: 'object',
1316
- properties: {
1317
- parent_task_id: {
1318
- type: 'string',
1319
- description: 'UUID of the parent task to add subtask to',
1320
- },
1321
- title: {
1322
- type: 'string',
1323
- description: 'Subtask title',
1324
- },
1325
- description: {
1326
- type: 'string',
1327
- description: 'Detailed description (optional)',
1328
- },
1329
- priority: {
1330
- type: 'number',
1331
- minimum: 1,
1332
- maximum: 5,
1333
- description: 'Priority 1-5 (1 = highest). Defaults to parent task priority.',
1334
- },
1335
- estimated_minutes: {
1336
- type: 'number',
1337
- minimum: 1,
1338
- description: 'Estimated time to complete in minutes',
1339
- },
1340
- },
1341
- required: ['parent_task_id', 'title'],
1342
- },
1343
- },
1344
- {
1345
- name: 'get_subtasks',
1346
- description: `Get subtasks for a parent task.
1347
- Returns subtasks with aggregate completion stats.`,
1348
- inputSchema: {
1349
- type: 'object',
1350
- properties: {
1351
- parent_task_id: {
1352
- type: 'string',
1353
- description: 'UUID of the parent task',
1354
- },
1355
- status: {
1356
- type: 'string',
1357
- enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'],
1358
- description: 'Filter by status (optional)',
1359
- },
1360
- },
1361
- required: ['parent_task_id'],
1362
- },
1363
- },
1364
- {
1365
- name: 'heartbeat',
1366
- description: `Send heartbeat to maintain 'active' status. Call every 30-60 seconds.`,
1367
- inputSchema: {
1368
- type: 'object',
1369
- properties: {
1370
- session_id: {
1371
- type: 'string',
1372
- description: 'Session ID from start_work_session (optional, uses current session if not provided)',
1373
- },
1374
- current_worktree_path: {
1375
- type: ['string', 'null'],
1376
- description: 'Report your current git worktree path (e.g., "../project-task-abc123"). Set to null to clear.',
1377
- },
1378
- },
1379
- },
1380
- },
1381
- {
1382
- name: 'end_work_session',
1383
- description: `End session and release claimed tasks. Returns session summary.`,
1384
- inputSchema: {
1385
- type: 'object',
1386
- properties: {
1387
- session_id: {
1388
- type: 'string',
1389
- description: 'Session ID to end (optional, uses current session if not provided)',
1390
- },
1391
- },
1392
- },
1393
- },
1394
- // =========================================================================
1395
- // Task Validation Tools
1396
- // =========================================================================
1397
- {
1398
- name: 'get_tasks_awaiting_validation',
1399
- description: `Get completed tasks not yet validated.`,
1400
- inputSchema: {
1401
- type: 'object',
1402
- properties: {
1403
- project_id: {
1404
- type: 'string',
1405
- description: 'Project UUID',
1406
- },
1407
- },
1408
- required: ['project_id'],
1409
- },
1410
- },
1411
- {
1412
- name: 'claim_validation',
1413
- description: 'Claim a completed task for review. Shows "being reviewed" on dashboard.',
1414
- inputSchema: {
1415
- type: 'object',
1416
- properties: {
1417
- task_id: {
1418
- type: 'string',
1419
- description: 'Task UUID to claim for review',
1420
- },
1421
- },
1422
- required: ['task_id'],
1423
- },
1424
- },
1425
- {
1426
- name: 'validate_task',
1427
- description: 'Validate a completed task. Include test results in validation_notes. For github-flow/git-flow projects, a PR must exist before approval (add via add_task_reference).',
1428
- inputSchema: {
1429
- type: 'object',
1430
- properties: {
1431
- task_id: {
1432
- type: 'string',
1433
- description: 'Task UUID to validate',
1434
- },
1435
- validation_notes: {
1436
- type: 'string',
1437
- description: 'Notes about the validation (what was checked, any issues found)',
1438
- },
1439
- approved: {
1440
- type: 'boolean',
1441
- description: 'Whether the task passes validation (true = approved, false = needs more work)',
1442
- },
1443
- skip_pr_check: {
1444
- type: 'boolean',
1445
- description: 'Skip PR existence check (use only for tasks that legitimately do not need a PR)',
1446
- },
1447
- },
1448
- required: ['task_id', 'approved'],
1449
- },
1450
- },
1451
- // =========================================================================
1452
- // Deployment Coordination Tools
1453
- // =========================================================================
1454
- {
1455
- name: 'request_deployment',
1456
- description: 'Request a deployment. Requires validation first. One active deployment per project.',
1457
- inputSchema: {
1458
- type: 'object',
1459
- properties: {
1460
- project_id: {
1461
- type: 'string',
1462
- description: 'Project UUID',
1463
- },
1464
- environment: {
1465
- type: 'string',
1466
- enum: ['development', 'staging', 'production'],
1467
- description: 'Target environment (default: production)',
1468
- },
1469
- version_bump: {
1470
- type: 'string',
1471
- enum: ['patch', 'minor', 'major'],
1472
- description: 'Version bump: major/minor/patch (default: patch)',
1473
- },
1474
- notes: {
1475
- type: 'string',
1476
- description: 'Optional notes about this deployment',
1477
- },
1478
- git_ref: {
1479
- type: 'string',
1480
- description: 'Git branch or commit being deployed',
1481
- },
1482
- },
1483
- required: ['project_id'],
1484
- },
1485
- },
1486
- {
1487
- name: 'claim_deployment_validation',
1488
- description: `Claim pending deployment for validation. Run build+tests, then call report_validation.`,
1489
- inputSchema: {
1490
- type: 'object',
1491
- properties: {
1492
- project_id: {
1493
- type: 'string',
1494
- description: 'Project UUID',
1495
- },
1496
- },
1497
- required: ['project_id'],
1498
- },
1499
- },
1500
- {
1501
- name: 'report_validation',
1502
- description: `Report build/test results. If passed, status->'ready'. If failed, creates investigation task.`,
1503
- inputSchema: {
1504
- type: 'object',
1505
- properties: {
1506
- project_id: {
1507
- type: 'string',
1508
- description: 'Project UUID',
1509
- },
1510
- build_passed: {
1511
- type: 'boolean',
1512
- description: 'Whether the build succeeded',
1513
- },
1514
- tests_passed: {
1515
- type: 'boolean',
1516
- description: 'Whether the tests passed',
1517
- },
1518
- error_message: {
1519
- type: 'string',
1520
- description: 'Error details if validation failed',
1521
- },
1522
- },
1523
- required: ['project_id', 'build_passed', 'tests_passed'],
1524
- },
1525
- },
1526
- {
1527
- name: 'check_deployment_status',
1528
- description: `Get active deployment status and details.`,
1529
- inputSchema: {
1530
- type: 'object',
1531
- properties: {
1532
- project_id: {
1533
- type: 'string',
1534
- description: 'Project UUID',
1535
- },
1536
- },
1537
- required: ['project_id'],
1538
- },
1539
- },
1540
- {
1541
- name: 'start_deployment',
1542
- description: `Start deployment (requires 'ready' status). Sets status to 'deploying'.`,
1543
- inputSchema: {
1544
- type: 'object',
1545
- properties: {
1546
- project_id: {
1547
- type: 'string',
1548
- description: 'Project UUID',
1549
- },
1550
- },
1551
- required: ['project_id'],
1552
- },
1553
- },
1554
- {
1555
- name: 'complete_deployment',
1556
- description: `Mark deployment as complete (success or failure).`,
1557
- inputSchema: {
1558
- type: 'object',
1559
- properties: {
1560
- project_id: {
1561
- type: 'string',
1562
- description: 'Project UUID',
1563
- },
1564
- success: {
1565
- type: 'boolean',
1566
- description: 'Whether the deployment succeeded',
1567
- },
1568
- summary: {
1569
- type: 'string',
1570
- description: 'Summary of what was deployed or why it failed',
1571
- },
1572
- },
1573
- required: ['project_id', 'success'],
1574
- },
1575
- },
1576
- {
1577
- name: 'cancel_deployment',
1578
- description: `Cancel active deployment. Sets status to 'failed'.`,
1579
- inputSchema: {
1580
- type: 'object',
1581
- properties: {
1582
- project_id: {
1583
- type: 'string',
1584
- description: 'Project UUID',
1585
- },
1586
- reason: {
1587
- type: 'string',
1588
- description: 'Reason for cancellation',
1589
- },
1590
- },
1591
- required: ['project_id'],
1592
- },
1593
- },
1594
- {
1595
- name: 'add_deployment_requirement',
1596
- description: `Add a pre-deployment requirement (migration, env var, config change). These are shown as a checklist before deployment.`,
1597
- inputSchema: {
1598
- type: 'object',
1599
- properties: {
1600
- project_id: {
1601
- type: 'string',
1602
- description: 'Project UUID',
1603
- },
1604
- type: {
1605
- type: 'string',
1606
- description: 'Type of requirement',
1607
- enum: ['migration', 'env_var', 'config', 'manual', 'breaking_change', 'agent_task'],
1608
- },
1609
- title: {
1610
- type: 'string',
1611
- description: 'Brief description (e.g., "Run migration: 20250114_token_tracking.sql")',
1612
- },
1613
- description: {
1614
- type: 'string',
1615
- description: 'Optional detailed instructions',
1616
- },
1617
- file_path: {
1618
- type: 'string',
1619
- description: 'Optional file path reference',
1620
- },
1621
- stage: {
1622
- type: 'string',
1623
- description: 'Deployment stage: preparation (default), deployment, or verification',
1624
- enum: ['preparation', 'deployment', 'verification'],
1625
- },
1626
- blocking: {
1627
- type: 'boolean',
1628
- description: 'When true, converted task blocks all other work until complete',
1629
- },
1630
- },
1631
- required: ['project_id', 'type', 'title'],
1632
- },
1633
- },
1634
- {
1635
- name: 'complete_deployment_requirement',
1636
- description: `Mark a deployment requirement as completed.`,
1637
- inputSchema: {
1638
- type: 'object',
1639
- properties: {
1640
- requirement_id: {
1641
- type: 'string',
1642
- description: 'Requirement UUID',
1643
- },
1644
- },
1645
- required: ['requirement_id'],
1646
- },
1647
- },
1648
- {
1649
- name: 'get_deployment_requirements',
1650
- description: `Get pending deployment requirements for a project.`,
1651
- inputSchema: {
1652
- type: 'object',
1653
- properties: {
1654
- project_id: {
1655
- type: 'string',
1656
- description: 'Project UUID',
1657
- },
1658
- status: {
1659
- type: 'string',
1660
- description: 'Filter by status (default: pending)',
1661
- enum: ['pending', 'completed', 'converted_to_task', 'all'],
1662
- },
1663
- stage: {
1664
- type: 'string',
1665
- description: 'Filter by stage (optional)',
1666
- enum: ['preparation', 'deployment', 'verification', 'all'],
1667
- },
1668
- },
1669
- required: ['project_id'],
1670
- },
1671
- },
1672
- {
1673
- name: 'schedule_deployment',
1674
- description: `Schedule a deployment for a specific time. Supports one-time and recurring schedules with auto-trigger or manual trigger modes.`,
1675
- inputSchema: {
1676
- type: 'object',
1677
- properties: {
1678
- project_id: {
1679
- type: 'string',
1680
- description: 'Project UUID',
1681
- },
1682
- scheduled_at: {
1683
- type: 'string',
1684
- description: 'ISO 8601 datetime for when the deployment should be triggered',
1685
- },
1686
- schedule_type: {
1687
- type: 'string',
1688
- description: 'Schedule type: once (one-time), daily, weekly, or monthly',
1689
- enum: ['once', 'daily', 'weekly', 'monthly'],
1690
- },
1691
- auto_trigger: {
1692
- type: 'boolean',
1693
- description: 'Whether agents should automatically trigger this deployment when due (default: true)',
1694
- },
1695
- environment: {
1696
- type: 'string',
1697
- description: 'Target environment (default: production)',
1698
- enum: ['development', 'staging', 'production'],
1699
- },
1700
- version_bump: {
1701
- type: 'string',
1702
- description: 'Version bump: patch, minor, or major (default: patch)',
1703
- enum: ['patch', 'minor', 'major'],
1704
- },
1705
- notes: {
1706
- type: 'string',
1707
- description: 'Optional notes about this scheduled deployment',
1708
- },
1709
- git_ref: {
1710
- type: 'string',
1711
- description: 'Optional git branch or commit to deploy',
1712
- },
1713
- },
1714
- required: ['project_id', 'scheduled_at'],
1715
- },
1716
- },
1717
- {
1718
- name: 'get_scheduled_deployments',
1719
- description: `Get scheduled deployments for a project.`,
1720
- inputSchema: {
1721
- type: 'object',
1722
- properties: {
1723
- project_id: {
1724
- type: 'string',
1725
- description: 'Project UUID',
1726
- },
1727
- include_disabled: {
1728
- type: 'boolean',
1729
- description: 'Include disabled schedules (default: false)',
1730
- },
1731
- },
1732
- required: ['project_id'],
1733
- },
1734
- },
1735
- {
1736
- name: 'update_scheduled_deployment',
1737
- description: `Update a scheduled deployment's configuration.`,
1738
- inputSchema: {
1739
- type: 'object',
1740
- properties: {
1741
- schedule_id: {
1742
- type: 'string',
1743
- description: 'Schedule UUID',
1744
- },
1745
- scheduled_at: {
1746
- type: 'string',
1747
- description: 'New scheduled time (ISO 8601)',
1748
- },
1749
- schedule_type: {
1750
- type: 'string',
1751
- description: 'New schedule type',
1752
- enum: ['once', 'daily', 'weekly', 'monthly'],
1753
- },
1754
- auto_trigger: {
1755
- type: 'boolean',
1756
- description: 'Whether to auto-trigger',
1757
- },
1758
- enabled: {
1759
- type: 'boolean',
1760
- description: 'Enable or disable the schedule',
1761
- },
1762
- environment: {
1763
- type: 'string',
1764
- description: 'Target environment',
1765
- enum: ['development', 'staging', 'production'],
1766
- },
1767
- version_bump: {
1768
- type: 'string',
1769
- description: 'Version bump type',
1770
- enum: ['patch', 'minor', 'major'],
1771
- },
1772
- notes: {
1773
- type: 'string',
1774
- description: 'Notes about this deployment',
1775
- },
1776
- git_ref: {
1777
- type: 'string',
1778
- description: 'Git branch or commit to deploy',
1779
- },
1780
- },
1781
- required: ['schedule_id'],
1782
- },
1783
- },
1784
- {
1785
- name: 'delete_scheduled_deployment',
1786
- description: `Delete a scheduled deployment.`,
1787
- inputSchema: {
1788
- type: 'object',
1789
- properties: {
1790
- schedule_id: {
1791
- type: 'string',
1792
- description: 'Schedule UUID',
1793
- },
1794
- },
1795
- required: ['schedule_id'],
1796
- },
1797
- },
1798
- {
1799
- name: 'trigger_scheduled_deployment',
1800
- description: `Manually trigger a scheduled deployment. Creates a new deployment and updates the schedule.`,
1801
- inputSchema: {
1802
- type: 'object',
1803
- properties: {
1804
- schedule_id: {
1805
- type: 'string',
1806
- description: 'Schedule UUID',
1807
- },
1808
- },
1809
- required: ['schedule_id'],
1810
- },
1811
- },
1812
- {
1813
- name: 'check_due_deployments',
1814
- description: `Check for scheduled deployments that are due. Returns schedules where: enabled AND auto_trigger AND scheduled_at <= NOW().`,
1815
- inputSchema: {
1816
- type: 'object',
1817
- properties: {
1818
- project_id: {
1819
- type: 'string',
1820
- description: 'Project UUID',
1821
- },
1822
- },
1823
- required: ['project_id'],
1824
- },
1825
- },
1826
- {
1827
- name: 'start_fallback_activity',
1828
- description: `Start a background activity when no tasks available.`,
1829
- inputSchema: {
1830
- type: 'object',
1831
- properties: {
1832
- project_id: {
1833
- type: 'string',
1834
- description: 'Project UUID',
1835
- },
1836
- activity: {
1837
- type: 'string',
1838
- description: 'The fallback activity type (e.g., code_review, security_review)',
1839
- enum: [
1840
- 'feature_ideation',
1841
- 'code_review',
1842
- 'performance_audit',
1843
- 'ux_review',
1844
- 'cost_analysis',
1845
- 'security_review',
1846
- 'test_coverage',
1847
- 'documentation_review',
1848
- 'dependency_audit',
1849
- 'validate_completed_tasks',
1850
- ],
1851
- },
1852
- },
1853
- required: ['project_id', 'activity'],
1854
- },
1855
- },
1856
- {
1857
- name: 'stop_fallback_activity',
1858
- description: `Stop current fallback activity. Auto-clears when starting a regular task.`,
1859
- inputSchema: {
1860
- type: 'object',
1861
- properties: {
1862
- project_id: {
1863
- type: 'string',
1864
- description: 'Project UUID',
1865
- },
1866
- summary: {
1867
- type: 'string',
1868
- description: 'Optional summary of what was accomplished during this activity',
1869
- },
1870
- },
1871
- required: ['project_id'],
1872
- },
1873
- },
1874
- {
1875
- name: 'get_activity_history',
1876
- description: `Get background activity completion history.`,
1877
- inputSchema: {
1878
- type: 'object',
1879
- properties: {
1880
- project_id: {
1881
- type: 'string',
1882
- description: 'Project UUID',
1883
- },
1884
- activity_type: {
1885
- type: 'string',
1886
- description: 'Optional: filter to a specific activity type',
1887
- },
1888
- limit: {
1889
- type: 'number',
1890
- description: 'Max number of history entries to return (default 50)',
1891
- },
1892
- },
1893
- required: ['project_id'],
1894
- },
1895
- },
1896
- {
1897
- name: 'get_activity_schedules',
1898
- description: `Get background activity schedules.`,
1899
- inputSchema: {
1900
- type: 'object',
1901
- properties: {
1902
- project_id: {
1903
- type: 'string',
1904
- description: 'Project UUID',
1905
- },
1906
- },
1907
- required: ['project_id'],
1908
- },
1909
- },
1910
- // =========================================================================
1911
- // Agent Request Tools
1912
- // =========================================================================
1913
- {
1914
- name: 'get_pending_requests',
1915
- description: `Get unacknowledged user requests for this agent/project.`,
1916
- inputSchema: {
1917
- type: 'object',
1918
- properties: {
1919
- project_id: {
1920
- type: 'string',
1921
- description: 'Project UUID',
1922
- },
1923
- },
1924
- required: ['project_id'],
1925
- },
1926
- },
1927
- {
1928
- name: 'acknowledge_request',
1929
- description: `Mark a user request as handled.`,
1930
- inputSchema: {
1931
- type: 'object',
1932
- properties: {
1933
- request_id: {
1934
- type: 'string',
1935
- description: 'Request UUID to acknowledge',
1936
- },
1937
- },
1938
- required: ['request_id'],
1939
- },
1940
- },
1941
- {
1942
- name: 'answer_question',
1943
- description: `Answer a question from the user. Use this when the user has asked a question via the dashboard.
1944
- The answer will be displayed to the user and the question marked as answered.`,
1945
- inputSchema: {
1946
- type: 'object',
1947
- properties: {
1948
- request_id: {
1949
- type: 'string',
1950
- description: 'Request UUID of the question to answer',
1951
- },
1952
- answer: {
1953
- type: 'string',
1954
- description: 'Your answer to the user\'s question',
1955
- },
1956
- },
1957
- required: ['request_id', 'answer'],
1958
- },
1959
- },
1960
- // ============================================================================
1961
- // Milestone Tools
1962
- // ============================================================================
1963
- {
1964
- name: 'add_milestone',
1965
- description: `Add a milestone to a task.
1966
- Milestones help break down large tasks into smaller trackable steps.
1967
- Use this to show progress on complex tasks and help gauge completion.`,
1968
- inputSchema: {
1969
- type: 'object',
1970
- properties: {
1971
- task_id: {
1972
- type: 'string',
1973
- description: 'Task UUID to add milestone to',
1974
- },
1975
- title: {
1976
- type: 'string',
1977
- description: 'Milestone title (brief description of what needs to be done)',
1978
- },
1979
- description: {
1980
- type: 'string',
1981
- description: 'Optional detailed description',
1982
- },
1983
- order_index: {
1984
- type: 'number',
1985
- minimum: 0,
1986
- description: 'Order of this milestone (0-based, defaults to end of list)',
1987
- },
1988
- },
1989
- required: ['task_id', 'title'],
1990
- },
1991
- },
1992
- {
1993
- name: 'update_milestone',
1994
- description: `Update a milestone's title, description, status, or order.`,
1995
- inputSchema: {
1996
- type: 'object',
1997
- properties: {
1998
- milestone_id: {
1999
- type: 'string',
2000
- description: 'Milestone UUID',
2001
- },
2002
- title: {
2003
- type: 'string',
2004
- description: 'Updated title',
2005
- },
2006
- description: {
2007
- type: 'string',
2008
- description: 'Updated description',
2009
- },
2010
- status: {
2011
- type: 'string',
2012
- enum: ['pending', 'in_progress', 'completed'],
2013
- description: 'Milestone status',
2014
- },
2015
- order_index: {
2016
- type: 'number',
2017
- minimum: 0,
2018
- description: 'Updated order',
2019
- },
2020
- },
2021
- required: ['milestone_id'],
2022
- },
2023
- },
2024
- {
2025
- name: 'complete_milestone',
2026
- description: `Mark a milestone as completed. This is a convenience wrapper for update_milestone with status=completed.`,
2027
- inputSchema: {
2028
- type: 'object',
2029
- properties: {
2030
- milestone_id: {
2031
- type: 'string',
2032
- description: 'Milestone UUID',
2033
- },
2034
- },
2035
- required: ['milestone_id'],
2036
- },
2037
- },
2038
- {
2039
- name: 'delete_milestone',
2040
- description: `Delete a milestone from a task.`,
2041
- inputSchema: {
2042
- type: 'object',
2043
- properties: {
2044
- milestone_id: {
2045
- type: 'string',
2046
- description: 'Milestone UUID',
2047
- },
2048
- },
2049
- required: ['milestone_id'],
2050
- },
2051
- },
2052
- {
2053
- name: 'get_milestones',
2054
- description: `Get all milestones for a task, ordered by order_index.`,
2055
- inputSchema: {
2056
- type: 'object',
2057
- properties: {
2058
- task_id: {
2059
- type: 'string',
2060
- description: 'Task UUID',
2061
- },
2062
- },
2063
- required: ['task_id'],
2064
- },
2065
- },
2066
- // ============================================================================
2067
- // Bodies of Work Tools
2068
- // ============================================================================
2069
- {
2070
- name: 'create_body_of_work',
2071
- description: `Create a new body of work to group tasks into phases (pre/core/post).
2072
- Bodies of work allow organizing related tasks with optional auto-deployment on completion.`,
2073
- inputSchema: {
2074
- type: 'object',
2075
- properties: {
2076
- project_id: {
2077
- type: 'string',
2078
- description: 'Project UUID',
2079
- },
2080
- title: {
2081
- type: 'string',
2082
- description: 'Title for the body of work',
2083
- },
2084
- description: {
2085
- type: 'string',
2086
- description: 'Optional description',
2087
- },
2088
- auto_deploy_on_completion: {
2089
- type: 'boolean',
2090
- description: 'Automatically request deployment when all tasks complete (default: false)',
2091
- },
2092
- deploy_environment: {
2093
- type: 'string',
2094
- enum: ['development', 'staging', 'production'],
2095
- description: 'Target environment for auto-deploy (default: production)',
2096
- },
2097
- deploy_version_bump: {
2098
- type: 'string',
2099
- enum: ['patch', 'minor', 'major'],
2100
- description: 'Version bump for auto-deploy (default: minor)',
2101
- },
2102
- deploy_trigger: {
2103
- type: 'string',
2104
- enum: ['all_completed', 'all_completed_validated'],
2105
- description: 'When to trigger auto-deploy: all_completed (immediate) or all_completed_validated (requires validation, default)',
2106
- },
2107
- },
2108
- required: ['project_id', 'title'],
2109
- },
2110
- },
2111
- {
2112
- name: 'update_body_of_work',
2113
- description: `Update a body of work's settings.`,
2114
- inputSchema: {
2115
- type: 'object',
2116
- properties: {
2117
- body_of_work_id: {
2118
- type: 'string',
2119
- description: 'Body of work UUID',
2120
- },
2121
- title: {
2122
- type: 'string',
2123
- description: 'Updated title',
2124
- },
2125
- description: {
2126
- type: 'string',
2127
- description: 'Updated description',
2128
- },
2129
- auto_deploy_on_completion: {
2130
- type: 'boolean',
2131
- description: 'Auto-deploy setting',
2132
- },
2133
- deploy_environment: {
2134
- type: 'string',
2135
- enum: ['development', 'staging', 'production'],
2136
- description: 'Target environment',
2137
- },
2138
- deploy_version_bump: {
2139
- type: 'string',
2140
- enum: ['patch', 'minor', 'major'],
2141
- description: 'Version bump type',
2142
- },
2143
- deploy_trigger: {
2144
- type: 'string',
2145
- enum: ['all_completed', 'all_completed_validated'],
2146
- description: 'When to trigger auto-deploy',
2147
- },
2148
- },
2149
- required: ['body_of_work_id'],
2150
- },
2151
- },
2152
- {
2153
- name: 'get_body_of_work',
2154
- description: `Get a body of work with all its tasks organized by phase.
2155
- Use summary_only: true to get task counts and next task instead of full task arrays (saves tokens).`,
2156
- inputSchema: {
2157
- type: 'object',
2158
- properties: {
2159
- body_of_work_id: {
2160
- type: 'string',
2161
- description: 'Body of work UUID',
2162
- },
2163
- summary_only: {
2164
- type: 'boolean',
2165
- description: 'Return task counts and next task instead of full task arrays (default: false)',
2166
- },
2167
- },
2168
- required: ['body_of_work_id'],
2169
- },
2170
- },
2171
- {
2172
- name: 'get_bodies_of_work',
2173
- description: `List bodies of work for a project with task counts per phase.`,
2174
- inputSchema: {
2175
- type: 'object',
2176
- properties: {
2177
- project_id: {
2178
- type: 'string',
2179
- description: 'Project UUID',
2180
- },
2181
- status: {
2182
- type: 'string',
2183
- enum: ['draft', 'active', 'completed', 'cancelled'],
2184
- description: 'Filter by status (optional)',
2185
- },
2186
- limit: {
2187
- type: 'number',
2188
- description: 'Max number of bodies of work to return (default 50, max 100)',
2189
- },
2190
- offset: {
2191
- type: 'number',
2192
- description: 'Number of items to skip for pagination (default 0)',
2193
- },
2194
- search_query: {
2195
- type: 'string',
2196
- description: 'Search bodies of work by title or description',
2197
- },
2198
- },
2199
- required: ['project_id'],
2200
- },
2201
- },
2202
- {
2203
- name: 'delete_body_of_work',
2204
- description: `Delete a body of work. Tasks are preserved but no longer grouped.`,
2205
- inputSchema: {
2206
- type: 'object',
2207
- properties: {
2208
- body_of_work_id: {
2209
- type: 'string',
2210
- description: 'Body of work UUID',
2211
- },
2212
- },
2213
- required: ['body_of_work_id'],
2214
- },
2215
- },
2216
- {
2217
- name: 'add_task_to_body_of_work',
2218
- description: `Add a task to a body of work in a specific phase.
2219
- Phases control execution order: pre tasks run first, then core, then post.`,
2220
- inputSchema: {
2221
- type: 'object',
2222
- properties: {
2223
- body_of_work_id: {
2224
- type: 'string',
2225
- description: 'Body of work UUID',
2226
- },
2227
- task_id: {
2228
- type: 'string',
2229
- description: 'Task UUID to add',
2230
- },
2231
- phase: {
2232
- type: 'string',
2233
- enum: ['pre', 'core', 'post'],
2234
- description: 'Task phase (default: core)',
2235
- },
2236
- order_index: {
2237
- type: 'number',
2238
- description: 'Order within phase (auto-assigned if not specified)',
2239
- },
2240
- },
2241
- required: ['body_of_work_id', 'task_id'],
2242
- },
2243
- },
2244
- {
2245
- name: 'remove_task_from_body_of_work',
2246
- description: `Remove a task from its body of work. The task is preserved.`,
2247
- inputSchema: {
2248
- type: 'object',
2249
- properties: {
2250
- task_id: {
2251
- type: 'string',
2252
- description: 'Task UUID to remove',
2253
- },
2254
- },
2255
- required: ['task_id'],
2256
- },
2257
- },
2258
- {
2259
- name: 'activate_body_of_work',
2260
- description: `Activate a draft body of work to start execution.
2261
- Requires at least one task. Once active, tasks can be worked on following phase order.`,
2262
- inputSchema: {
2263
- type: 'object',
2264
- properties: {
2265
- body_of_work_id: {
2266
- type: 'string',
2267
- description: 'Body of work UUID',
2268
- },
2269
- },
2270
- required: ['body_of_work_id'],
2271
- },
2272
- },
2273
- {
2274
- name: 'add_task_dependency',
2275
- description: `Add a dependency between tasks in a body of work.
2276
- The dependent task cannot start until the dependency is completed. Prevents circular dependencies.`,
2277
- inputSchema: {
2278
- type: 'object',
2279
- properties: {
2280
- body_of_work_id: {
2281
- type: 'string',
2282
- description: 'Body of work UUID',
2283
- },
2284
- task_id: {
2285
- type: 'string',
2286
- description: 'Task that depends on another task',
2287
- },
2288
- depends_on_task_id: {
2289
- type: 'string',
2290
- description: 'Task that must complete first',
2291
- },
2292
- },
2293
- required: ['body_of_work_id', 'task_id', 'depends_on_task_id'],
2294
- },
2295
- },
2296
- {
2297
- name: 'remove_task_dependency',
2298
- description: `Remove a dependency between tasks.`,
2299
- inputSchema: {
2300
- type: 'object',
2301
- properties: {
2302
- task_id: {
2303
- type: 'string',
2304
- description: 'Task UUID',
2305
- },
2306
- depends_on_task_id: {
2307
- type: 'string',
2308
- description: 'Dependency task UUID',
2309
- },
2310
- },
2311
- required: ['task_id', 'depends_on_task_id'],
2312
- },
2313
- },
2314
- {
2315
- name: 'get_task_dependencies',
2316
- description: `Get task dependencies for a body of work or specific task.`,
2317
- inputSchema: {
2318
- type: 'object',
2319
- properties: {
2320
- body_of_work_id: {
2321
- type: 'string',
2322
- description: 'Body of work UUID (optional if task_id provided)',
2323
- },
2324
- task_id: {
2325
- type: 'string',
2326
- description: 'Specific task UUID (optional if body_of_work_id provided)',
2327
- },
2328
- },
2329
- },
2330
- },
2331
- {
2332
- name: 'get_next_body_of_work_task',
2333
- description: `Get the next available task from a body of work.
2334
- Considers phase order (pre → core → post) and task dependencies.
2335
- Only returns tasks where all dependencies are completed.`,
2336
- inputSchema: {
2337
- type: 'object',
2338
- properties: {
2339
- body_of_work_id: {
2340
- type: 'string',
2341
- description: 'Body of work UUID',
2342
- },
2343
- },
2344
- required: ['body_of_work_id'],
2345
- },
2346
- },
2347
- // ============================================================================
2348
- // Sprint Tools
2349
- // ============================================================================
2350
- {
2351
- name: 'create_sprint',
2352
- description: `Create a new sprint. Sprints are time-bounded bodies of work with velocity tracking.
2353
- Sprints start in 'planning' status where tasks can be added with story points.`,
2354
- inputSchema: {
2355
- type: 'object',
2356
- properties: {
2357
- project_id: {
2358
- type: 'string',
2359
- description: 'Project UUID',
2360
- },
2361
- title: {
2362
- type: 'string',
2363
- description: 'Sprint title (e.g., "Sprint 5" or "Q1 Release")',
2364
- },
2365
- goal: {
2366
- type: 'string',
2367
- description: 'Sprint goal statement',
2368
- },
2369
- start_date: {
2370
- type: 'string',
2371
- description: 'Start date (YYYY-MM-DD)',
2372
- },
2373
- end_date: {
2374
- type: 'string',
2375
- description: 'End date (YYYY-MM-DD)',
2376
- },
2377
- auto_deploy_on_completion: {
2378
- type: 'boolean',
2379
- description: 'Automatically request deployment when sprint completes (default: false)',
2380
- },
2381
- deploy_environment: {
2382
- type: 'string',
2383
- enum: ['development', 'staging', 'production'],
2384
- description: 'Target environment for auto-deploy (default: production)',
2385
- },
2386
- deploy_version_bump: {
2387
- type: 'string',
2388
- enum: ['patch', 'minor', 'major'],
2389
- description: 'Version bump for auto-deploy (default: minor)',
2390
- },
2391
- },
2392
- required: ['project_id', 'title', 'start_date', 'end_date'],
2393
- },
2394
- },
2395
- {
2396
- name: 'update_sprint',
2397
- description: `Update a sprint's details. Can update title, goal, dates, and deployment settings.`,
2398
- inputSchema: {
2399
- type: 'object',
2400
- properties: {
2401
- sprint_id: {
2402
- type: 'string',
2403
- description: 'Sprint UUID',
2404
- },
2405
- title: {
2406
- type: 'string',
2407
- description: 'New sprint title',
2408
- },
2409
- goal: {
2410
- type: 'string',
2411
- description: 'New sprint goal',
2412
- },
2413
- start_date: {
2414
- type: 'string',
2415
- description: 'New start date (YYYY-MM-DD)',
2416
- },
2417
- end_date: {
2418
- type: 'string',
2419
- description: 'New end date (YYYY-MM-DD)',
2420
- },
2421
- auto_deploy_on_completion: {
2422
- type: 'boolean',
2423
- description: 'Auto-deploy setting',
2424
- },
2425
- deploy_environment: {
2426
- type: 'string',
2427
- enum: ['development', 'staging', 'production'],
2428
- description: 'Target environment',
2429
- },
2430
- deploy_version_bump: {
2431
- type: 'string',
2432
- enum: ['patch', 'minor', 'major'],
2433
- description: 'Version bump type',
2434
- },
2435
- },
2436
- required: ['sprint_id'],
2437
- },
2438
- },
2439
- {
2440
- name: 'get_sprint',
2441
- description: `Get a sprint with all its tasks organized by phase (pre/core/post).
2442
- Includes progress percentage, velocity points, and committed points.
2443
- Use summary_only: true to get task counts and next task instead of full task arrays (saves tokens).`,
2444
- inputSchema: {
2445
- type: 'object',
2446
- properties: {
2447
- sprint_id: {
2448
- type: 'string',
2449
- description: 'Sprint UUID',
2450
- },
2451
- summary_only: {
2452
- type: 'boolean',
2453
- description: 'Return task counts and next task instead of full task arrays (default: false)',
2454
- },
2455
- },
2456
- required: ['sprint_id'],
2457
- },
2458
- },
2459
- {
2460
- name: 'get_sprints',
2461
- description: `List sprints for a project with velocity metrics.
2462
- Returns sprints sorted by sprint_number descending (most recent first).`,
2463
- inputSchema: {
2464
- type: 'object',
2465
- properties: {
2466
- project_id: {
2467
- type: 'string',
2468
- description: 'Project UUID',
2469
- },
2470
- status: {
2471
- type: 'string',
2472
- enum: ['planning', 'active', 'in_review', 'retrospective', 'completed', 'cancelled'],
2473
- description: 'Filter by sprint status (optional)',
2474
- },
2475
- limit: {
2476
- type: 'number',
2477
- description: 'Max sprints to return (default: 20, max: 100)',
2478
- },
2479
- },
2480
- required: ['project_id'],
2481
- },
2482
- },
2483
- {
2484
- name: 'delete_sprint',
2485
- description: `Delete a sprint. Tasks are preserved but no longer grouped.`,
2486
- inputSchema: {
2487
- type: 'object',
2488
- properties: {
2489
- sprint_id: {
2490
- type: 'string',
2491
- description: 'Sprint UUID',
2492
- },
2493
- },
2494
- required: ['sprint_id'],
2495
- },
2496
- },
2497
- {
2498
- name: 'start_sprint',
2499
- description: `Start a sprint. Transitions from 'planning' to 'active' status.
2500
- Locks the committed_points at the current total story points.`,
2501
- inputSchema: {
2502
- type: 'object',
2503
- properties: {
2504
- sprint_id: {
2505
- type: 'string',
2506
- description: 'Sprint UUID',
2507
- },
2508
- },
2509
- required: ['sprint_id'],
2510
- },
2511
- },
2512
- {
2513
- name: 'complete_sprint',
2514
- description: `Complete a sprint. Handles retrospective phase and auto-deployment if configured.
2515
- Status flow: active → in_review → retrospective → completed`,
2516
- inputSchema: {
2517
- type: 'object',
2518
- properties: {
2519
- sprint_id: {
2520
- type: 'string',
2521
- description: 'Sprint UUID',
2522
- },
2523
- retrospective_notes: {
2524
- type: 'string',
2525
- description: 'Sprint retrospective notes',
2526
- },
2527
- skip_retrospective: {
2528
- type: 'boolean',
2529
- description: 'Skip retrospective phase and go directly to completed (default: false)',
2530
- },
2531
- },
2532
- required: ['sprint_id'],
2533
- },
2534
- },
2535
- {
2536
- name: 'add_task_to_sprint',
2537
- description: `Add a task to a sprint with optional story points.
2538
- Tasks can be added during 'planning' status. Story points contribute to committed_points.`,
2539
- inputSchema: {
2540
- type: 'object',
2541
- properties: {
2542
- sprint_id: {
2543
- type: 'string',
2544
- description: 'Sprint UUID',
2545
- },
2546
- task_id: {
2547
- type: 'string',
2548
- description: 'Task UUID to add',
2549
- },
2550
- story_points: {
2551
- type: 'number',
2552
- description: 'Story point estimate (optional, must be non-negative integer)',
2553
- },
2554
- phase: {
2555
- type: 'string',
2556
- enum: ['pre', 'core', 'post'],
2557
- description: 'Task phase (default: core)',
2558
- },
2559
- },
2560
- required: ['sprint_id', 'task_id'],
2561
- },
2562
- },
2563
- {
2564
- name: 'remove_task_from_sprint',
2565
- description: `Remove a task from a sprint. Task is preserved but returns to backlog.`,
2566
- inputSchema: {
2567
- type: 'object',
2568
- properties: {
2569
- sprint_id: {
2570
- type: 'string',
2571
- description: 'Sprint UUID',
2572
- },
2573
- task_id: {
2574
- type: 'string',
2575
- description: 'Task UUID to remove',
2576
- },
2577
- },
2578
- required: ['sprint_id', 'task_id'],
2579
- },
2580
- },
2581
- {
2582
- name: 'get_sprint_backlog',
2583
- description: `Get tasks from backlog/pending that can be added to a sprint.
2584
- Returns tasks not already assigned to any body of work or sprint.`,
2585
- inputSchema: {
2586
- type: 'object',
2587
- properties: {
2588
- project_id: {
2589
- type: 'string',
2590
- description: 'Project UUID',
2591
- },
2592
- sprint_id: {
2593
- type: 'string',
2594
- description: 'Sprint UUID to exclude already-added tasks (optional)',
2595
- },
2596
- },
2597
- required: ['project_id'],
2598
- },
2599
- },
2600
- {
2601
- name: 'get_sprint_velocity',
2602
- description: `Get velocity metrics for completed sprints.
2603
- Returns committed vs completed points and average velocity.`,
2604
- inputSchema: {
2605
- type: 'object',
2606
- properties: {
2607
- project_id: {
2608
- type: 'string',
2609
- description: 'Project UUID',
2610
- },
2611
- limit: {
2612
- type: 'number',
2613
- description: 'Number of sprints to analyze (default: 10, max: 50)',
2614
- },
2615
- },
2616
- required: ['project_id'],
2617
- },
2618
- },
2619
- // ============================================================================
2620
- // Organization Tools
2621
- // ============================================================================
2622
- {
2623
- name: 'list_organizations',
2624
- description: 'List organizations the current user belongs to.',
2625
- inputSchema: {
2626
- type: 'object',
2627
- properties: {},
2628
- },
2629
- },
2630
- {
2631
- name: 'create_organization',
2632
- description: 'Create a new organization. You become the owner.',
2633
- inputSchema: {
2634
- type: 'object',
2635
- properties: {
2636
- name: {
2637
- type: 'string',
2638
- description: 'Organization display name',
2639
- },
2640
- description: {
2641
- type: 'string',
2642
- description: 'Brief description of the organization',
2643
- },
2644
- slug: {
2645
- type: 'string',
2646
- description: 'URL-friendly identifier (auto-generated from name if not provided)',
2647
- },
2648
- },
2649
- required: ['name'],
2650
- },
2651
- },
2652
- {
2653
- name: 'update_organization',
2654
- description: 'Update organization details. Requires admin role.',
2655
- inputSchema: {
2656
- type: 'object',
2657
- properties: {
2658
- organization_id: {
2659
- type: 'string',
2660
- description: 'Organization UUID',
2661
- },
2662
- name: {
2663
- type: 'string',
2664
- description: 'New organization name',
2665
- },
2666
- description: {
2667
- type: 'string',
2668
- description: 'New description',
2669
- },
2670
- logo_url: {
2671
- type: 'string',
2672
- description: 'URL to organization logo',
2673
- },
2674
- },
2675
- required: ['organization_id'],
2676
- },
2677
- },
2678
- {
2679
- name: 'delete_organization',
2680
- description: 'Delete an organization. Requires owner role. Removes all shares.',
2681
- inputSchema: {
2682
- type: 'object',
2683
- properties: {
2684
- organization_id: {
2685
- type: 'string',
2686
- description: 'Organization UUID',
2687
- },
2688
- },
2689
- required: ['organization_id'],
2690
- },
2691
- },
2692
- {
2693
- name: 'list_org_members',
2694
- description: 'List members of an organization.',
2695
- inputSchema: {
2696
- type: 'object',
2697
- properties: {
2698
- organization_id: {
2699
- type: 'string',
2700
- description: 'Organization UUID',
2701
- },
2702
- },
2703
- required: ['organization_id'],
2704
- },
2705
- },
2706
- {
2707
- name: 'invite_member',
2708
- description: 'Invite a user to an organization by email. Requires admin role.',
2709
- inputSchema: {
2710
- type: 'object',
2711
- properties: {
2712
- organization_id: {
2713
- type: 'string',
2714
- description: 'Organization UUID',
2715
- },
2716
- email: {
2717
- type: 'string',
2718
- description: 'Email address to invite',
2719
- },
2720
- role: {
2721
- type: 'string',
2722
- enum: ['admin', 'member', 'viewer'],
2723
- description: 'Role to assign (default: member)',
2724
- },
2725
- },
2726
- required: ['organization_id', 'email'],
2727
- },
2728
- },
2729
- {
2730
- name: 'update_member_role',
2731
- description: 'Change a member\'s role. Requires admin role. Cannot change owner.',
2732
- inputSchema: {
2733
- type: 'object',
2734
- properties: {
2735
- organization_id: {
2736
- type: 'string',
2737
- description: 'Organization UUID',
2738
- },
2739
- user_id: {
2740
- type: 'string',
2741
- description: 'User UUID to update',
2742
- },
2743
- role: {
2744
- type: 'string',
2745
- enum: ['admin', 'member', 'viewer'],
2746
- description: 'New role to assign',
2747
- },
2748
- },
2749
- required: ['organization_id', 'user_id', 'role'],
2750
- },
2751
- },
2752
- {
2753
- name: 'remove_member',
2754
- description: 'Remove a member from an organization. Requires admin role.',
2755
- inputSchema: {
2756
- type: 'object',
2757
- properties: {
2758
- organization_id: {
2759
- type: 'string',
2760
- description: 'Organization UUID',
2761
- },
2762
- user_id: {
2763
- type: 'string',
2764
- description: 'User UUID to remove',
2765
- },
2766
- },
2767
- required: ['organization_id', 'user_id'],
2768
- },
2769
- },
2770
- {
2771
- name: 'leave_organization',
2772
- description: 'Leave an organization. Owner cannot leave without transferring ownership.',
2773
- inputSchema: {
2774
- type: 'object',
2775
- properties: {
2776
- organization_id: {
2777
- type: 'string',
2778
- description: 'Organization UUID',
2779
- },
2780
- },
2781
- required: ['organization_id'],
2782
- },
2783
- },
2784
- {
2785
- name: 'share_project_with_org',
2786
- description: 'Share a project with an organization. You must own the project.',
2787
- inputSchema: {
2788
- type: 'object',
2789
- properties: {
2790
- project_id: {
2791
- type: 'string',
2792
- description: 'Project UUID',
2793
- },
2794
- organization_id: {
2795
- type: 'string',
2796
- description: 'Organization UUID to share with',
2797
- },
2798
- permission: {
2799
- type: 'string',
2800
- enum: ['read', 'write', 'admin'],
2801
- description: 'Permission level (default: read)',
2802
- },
2803
- },
2804
- required: ['project_id', 'organization_id'],
2805
- },
2806
- },
2807
- {
2808
- name: 'update_project_share',
2809
- description: 'Update the permission level for a project share.',
2810
- inputSchema: {
2811
- type: 'object',
2812
- properties: {
2813
- project_id: {
2814
- type: 'string',
2815
- description: 'Project UUID',
2816
- },
2817
- organization_id: {
2818
- type: 'string',
2819
- description: 'Organization UUID',
2820
- },
2821
- permission: {
2822
- type: 'string',
2823
- enum: ['read', 'write', 'admin'],
2824
- description: 'New permission level',
2825
- },
2826
- },
2827
- required: ['project_id', 'organization_id', 'permission'],
2828
- },
2829
- },
2830
- {
2831
- name: 'unshare_project',
2832
- description: 'Remove a project share from an organization.',
2833
- inputSchema: {
2834
- type: 'object',
2835
- properties: {
2836
- project_id: {
2837
- type: 'string',
2838
- description: 'Project UUID',
2839
- },
2840
- organization_id: {
2841
- type: 'string',
2842
- description: 'Organization UUID',
2843
- },
2844
- },
2845
- required: ['project_id', 'organization_id'],
2846
- },
2847
- },
2848
- {
2849
- name: 'list_project_shares',
2850
- description: 'List all organizations a project is shared with.',
2851
- inputSchema: {
2852
- type: 'object',
2853
- properties: {
2854
- project_id: {
2855
- type: 'string',
2856
- description: 'Project UUID',
2857
- },
2858
- },
2859
- required: ['project_id'],
2860
- },
2861
- },
2862
- ];
153
+ // Tool definitions imported from tools.ts
2863
154
  // ============================================================================
2864
155
  // Tool Handlers
2865
156
  // ============================================================================