@vibescope/mcp-server 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/README.md +113 -98
  2. package/dist/api-client.d.ts +1169 -0
  3. package/dist/api-client.js +713 -0
  4. package/dist/cli.d.ts +1 -6
  5. package/dist/cli.js +39 -240
  6. package/dist/config/tool-categories.d.ts +31 -0
  7. package/dist/config/tool-categories.js +253 -0
  8. package/dist/handlers/blockers.js +57 -58
  9. package/dist/handlers/bodies-of-work.d.ts +2 -0
  10. package/dist/handlers/bodies-of-work.js +108 -477
  11. package/dist/handlers/cost.d.ts +1 -0
  12. package/dist/handlers/cost.js +35 -113
  13. package/dist/handlers/decisions.d.ts +2 -0
  14. package/dist/handlers/decisions.js +28 -27
  15. package/dist/handlers/deployment.js +113 -828
  16. package/dist/handlers/discovery.d.ts +3 -0
  17. package/dist/handlers/discovery.js +26 -627
  18. package/dist/handlers/fallback.d.ts +2 -0
  19. package/dist/handlers/fallback.js +56 -142
  20. package/dist/handlers/findings.d.ts +8 -1
  21. package/dist/handlers/findings.js +65 -68
  22. package/dist/handlers/git-issues.d.ts +9 -13
  23. package/dist/handlers/git-issues.js +80 -225
  24. package/dist/handlers/ideas.d.ts +3 -0
  25. package/dist/handlers/ideas.js +53 -134
  26. package/dist/handlers/index.d.ts +2 -0
  27. package/dist/handlers/index.js +6 -0
  28. package/dist/handlers/milestones.d.ts +2 -0
  29. package/dist/handlers/milestones.js +51 -98
  30. package/dist/handlers/organizations.js +79 -275
  31. package/dist/handlers/progress.d.ts +2 -0
  32. package/dist/handlers/progress.js +25 -123
  33. package/dist/handlers/project.js +42 -221
  34. package/dist/handlers/requests.d.ts +2 -0
  35. package/dist/handlers/requests.js +23 -83
  36. package/dist/handlers/session.js +119 -590
  37. package/dist/handlers/sprints.d.ts +32 -0
  38. package/dist/handlers/sprints.js +275 -0
  39. package/dist/handlers/tasks.d.ts +7 -10
  40. package/dist/handlers/tasks.js +245 -894
  41. package/dist/handlers/tool-docs.d.ts +9 -0
  42. package/dist/handlers/tool-docs.js +904 -0
  43. package/dist/handlers/types.d.ts +11 -3
  44. package/dist/handlers/validation.d.ts +1 -1
  45. package/dist/handlers/validation.js +38 -153
  46. package/dist/index.js +493 -162
  47. package/dist/knowledge.js +106 -9
  48. package/dist/tools.js +34 -4
  49. package/dist/validators.d.ts +21 -0
  50. package/dist/validators.js +91 -0
  51. package/package.json +2 -3
  52. package/src/api-client.ts +1822 -0
  53. package/src/cli.test.ts +128 -302
  54. package/src/cli.ts +41 -285
  55. package/src/handlers/__test-setup__.ts +215 -0
  56. package/src/handlers/__test-utils__.ts +4 -134
  57. package/src/handlers/blockers.test.ts +114 -124
  58. package/src/handlers/blockers.ts +68 -70
  59. package/src/handlers/bodies-of-work.test.ts +236 -831
  60. package/src/handlers/bodies-of-work.ts +210 -525
  61. package/src/handlers/cost.test.ts +149 -113
  62. package/src/handlers/cost.ts +44 -132
  63. package/src/handlers/decisions.test.ts +111 -209
  64. package/src/handlers/decisions.ts +35 -27
  65. package/src/handlers/deployment.test.ts +193 -239
  66. package/src/handlers/deployment.ts +143 -896
  67. package/src/handlers/discovery.test.ts +20 -67
  68. package/src/handlers/discovery.ts +29 -714
  69. package/src/handlers/fallback.test.ts +206 -361
  70. package/src/handlers/fallback.ts +81 -156
  71. package/src/handlers/findings.test.ts +229 -320
  72. package/src/handlers/findings.ts +76 -64
  73. package/src/handlers/git-issues.test.ts +623 -0
  74. package/src/handlers/git-issues.ts +174 -0
  75. package/src/handlers/ideas.test.ts +229 -343
  76. package/src/handlers/ideas.ts +69 -143
  77. package/src/handlers/index.ts +6 -0
  78. package/src/handlers/milestones.test.ts +167 -281
  79. package/src/handlers/milestones.ts +54 -93
  80. package/src/handlers/organizations.test.ts +275 -467
  81. package/src/handlers/organizations.ts +84 -294
  82. package/src/handlers/progress.test.ts +112 -218
  83. package/src/handlers/progress.ts +29 -142
  84. package/src/handlers/project.test.ts +203 -226
  85. package/src/handlers/project.ts +48 -238
  86. package/src/handlers/requests.test.ts +74 -342
  87. package/src/handlers/requests.ts +25 -83
  88. package/src/handlers/session.test.ts +276 -206
  89. package/src/handlers/session.ts +136 -662
  90. package/src/handlers/sprints.test.ts +711 -0
  91. package/src/handlers/sprints.ts +510 -0
  92. package/src/handlers/tasks.test.ts +669 -353
  93. package/src/handlers/tasks.ts +263 -1015
  94. package/src/handlers/tool-docs.ts +1024 -0
  95. package/src/handlers/types.ts +12 -4
  96. package/src/handlers/validation.test.ts +237 -568
  97. package/src/handlers/validation.ts +43 -167
  98. package/src/index.ts +493 -186
  99. package/src/tools.ts +2532 -0
  100. package/src/validators.test.ts +223 -223
  101. package/src/validators.ts +127 -0
  102. package/tsconfig.json +1 -1
  103. package/vitest.config.ts +14 -13
  104. package/dist/cli.test.d.ts +0 -1
  105. package/dist/cli.test.js +0 -367
  106. package/dist/handlers/__test-utils__.d.ts +0 -72
  107. package/dist/handlers/__test-utils__.js +0 -176
  108. package/dist/handlers/checkouts.d.ts +0 -37
  109. package/dist/handlers/checkouts.js +0 -377
  110. package/dist/handlers/knowledge-query.d.ts +0 -22
  111. package/dist/handlers/knowledge-query.js +0 -253
  112. package/dist/handlers/knowledge.d.ts +0 -12
  113. package/dist/handlers/knowledge.js +0 -108
  114. package/dist/handlers/roles.d.ts +0 -30
  115. package/dist/handlers/roles.js +0 -281
  116. package/dist/handlers/tasks.test.d.ts +0 -1
  117. package/dist/handlers/tasks.test.js +0 -431
  118. package/dist/utils.test.d.ts +0 -1
  119. package/dist/utils.test.js +0 -532
  120. package/dist/validators.test.d.ts +0 -1
  121. package/dist/validators.test.js +0 -176
  122. package/src/knowledge.ts +0 -132
  123. package/src/tmpclaude-0078-cwd +0 -1
  124. package/src/tmpclaude-0ee1-cwd +0 -1
  125. package/src/tmpclaude-2dd5-cwd +0 -1
  126. package/src/tmpclaude-344c-cwd +0 -1
  127. package/src/tmpclaude-3860-cwd +0 -1
  128. package/src/tmpclaude-4b63-cwd +0 -1
  129. package/src/tmpclaude-5c73-cwd +0 -1
  130. package/src/tmpclaude-5ee3-cwd +0 -1
  131. package/src/tmpclaude-6795-cwd +0 -1
  132. package/src/tmpclaude-709e-cwd +0 -1
  133. package/src/tmpclaude-9839-cwd +0 -1
  134. package/src/tmpclaude-d829-cwd +0 -1
  135. package/src/tmpclaude-e072-cwd +0 -1
  136. package/src/tmpclaude-f6ee-cwd +0 -1
  137. package/tmpclaude-0439-cwd +0 -1
  138. package/tmpclaude-132f-cwd +0 -1
  139. package/tmpclaude-15bb-cwd +0 -1
  140. package/tmpclaude-165a-cwd +0 -1
  141. package/tmpclaude-1ba9-cwd +0 -1
  142. package/tmpclaude-21a3-cwd +0 -1
  143. package/tmpclaude-2a38-cwd +0 -1
  144. package/tmpclaude-2adf-cwd +0 -1
  145. package/tmpclaude-2f56-cwd +0 -1
  146. package/tmpclaude-3626-cwd +0 -1
  147. package/tmpclaude-3727-cwd +0 -1
  148. package/tmpclaude-40bc-cwd +0 -1
  149. package/tmpclaude-436f-cwd +0 -1
  150. package/tmpclaude-4783-cwd +0 -1
  151. package/tmpclaude-4b6d-cwd +0 -1
  152. package/tmpclaude-4ba4-cwd +0 -1
  153. package/tmpclaude-51e6-cwd +0 -1
  154. package/tmpclaude-5ecf-cwd +0 -1
  155. package/tmpclaude-6f97-cwd +0 -1
  156. package/tmpclaude-7fb2-cwd +0 -1
  157. package/tmpclaude-825c-cwd +0 -1
  158. package/tmpclaude-8baf-cwd +0 -1
  159. package/tmpclaude-8d9f-cwd +0 -1
  160. package/tmpclaude-975c-cwd +0 -1
  161. package/tmpclaude-9983-cwd +0 -1
  162. package/tmpclaude-a045-cwd +0 -1
  163. package/tmpclaude-ac4a-cwd +0 -1
  164. package/tmpclaude-b593-cwd +0 -1
  165. package/tmpclaude-b891-cwd +0 -1
  166. package/tmpclaude-c032-cwd +0 -1
  167. package/tmpclaude-cf43-cwd +0 -1
  168. package/tmpclaude-d040-cwd +0 -1
  169. package/tmpclaude-dcdd-cwd +0 -1
  170. package/tmpclaude-dcee-cwd +0 -1
  171. package/tmpclaude-e16b-cwd +0 -1
  172. package/tmpclaude-ecd2-cwd +0 -1
  173. package/tmpclaude-f48d-cwd +0 -1
