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