@@ -4,10 +4,30 @@
4
4
  * Handles tool discovery and documentation:
5
5
  * - discover_tools
6
6
  * - get_tool_info
7
+ *
8
+ * Note: Tool documentation is lazy-loaded from tool-docs.ts to save tokens.
9
+ * This saves ~8,000 tokens per schema load.
7
10
  */
8
11
 
9
12
  import type { Handler, HandlerRegistry } from './types.js';
10
13
 
14
+ // Lazy-loaded tool documentation cache
15
+ let toolInfoCache: Record<string, string> | null = null;
16
+
17
+ /**
18
+ * Lazy-load tool documentation.
19
+ * Only loads the TOOL_INFO module when get_tool_info is called.
20
+ */
21
+ async function getToolDocs(): Promise<Record<string, string>> {
22
+ if (toolInfoCache) {
23
+ return toolInfoCache;
24
+ }
25
+
26
+ const { TOOL_INFO } = await import('./tool-docs.js');
27
+ toolInfoCache = TOOL_INFO;
28
+ return toolInfoCache;
29
+ }
30
+
11
31
  // Tool categories with brief descriptions
12
32
  const TOOL_CATEGORIES: Record<string, { description: string; tools: Array<{ name: string; brief: string }> }> = {
13
33
  session: {
@@ -186,719 +206,12 @@ const TOOL_CATEGORIES: Record<string, { description: string; tools: Array<{ name
186
206
  { name: 'get_task_costs', brief: 'Cost per task' },
187
207
  ],
188
208
  },
189
- };
190
-
191
- // Detailed tool info (fetched on-demand)
192
- const TOOL_INFO: Record<string, string> = {
193
- start_work_session: `# start_work_session
194
- Initialize agent session and get assigned work.
195
-
196
- **Parameters:**
197
- - project_id (optional): Project UUID
198
- - git_url (optional): Git URL to find project
199
- - mode: 'lite' (default) or 'full' for complete context
200
-
201
- **Returns:** session_id, persona, project info, next_task
202
-
203
- **Example:** start_work_session(git_url: "https://github.com/org/repo")`,
204
-
205
- get_help: `# get_help
206
- Get workflow guidance on specific topics.
207
-
208
- **Parameters:**
209
- - topic (required): One of: getting_started, tasks, validation, deployment, git, blockers, milestones, fallback, session, tokens, topics
210
-
211
- **Example:** get_help(topic: "deployment")`,
212
-
213
- get_token_usage: `# get_token_usage
214
- Get token usage statistics for current session.
215
-
216
- **Returns:** total calls, total tokens, breakdown by tool, averages`,
217
-
218
- heartbeat: `# heartbeat
219
- Send heartbeat to maintain active status. Call every 30-60 seconds.
220
-
221
- **Parameters:**
222
- - session_id (optional): Uses current session if not provided`,
223
-
224
- end_work_session: `# end_work_session
225
- End session and release claimed tasks.
226
-
227
- **Parameters:**
228
- - session_id (optional): Uses current session if not provided
229
-
230
- **Returns:** Session summary with tasks completed, time spent`,
231
-
232
- get_project_context: `# get_project_context
233
- Get full project context including goals, instructions, tasks, blockers, decisions.
234
-
235
- **Parameters:**
236
- - project_id (optional): Project UUID
237
- - git_url (optional): Git URL to find project
238
-
239
- Without params, lists all projects.`,
240
-
241
- get_git_workflow: `# get_git_workflow
242
- Get git workflow config and branching instructions.
243
-
244
- **Parameters:**
245
- - project_id (required): Project UUID
246
- - task_id (optional): Include branch naming suggestion
247
-
248
- **Returns:** workflow type, branch names, auto-settings`,
249
-
250
- create_project: `# create_project
251
- Create a new project to track.
252
-
253
- **Parameters:**
254
- - name (required): Project display name
255
- - description: Brief description
256
- - goal: What "done" looks like
257
- - git_url: Repository URL
258
- - tech_stack: Array of technologies`,
259
-
260
- update_project: `# update_project
261
- Update project settings.
262
-
263
- **Parameters:**
264
- - project_id (required): Project UUID
265
- - name, description, goal, git_url, tech_stack, status
266
- - git_workflow: none, trunk-based, github-flow, git-flow
267
- - git_main_branch, git_develop_branch, git_auto_branch, git_auto_tag`,
268
-
269
- update_project_readme: `# update_project_readme
270
- Sync README content to the dashboard.
271
-
272
- **Parameters:**
273
- - project_id (required): Project UUID
274
- - readme_content (required): Markdown content`,
275
-
276
- get_tasks: `# get_tasks
277
- Get tasks for a project.
278
-
279
- **Parameters:**
280
- - project_id (required): Project UUID
281
- - status (optional): pending, in_progress, completed, cancelled
282
- - limit (optional): Max tasks (default 50)`,
283
-
284
- get_next_task: `# get_next_task
285
- Get highest priority pending task not claimed by another agent.
286
-
287
- **Parameters:**
288
- - project_id (required): Project UUID
289
-
290
- **Returns:** task or null, may suggest fallback activity`,
291
-
292
- add_task: `# add_task
293
- Create a new task.
294
-
295
- **Parameters:**
296
- - project_id (required): Project UUID
297
- - title (required): Task title
298
- - description: Detailed description
299
- - priority: 1-5 (1=highest, default 3)
300
- - estimated_minutes: Time estimate`,
301
-
302
- update_task: `# update_task
303
- Update task status, progress, or details.
304
-
305
- **Parameters:**
306
- - task_id (required): Task UUID
307
- - status: pending, in_progress, completed, cancelled
308
- - progress_percentage: 0-100
309
- - progress_note: Brief note (auto-logged)
310
- - title, description, priority, estimated_minutes, git_branch
311
-
312
- **Best practice:** Include progress_note with progress_percentage`,
313
-
314
- complete_task: `# complete_task
315
- Mark task as done.
316
-
317
- **Parameters:**
318
- - task_id (required): Task UUID
319
- - summary: What was done
320
-
321
- **Returns:** next_task, validation_count, blockers_count, deployment_priority`,
322
-
323
- delete_task: `# delete_task
324
- Delete a task.
325
-
326
- **Parameters:**
327
- - task_id (required): Task UUID`,
328
-
329
- batch_update_tasks: `# batch_update_tasks
330
- Update multiple tasks at once.
331
-
332
- **Parameters:**
333
- - updates (required): Array of {task_id, status?, progress_percentage?, progress_note?, priority?}`,
334
-
335
- batch_complete_tasks: `# batch_complete_tasks
336
- Complete multiple tasks at once.
337
-
338
- **Parameters:**
339
- - completions (required): Array of {task_id, summary?}`,
340
-
341
- add_task_reference: `# add_task_reference
342
- Add a reference URL to a task.
343
-
344
- **Parameters:**
345
- - task_id (required): Task UUID
346
- - url (required): Reference URL
347
- - label (optional): Display label`,
348
-
349
- remove_task_reference: `# remove_task_reference
350
- Remove a reference URL from a task.
351
-
352
- **Parameters:**
353
- - task_id (required): Task UUID
354
- - url (required): URL to remove`,
355
-
356
- add_milestone: `# add_milestone
357
- Add a milestone/step to a task.
358
-
359
- **Parameters:**
360
- - task_id (required): Task UUID
361
- - title (required): Milestone title
362
- - description (optional): Details
363
- - order_index (optional): Position (0-based)`,
364
-
365
- update_milestone: `# update_milestone
366
- Update a milestone.
367
-
368
- **Parameters:**
369
- - milestone_id (required): Milestone UUID
370
- - title, description, status (pending/in_progress/completed), order_index`,
371
-
372
- complete_milestone: `# complete_milestone
373
- Mark milestone as completed.
374
-
375
- **Parameters:**
376
- - milestone_id (required): Milestone UUID`,
377
-
378
- delete_milestone: `# delete_milestone
379
- Delete a milestone.
380
-
381
- **Parameters:**
382
- - milestone_id (required): Milestone UUID`,
383
-
384
- get_milestones: `# get_milestones
385
- Get all milestones for a task.
386
-
387
- **Parameters:**
388
- - task_id (required): Task UUID`,
389
-
390
- log_progress: `# log_progress
391
- Record a progress update.
392
-
393
- **Parameters:**
394
- - project_id (required): Project UUID
395
- - summary (required): Brief summary
396
- - task_id (optional): Link to task
397
- - details (optional): Extended notes`,
398
-
399
- get_activity_feed: `# get_activity_feed
400
- Get combined activity feed.
401
-
402
- **Parameters:**
403
- - project_id (required): Project UUID
404
- - types (optional): Array of task, progress, blocker, decision
405
- - created_by (optional): agent or user
406
- - since (optional): ISO date string
407
- - limit (optional): Max items (default 50)`,
408
-
409
- add_blocker: `# add_blocker
410
- Record a blocker preventing progress.
411
-
412
- **Parameters:**
413
- - project_id (required): Project UUID
414
- - description (required): What is blocking`,
415
-
416
- resolve_blocker: `# resolve_blocker
417
- Mark a blocker as resolved.
418
-
419
- **Parameters:**
420
- - blocker_id (required): Blocker UUID
421
- - resolution_note (optional): How it was resolved`,
422
-
423
- get_blockers: `# get_blockers
424
- Get blockers for a project.
425
-
426
- **Parameters:**
427
- - project_id (required): Project UUID
428
- - status (optional): open or resolved (default: open)`,
429
-
430
- delete_blocker: `# delete_blocker
431
- Delete a blocker.
432
-
433
- **Parameters:**
434
- - blocker_id (required): Blocker UUID`,
435
-
436
- log_decision: `# log_decision
437
- Record an architectural decision.
438
-
439
- **Parameters:**
440
- - project_id (required): Project UUID
441
- - title (required): Decision title
442
- - description (required): What was decided
443
- - rationale (optional): Why
444
- - alternatives_considered (optional): Array of alternatives`,
445
-
446
- get_decisions: `# get_decisions
447
- Get recorded decisions.
448
-
449
- **Parameters:**
450
- - project_id (required): Project UUID`,
451
-
452
- delete_decision: `# delete_decision
453
- Delete a decision.
454
-
455
- **Parameters:**
456
- - decision_id (required): Decision UUID`,
457
-
458
- add_idea: `# add_idea
459
- Record an improvement idea.
460
-
461
- **Parameters:**
462
- - project_id (required): Project UUID
463
- - title (required): Idea title
464
- - description (optional): Details
465
- - status (optional): raw, exploring, planned, in_development, shipped`,
466
-
467
- update_idea: `# update_idea
468
- Update an idea.
469
-
470
- **Parameters:**
471
- - idea_id (required): Idea UUID
472
- - title, description, status, doc_url`,
473
-
474
- get_ideas: `# get_ideas
475
- Get recorded ideas.
476
-
477
- **Parameters:**
478
- - project_id (required): Project UUID
479
- - status (optional): Filter by status`,
480
-
481
- delete_idea: `# delete_idea
482
- Delete an idea.
483
-
484
- **Parameters:**
485
- - idea_id (required): Idea UUID`,
486
-
487
- convert_idea_to_task: `# convert_idea_to_task
488
- Convert an idea to a task. Creates a new task from the idea's title and description.
489
-
490
- **Parameters:**
491
- - idea_id (required): Idea UUID to convert
492
- - priority (optional): Task priority 1-5 (default: 3)
493
- - estimated_minutes (optional): Estimated time
494
- - update_status (optional): Update idea to 'in_development' (default: true)
495
-
496
- **Returns:**
497
- - task_id: Created task UUID
498
- - Links idea and task together`,
499
-
500
- add_finding: `# add_finding
501
- Record an audit/review finding.
502
-
503
- **Parameters:**
504
- - project_id (required): Project UUID
505
- - title (required): Finding title
506
- - category: performance, security, code_quality, accessibility, documentation, architecture, testing, other
507
- - description: Details with impact and suggested fix
508
- - severity: info, low, medium, high, critical
509
- - file_path, line_number, related_task_id (optional)`,
510
-
511
- get_findings: `# get_findings
512
- Get audit findings.
513
-
514
- **Parameters:**
515
- - project_id (required): Project UUID
516
- - category, severity, status (optional filters)
517
- - limit (optional): Max items`,
518
-
519
- update_finding: `# update_finding
520
- Update a finding.
521
-
522
- **Parameters:**
523
- - finding_id (required): Finding UUID
524
- - status: open, addressed, dismissed, wontfix
525
- - resolution_note, title, description, severity`,
526
-
527
- delete_finding: `# delete_finding
528
- Delete a finding.
529
-
530
- **Parameters:**
531
- - finding_id (required): Finding UUID`,
532
-
533
- get_tasks_awaiting_validation: `# get_tasks_awaiting_validation
534
- Get completed tasks needing validation.
535
-
536
- **Parameters:**
537
- - project_id (required): Project UUID
538
-
539
- **Returns:** Tasks with reviewing status (who's reviewing, when started)`,
540
-
541
- claim_validation: `# claim_validation
542
- Claim a completed task for review. Shows "being reviewed" on dashboard.
543
-
544
- **Parameters:**
545
- - task_id (required): Task UUID to claim
546
-
547
- **Note:** Claim before reviewing to prevent duplicate work.`,
548
-
549
- validate_task: `# validate_task
550
- Validate a completed task.
551
-
552
- **Parameters:**
553
- - task_id (required): Task UUID
554
- - approved (required): true/false
555
- - validation_notes: What was checked, issues found`,
556
-
557
- request_deployment: `# request_deployment
558
- Request a deployment.
559
-
560
- **Parameters:**
561
- - project_id (required): Project UUID
562
- - environment: development, staging, production
563
- - version_bump: patch, minor, major
564
- - notes, git_ref (optional)`,
565
-
566
- claim_deployment_validation: `# claim_deployment_validation
567
- Claim pending deployment for validation.
568
-
569
- **Parameters:**
570
- - project_id (required): Project UUID
571
-
572
- Next: Run build+tests, then call report_validation`,
573
-
574
- report_validation: `# report_validation
575
- Report build/test results.
576
-
577
- **Parameters:**
578
- - project_id (required): Project UUID
579
- - build_passed (required): boolean
580
- - tests_passed (required): boolean
581
- - error_message (if failed)`,
582
-
583
- check_deployment_status: `# check_deployment_status
584
- Get active deployment status.
585
-
586
- **Parameters:**
587
- - project_id (required): Project UUID`,
588
-
589
- start_deployment: `# start_deployment
590
- Start deployment (requires 'ready' status).
591
-
592
- **Parameters:**
593
- - project_id (required): Project UUID`,
594
-
595
- complete_deployment: `# complete_deployment
596
- Mark deployment complete.
597
-
598
- **Parameters:**
599
- - project_id (required): Project UUID
600
- - success (required): boolean
601
- - summary: What was deployed or why failed`,
602
-
603
- cancel_deployment: `# cancel_deployment
604
- Cancel active deployment.
605
-
606
- **Parameters:**
607
- - project_id (required): Project UUID
608
- - reason (optional): Why cancelled`,
609
-
610
- schedule_deployment: `# schedule_deployment
611
- Schedule a deployment for a specific time.
612
-
613
- **Parameters:**
614
- - project_id (required): Project UUID
615
- - scheduled_at (required): ISO 8601 datetime
616
- - schedule_type (optional): once, daily, weekly, monthly (default: once)
617
- - auto_trigger (optional): Whether agents auto-trigger (default: true)
618
- - environment (optional): development, staging, production (default: production)
619
- - version_bump (optional): patch, minor, major (default: patch)
620
- - notes (optional): Notes about the deployment
621
- - git_ref (optional): Git branch or commit
622
-
623
- **Example:** schedule_deployment(project_id, scheduled_at: "2025-01-15T10:00:00Z", schedule_type: "weekly")`,
624
-
625
- get_scheduled_deployments: `# get_scheduled_deployments
626
- List scheduled deployments for a project.
627
-
628
- **Parameters:**
629
- - project_id (required): Project UUID
630
- - include_disabled (optional): Include disabled schedules (default: false)`,
631
-
632
- update_scheduled_deployment: `# update_scheduled_deployment
633
- Update a scheduled deployment's configuration.
634
-
635
- **Parameters:**
636
- - schedule_id (required): Schedule UUID
637
- - scheduled_at (optional): New scheduled time
638
- - schedule_type (optional): once, daily, weekly, monthly
639
- - auto_trigger (optional): Whether to auto-trigger
640
- - enabled (optional): Enable or disable
641
- - environment, version_bump, notes, git_ref (optional)`,
642
-
643
- delete_scheduled_deployment: `# delete_scheduled_deployment
644
- Delete a scheduled deployment.
645
-
646
- **Parameters:**
647
- - schedule_id (required): Schedule UUID`,
648
-
649
- trigger_scheduled_deployment: `# trigger_scheduled_deployment
650
- Manually trigger a scheduled deployment.
651
-
652
- Creates a new deployment using the schedule's configuration.
653
- Updates schedule: last_triggered_at, trigger_count, next scheduled_at (for recurring).
654
-
655
- **Parameters:**
656
- - schedule_id (required): Schedule UUID`,
657
-
658
- check_due_deployments: `# check_due_deployments
659
- Check for scheduled deployments that are due.
660
-
661
- Returns schedules where: enabled AND auto_trigger AND scheduled_at <= NOW()
662
-
663
- Use this to find deployments to trigger when working on a project.
664
-
665
- **Parameters:**
666
- - project_id (required): Project UUID`,
667
-
668
- start_fallback_activity: `# start_fallback_activity
669
- Start background activity when no tasks.
670
-
671
- **Parameters:**
672
- - project_id (required): Project UUID
673
- - activity (required): feature_ideation, code_review, performance_audit, ux_review, cost_analysis, security_review, test_coverage, documentation_review, dependency_audit, validate_completed_tasks`,
674
-
675
- stop_fallback_activity: `# stop_fallback_activity
676
- Stop current fallback activity.
677
-
678
- **Parameters:**
679
- - project_id (required): Project UUID
680
- - summary (optional): What was accomplished`,
681
-
682
- get_activity_history: `# get_activity_history
683
- Get background activity history.
684
-
685
- **Parameters:**
686
- - project_id (required): Project UUID
687
- - activity_type (optional): Filter by type
688
- - limit (optional): Max items`,
689
-
690
- get_activity_schedules: `# get_activity_schedules
691
- Get activity schedules.
692
-
693
- **Parameters:**
694
- - project_id (required): Project UUID`,
695
-
696
- get_pending_requests: `# get_pending_requests
697
- Get unacknowledged user requests.
698
-
699
- **Parameters:**
700
- - project_id (required): Project UUID`,
701
-
702
- acknowledge_request: `# acknowledge_request
703
- Mark a request as handled.
704
-
705
- **Parameters:**
706
- - request_id (required): Request UUID`,
707
-
708
- answer_question: `# answer_question
709
- Answer a user question from dashboard.
710
-
711
- **Parameters:**
712
- - request_id (required): Request UUID
713
- - answer (required): Your answer`,
714
-
715
- discover_tools: `# discover_tools
716
- List available tools by category.
717
-
718
- **Parameters:**
719
- - category (optional): Filter to specific category
720
-
721
- Without category, returns all categories with tool counts.
722
- With category, returns tools in that category with brief descriptions.`,
723
-
724
- get_tool_info: `# get_tool_info
725
- Get detailed info for a specific tool.
726
-
727
- **Parameters:**
728
- - tool_name (required): Name of the tool
729
-
730
- Returns: full documentation, parameters, examples, best practices.`,
731
-
732
- // Organization tools
733
- list_organizations: `# list_organizations
734
- List organizations the current user belongs to.
735
-
736
- **Parameters:** None
737
-
738
- **Returns:** Array of organizations with role and joined_at`,
739
-
740
- create_organization: `# create_organization
741
- Create a new organization. You become the owner.
742
-
743
- **Parameters:**
744
- - name (required): Organization display name
745
- - description (optional): Brief description
746
- - slug (optional): URL-friendly identifier (auto-generated if not provided)
747
-
748
- **Example:** create_organization(name: "Acme Corp", description: "Our development team")`,
749
-
750
- update_organization: `# update_organization
751
- Update organization details. Requires admin role.
752
-
753
- **Parameters:**
754
- - organization_id (required): Organization UUID
755
- - name, description, logo_url (optional updates)`,
756
-
757
- delete_organization: `# delete_organization
758
- Delete an organization. Requires owner role. Removes all shares.
759
-
760
- **Parameters:**
761
- - organization_id (required): Organization UUID
762
-
763
- **Warning:** This will remove all project shares with this organization.`,
764
-
765
- list_org_members: `# list_org_members
766
- List members of an organization.
767
-
768
- **Parameters:**
769
- - organization_id (required): Organization UUID
770
-
771
- **Returns:** Array of members with role and joined_at`,
772
-
773
- invite_member: `# invite_member
774
- Invite a user to an organization by email. Requires admin role.
775
-
776
- **Parameters:**
777
- - organization_id (required): Organization UUID
778
- - email (required): Email address to invite
779
- - role (optional): admin, member, or viewer (default: member)
780
-
781
- **Returns:** Invite details with token`,
782
-
783
- update_member_role: `# update_member_role
784
- Change a member's role. Requires admin role.
785
-
786
- **Parameters:**
787
- - organization_id (required): Organization UUID
788
- - user_id (required): User UUID to update
789
- - role (required): admin, member, or viewer
790
-
791
- **Note:** Cannot change your own role or the owner's role.`,
792
-
793
- remove_member: `# remove_member
794
- Remove a member from an organization. Requires admin role.
795
-
796
- **Parameters:**
797
- - organization_id (required): Organization UUID
798
- - user_id (required): User UUID to remove
799
-
800
- **Note:** Cannot remove the owner. Their org-scoped API keys are invalidated.`,
801
-
802
- leave_organization: `# leave_organization
803
- Leave an organization.
804
-
805
- **Parameters:**
806
- - organization_id (required): Organization UUID
807
-
808
- **Note:** Owner cannot leave. Must transfer ownership or delete organization.`,
809
-
810
- share_project_with_org: `# share_project_with_org
811
- Share a project with an organization. You must own the project.
812
-
813
- **Parameters:**
814
- - project_id (required): Project UUID
815
- - organization_id (required): Organization UUID to share with
816
- - permission (optional): read, write, or admin (default: read)
817
-
818
- **Permission levels:**
819
- - read: View project and tasks
820
- - write: Add/update tasks, log progress
821
- - admin: All write permissions plus deployments`,
822
-
823
- update_project_share: `# update_project_share
824
- Update the permission level for a project share.
825
-
826
- **Parameters:**
827
- - project_id (required): Project UUID
828
- - organization_id (required): Organization UUID
829
- - permission (required): read, write, or admin`,
830
-
831
- unshare_project: `# unshare_project
832
- Remove a project share from an organization.
833
-
834
- **Parameters:**
835
- - project_id (required): Project UUID
836
- - organization_id (required): Organization UUID
837
-
838
- **Note:** Org members will lose access immediately.`,
839
-
840
- list_project_shares: `# list_project_shares
841
- List all organizations a project is shared with.
842
-
843
- **Parameters:**
844
- - project_id (required): Project UUID
845
-
846
- **Returns:** Array of shares with organization info and permission level`,
847
-
848
- // Cost monitoring tools
849
- get_cost_summary: `# get_cost_summary
850
- Get cost summary (daily/weekly/monthly) for a project.
851
-
852
- **Parameters:**
853
- - project_id (required): Project UUID
854
- - period: 'daily' | 'weekly' | 'monthly' (default: daily)
855
- - limit: Max records to return (default: 30)
856
-
857
- **Returns:** Cost summary with totals and breakdown by model`,
858
-
859
- get_cost_alerts: `# get_cost_alerts
860
- Get cost alerts for the current user.
861
-
862
- **Parameters:**
863
- - project_id (optional): Filter by project
864
-
865
- **Returns:** Array of configured cost alerts`,
866
-
867
- add_cost_alert: `# add_cost_alert
868
- Add a cost threshold alert.
869
-
870
- **Parameters:**
871
- - project_id (optional): Specific project or null for all
872
- - threshold_amount (required): Amount in USD
873
- - threshold_period (required): 'daily' | 'weekly' | 'monthly'
874
- - alert_type: 'warning' | 'critical' (default: warning)
875
-
876
- **Example:** add_cost_alert(threshold_amount: 50, threshold_period: "daily", alert_type: "warning")`,
877
-
878
- update_cost_alert: `# update_cost_alert
879
- Update an existing cost alert.
880
-
881
- **Parameters:**
882
- - alert_id (required): Alert UUID
883
- - threshold_amount: New amount in USD
884
- - threshold_period: New period
885
- - alert_type: New alert type
886
- - enabled: Enable/disable the alert`,
887
-
888
- delete_cost_alert: `# delete_cost_alert
889
- Delete a cost alert.
890
-
891
- **Parameters:**
892
- - alert_id (required): Alert UUID to delete`,
893
-
894
- get_task_costs: `# get_task_costs
895
- Get cost breakdown by task for a project.
896
-
897
- **Parameters:**
898
- - project_id (required): Project UUID
899
- - limit: Max tasks to return (default: 20)
900
-
901
- **Returns:** Tasks sorted by estimated cost with model breakdown`,
209
+ knowledge: {
210
+ description: 'Queryable knowledge base from project data',
211
+ tools: [
212
+ { name: 'query_knowledge_base', brief: 'Aggregated project knowledge in one call' },
213
+ ],
214
+ },
902
215
  };
903
216
 
904
217
  export const discoverTools: Handler = async (args) => {
@@ -947,7 +260,9 @@ export const getToolInfo: Handler = async (args) => {
947
260
  return { result: { error: 'tool_name is required' } };
948
261
  }
949
262
 
950
- const info = TOOL_INFO[tool_name];
263
+ // Lazy-load tool documentation
264
+ const toolDocs = await getToolDocs();
265
+ const info = toolDocs[tool_name];
951
266
  if (!info) {
952
267
  return {
953
268
  result: {