@vibescope/mcp-server 0.3.0 → 0.3.3

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 (154) hide show
  1. package/dist/api-client/blockers.d.ts +46 -0
  2. package/dist/api-client/blockers.js +43 -0
  3. package/dist/api-client/cost.d.ts +112 -0
  4. package/dist/api-client/cost.js +76 -0
  5. package/dist/api-client/decisions.d.ts +55 -0
  6. package/dist/api-client/decisions.js +32 -0
  7. package/dist/api-client/discovery.d.ts +62 -0
  8. package/dist/api-client/discovery.js +21 -0
  9. package/dist/api-client/ideas.d.ts +75 -0
  10. package/dist/api-client/ideas.js +36 -0
  11. package/dist/api-client/index.d.ts +749 -0
  12. package/dist/api-client/index.js +291 -0
  13. package/dist/api-client/project.d.ts +132 -0
  14. package/dist/api-client/project.js +45 -0
  15. package/dist/api-client/session.d.ts +163 -0
  16. package/dist/api-client/session.js +52 -0
  17. package/dist/api-client/tasks.d.ts +328 -0
  18. package/dist/api-client/tasks.js +132 -0
  19. package/dist/api-client/types.d.ts +25 -0
  20. package/dist/api-client/types.js +4 -0
  21. package/dist/api-client/worktrees.d.ts +33 -0
  22. package/dist/api-client/worktrees.js +26 -0
  23. package/dist/api-client.d.ts +9 -0
  24. package/dist/api-client.js +104 -25
  25. package/dist/cli-init.d.ts +17 -0
  26. package/dist/cli-init.js +445 -0
  27. package/dist/cli.js +0 -0
  28. package/dist/handlers/cloud-agents.d.ts +21 -0
  29. package/dist/handlers/cloud-agents.js +91 -0
  30. package/dist/handlers/discovery.js +7 -0
  31. package/dist/handlers/index.d.ts +1 -0
  32. package/dist/handlers/index.js +3 -0
  33. package/dist/handlers/session.js +3 -1
  34. package/dist/handlers/tasks.js +10 -12
  35. package/dist/handlers/types.d.ts +2 -1
  36. package/dist/handlers/validation.js +5 -1
  37. package/dist/index.js +8 -3
  38. package/dist/token-tracking.js +2 -2
  39. package/dist/tools/blockers.d.ts +13 -0
  40. package/dist/tools/blockers.js +119 -0
  41. package/dist/tools/bodies-of-work.d.ts +19 -0
  42. package/dist/tools/bodies-of-work.js +280 -0
  43. package/dist/tools/cloud-agents.d.ts +9 -0
  44. package/dist/tools/cloud-agents.js +67 -0
  45. package/dist/tools/connectors.d.ts +14 -0
  46. package/dist/tools/connectors.js +188 -0
  47. package/dist/tools/cost.d.ts +11 -0
  48. package/dist/tools/cost.js +108 -0
  49. package/dist/tools/decisions.d.ts +12 -0
  50. package/dist/tools/decisions.js +108 -0
  51. package/dist/tools/deployment.d.ts +24 -0
  52. package/dist/tools/deployment.js +439 -0
  53. package/dist/tools/discovery.d.ts +10 -0
  54. package/dist/tools/discovery.js +73 -0
  55. package/dist/tools/fallback.d.ts +11 -0
  56. package/dist/tools/fallback.js +108 -0
  57. package/dist/tools/file-checkouts.d.ts +13 -0
  58. package/dist/tools/file-checkouts.js +141 -0
  59. package/dist/tools/findings.d.ts +13 -0
  60. package/dist/tools/findings.js +98 -0
  61. package/dist/tools/git-issues.d.ts +11 -0
  62. package/dist/tools/git-issues.js +127 -0
  63. package/dist/tools/ideas.d.ts +13 -0
  64. package/dist/tools/ideas.js +159 -0
  65. package/dist/tools/index.d.ts +71 -0
  66. package/dist/tools/index.js +98 -0
  67. package/dist/tools/milestones.d.ts +12 -0
  68. package/dist/tools/milestones.js +115 -0
  69. package/dist/tools/organizations.d.ts +17 -0
  70. package/dist/tools/organizations.js +221 -0
  71. package/dist/tools/progress.d.ts +9 -0
  72. package/dist/tools/progress.js +70 -0
  73. package/dist/tools/project.d.ts +13 -0
  74. package/dist/tools/project.js +199 -0
  75. package/dist/tools/requests.d.ts +10 -0
  76. package/dist/tools/requests.js +65 -0
  77. package/dist/tools/roles.d.ts +11 -0
  78. package/dist/tools/roles.js +109 -0
  79. package/dist/tools/session.d.ts +15 -0
  80. package/dist/tools/session.js +178 -0
  81. package/dist/tools/sprints.d.ts +18 -0
  82. package/dist/tools/sprints.js +295 -0
  83. package/dist/tools/tasks.d.ts +27 -0
  84. package/dist/tools/tasks.js +539 -0
  85. package/dist/tools/types.d.ts +7 -0
  86. package/dist/tools/types.js +6 -0
  87. package/dist/tools/validation.d.ts +10 -0
  88. package/dist/tools/validation.js +72 -0
  89. package/dist/tools/worktrees.d.ts +9 -0
  90. package/dist/tools/worktrees.js +63 -0
  91. package/dist/utils.d.ts +66 -0
  92. package/dist/utils.js +102 -0
  93. package/docs/TOOLS.md +55 -2
  94. package/package.json +5 -3
  95. package/scripts/generate-docs.ts +1 -1
  96. package/src/api-client/blockers.ts +86 -0
  97. package/src/api-client/cost.ts +185 -0
  98. package/src/api-client/decisions.ts +87 -0
  99. package/src/api-client/discovery.ts +81 -0
  100. package/src/api-client/ideas.ts +112 -0
  101. package/src/api-client/index.ts +378 -0
  102. package/src/api-client/project.ts +179 -0
  103. package/src/api-client/session.ts +220 -0
  104. package/src/api-client/tasks.ts +450 -0
  105. package/src/api-client/types.ts +32 -0
  106. package/src/api-client/worktrees.ts +53 -0
  107. package/src/api-client.test.ts +136 -9
  108. package/src/api-client.ts +125 -27
  109. package/src/cli-init.ts +504 -0
  110. package/src/handlers/__test-utils__.ts +2 -0
  111. package/src/handlers/cloud-agents.ts +138 -0
  112. package/src/handlers/discovery.ts +7 -0
  113. package/src/handlers/index.ts +3 -0
  114. package/src/handlers/session.ts +3 -1
  115. package/src/handlers/tasks.ts +10 -12
  116. package/src/handlers/tool-categories.test.ts +1 -1
  117. package/src/handlers/types.ts +2 -1
  118. package/src/handlers/validation.ts +6 -1
  119. package/src/index.test.ts +2 -2
  120. package/src/index.ts +8 -2
  121. package/src/token-tracking.ts +3 -2
  122. package/src/tools/blockers.ts +122 -0
  123. package/src/tools/bodies-of-work.ts +283 -0
  124. package/src/tools/cloud-agents.ts +70 -0
  125. package/src/tools/connectors.ts +191 -0
  126. package/src/tools/cost.ts +111 -0
  127. package/src/tools/decisions.ts +111 -0
  128. package/src/tools/deployment.ts +442 -0
  129. package/src/tools/discovery.ts +76 -0
  130. package/src/tools/fallback.ts +111 -0
  131. package/src/tools/file-checkouts.ts +145 -0
  132. package/src/tools/findings.ts +101 -0
  133. package/src/tools/git-issues.ts +130 -0
  134. package/src/tools/ideas.ts +162 -0
  135. package/src/tools/index.ts +131 -0
  136. package/src/tools/milestones.ts +118 -0
  137. package/src/tools/organizations.ts +224 -0
  138. package/src/tools/progress.ts +73 -0
  139. package/src/tools/project.ts +202 -0
  140. package/src/tools/requests.ts +68 -0
  141. package/src/tools/roles.ts +112 -0
  142. package/src/tools/session.ts +181 -0
  143. package/src/tools/sprints.ts +298 -0
  144. package/src/tools/tasks.ts +542 -0
  145. package/src/tools/tools.test.ts +222 -0
  146. package/src/tools/types.ts +9 -0
  147. package/src/tools/validation.ts +75 -0
  148. package/src/tools/worktrees.ts +66 -0
  149. package/src/tools.test.ts +1 -1
  150. package/src/utils.test.ts +229 -0
  151. package/src/utils.ts +117 -0
  152. package/dist/tools.d.ts +0 -2
  153. package/dist/tools.js +0 -3602
  154. package/src/tools.ts +0 -3607
@@ -0,0 +1,542 @@
1
+ /**
2
+ * Task Tool Definitions
3
+ *
4
+ * Tools for task CRUD and management:
5
+ * - get_task
6
+ * - search_tasks
7
+ * - get_tasks_by_priority
8
+ * - get_recent_tasks
9
+ * - get_task_stats
10
+ * - get_next_task
11
+ * - add_task
12
+ * - update_task
13
+ * - complete_task
14
+ * - delete_task
15
+ * - cancel_task
16
+ * - release_task
17
+ * - add_task_reference
18
+ * - remove_task_reference
19
+ * - batch_update_tasks
20
+ * - batch_complete_tasks
21
+ * - add_subtask
22
+ * - get_subtasks
23
+ * - get_stale_worktrees
24
+ * - clear_worktree_path
25
+ */
26
+
27
+ import type { Tool } from './types.js';
28
+
29
+ export const taskTools: Tool[] = [
30
+ {
31
+ name: 'get_task',
32
+ description: `Get a single task by ID with optional subtasks and milestones.`,
33
+ inputSchema: {
34
+ type: 'object',
35
+ properties: {
36
+ task_id: {
37
+ type: 'string',
38
+ description: 'Task UUID',
39
+ },
40
+ include_subtasks: {
41
+ type: 'boolean',
42
+ description: 'Include subtasks array (default: false)',
43
+ },
44
+ include_milestones: {
45
+ type: 'boolean',
46
+ description: 'Include milestones array (default: false)',
47
+ },
48
+ },
49
+ required: ['task_id'],
50
+ },
51
+ },
52
+ {
53
+ name: 'search_tasks',
54
+ description: `Search tasks by text query. Supports pagination with offset. Use for finding specific tasks by title or description.`,
55
+ inputSchema: {
56
+ type: 'object',
57
+ properties: {
58
+ project_id: {
59
+ type: 'string',
60
+ description: 'Project UUID',
61
+ },
62
+ query: {
63
+ type: 'string',
64
+ description: 'Search query (min 2 chars). Searches title and description.',
65
+ },
66
+ status: {
67
+ type: 'array',
68
+ items: { type: 'string', enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'] },
69
+ description: 'Filter by status (optional, array)',
70
+ },
71
+ limit: {
72
+ type: 'number',
73
+ description: 'Max results per page (1-20, default: 10)',
74
+ },
75
+ offset: {
76
+ type: 'number',
77
+ description: 'Number of results to skip for pagination (default: 0)',
78
+ },
79
+ },
80
+ required: ['project_id', 'query'],
81
+ },
82
+ },
83
+ {
84
+ name: 'get_tasks_by_priority',
85
+ description: `Get tasks filtered by priority. Supports pagination with offset. Use for finding high-priority or low-priority tasks.`,
86
+ inputSchema: {
87
+ type: 'object',
88
+ properties: {
89
+ project_id: {
90
+ type: 'string',
91
+ description: 'Project UUID',
92
+ },
93
+ priority: {
94
+ type: 'number',
95
+ minimum: 1,
96
+ maximum: 5,
97
+ description: 'Exact priority to match (1=highest, 5=lowest)',
98
+ },
99
+ priority_max: {
100
+ type: 'number',
101
+ minimum: 1,
102
+ maximum: 5,
103
+ description: 'Max priority (for range, e.g., priority=1, priority_max=2 gets P1 and P2)',
104
+ },
105
+ status: {
106
+ type: 'string',
107
+ enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'],
108
+ description: 'Filter by status (default: pending)',
109
+ },
110
+ limit: {
111
+ type: 'number',
112
+ description: 'Max results per page (1-20, default: 10)',
113
+ },
114
+ offset: {
115
+ type: 'number',
116
+ description: 'Number of results to skip for pagination (default: 0)',
117
+ },
118
+ },
119
+ required: ['project_id'],
120
+ },
121
+ },
122
+ {
123
+ name: 'get_recent_tasks',
124
+ description: `Get tasks ordered by creation date. Supports pagination with offset. Use to find oldest pending tasks or newest additions.`,
125
+ inputSchema: {
126
+ type: 'object',
127
+ properties: {
128
+ project_id: {
129
+ type: 'string',
130
+ description: 'Project UUID',
131
+ },
132
+ order: {
133
+ type: 'string',
134
+ enum: ['newest', 'oldest'],
135
+ description: 'Sort order (default: newest)',
136
+ },
137
+ status: {
138
+ type: 'string',
139
+ enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'],
140
+ description: 'Filter by status (optional)',
141
+ },
142
+ limit: {
143
+ type: 'number',
144
+ description: 'Max results per page (1-20, default: 10)',
145
+ },
146
+ offset: {
147
+ type: 'number',
148
+ description: 'Number of results to skip for pagination (default: 0)',
149
+ },
150
+ },
151
+ required: ['project_id'],
152
+ },
153
+ },
154
+ {
155
+ name: 'get_task_stats',
156
+ description: `Get aggregate task statistics for a project. Returns counts by status and priority, no task data. Most token-efficient way to understand project state.`,
157
+ inputSchema: {
158
+ type: 'object',
159
+ properties: {
160
+ project_id: {
161
+ type: 'string',
162
+ description: 'Project UUID',
163
+ },
164
+ },
165
+ required: ['project_id'],
166
+ },
167
+ },
168
+ {
169
+ name: 'get_next_task',
170
+ description: `Get highest priority pending task. Start it IMMEDIATELY by calling update_task(task_id, status: "in_progress").
171
+
172
+ Do NOT ask the user for permission. Follow the directive in the response.`,
173
+ inputSchema: {
174
+ type: 'object',
175
+ properties: {
176
+ project_id: {
177
+ type: 'string',
178
+ description: 'Project UUID',
179
+ },
180
+ },
181
+ required: ['project_id'],
182
+ },
183
+ },
184
+ {
185
+ name: 'add_task',
186
+ 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.
187
+
188
+ WHEN TO USE: If the user gives you work directly (e.g., "implement feature X", "fix this bug") that isn't already tracked as a task in Vibescope, you MUST create a task first using this tool. This ensures:
189
+ - The work is visible on the dashboard
190
+ - Progress can be tracked
191
+ - Other agents won't duplicate the work
192
+ - The human can see what you're working on`,
193
+ inputSchema: {
194
+ type: 'object',
195
+ properties: {
196
+ project_id: {
197
+ type: 'string',
198
+ description: 'Project UUID',
199
+ },
200
+ title: {
201
+ type: 'string',
202
+ description: 'Task title',
203
+ },
204
+ description: {
205
+ type: 'string',
206
+ description: 'Detailed description',
207
+ },
208
+ priority: {
209
+ type: 'number',
210
+ minimum: 1,
211
+ maximum: 5,
212
+ description: 'Priority 1-5 (1 = highest)',
213
+ },
214
+ estimated_minutes: {
215
+ type: 'number',
216
+ minimum: 1,
217
+ description: 'Estimated time to complete in minutes',
218
+ },
219
+ blocking: {
220
+ type: 'boolean',
221
+ description: 'When true, this task blocks all other work until complete (used for deployment finalization)',
222
+ },
223
+ model_capability: {
224
+ type: 'string',
225
+ enum: ['haiku', 'sonnet', 'opus'],
226
+ description: 'Recommended model capability: haiku (simple tasks), sonnet (standard), opus (complex reasoning)',
227
+ },
228
+ },
229
+ required: ['project_id', 'title'],
230
+ },
231
+ },
232
+ {
233
+ name: 'update_task',
234
+ description: `Update task status, progress, or details. Include progress_note with progress_percentage.
235
+
236
+ CRITICAL - WORKTREE REQUIRED: For projects using github-flow or git-flow, you MUST use a git worktree to isolate your work. This prevents conflicts with other agents working on the same repository.
237
+
238
+ When setting status to "in_progress":
239
+ 1. Create worktree FIRST: git worktree add ../PROJECT-PERSONA-task-desc -b feature/TASKID-description BASE_BRANCH
240
+ 2. cd into the worktree directory
241
+ 3. THEN call update_task with git_branch AND worktree_path
242
+
243
+ Example: update_task(task_id, status: "in_progress", git_branch: "feature/abc123-add-login", worktree_path: "../MyProject-Edge-add-login")
244
+
245
+ For projects without git branching (trunk-based or none), use skip_worktree_requirement: true.`,
246
+ inputSchema: {
247
+ type: 'object',
248
+ properties: {
249
+ task_id: {
250
+ type: 'string',
251
+ description: 'Task UUID',
252
+ },
253
+ title: { type: 'string', description: 'New task title' },
254
+ description: { type: 'string', description: 'New task description' },
255
+ priority: {
256
+ type: 'number',
257
+ minimum: 1,
258
+ maximum: 5,
259
+ description: 'Task priority (1=highest, 5=lowest)',
260
+ },
261
+ status: {
262
+ type: 'string',
263
+ enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'],
264
+ description: 'Task status',
265
+ },
266
+ progress_percentage: {
267
+ type: 'number',
268
+ minimum: 0,
269
+ maximum: 100,
270
+ description: '0-100 completion percentage',
271
+ },
272
+ progress_note: {
273
+ type: 'string',
274
+ description: 'Brief note (auto-logged)',
275
+ },
276
+ estimated_minutes: {
277
+ type: 'number',
278
+ minimum: 1,
279
+ description: 'Revised time estimate',
280
+ },
281
+ git_branch: {
282
+ type: 'string',
283
+ description: 'Git branch associated with this task. REQUIRED when status is "in_progress" (unless skip_worktree_requirement is true)',
284
+ },
285
+ worktree_path: {
286
+ type: 'string',
287
+ description: 'Git worktree path for this task (e.g., "../project-task-abc123"). Store this for cleanup tracking across sessions.',
288
+ },
289
+ worktree_hostname: {
290
+ type: 'string',
291
+ description: 'Machine hostname where worktree was created (os.hostname()). Required with worktree_path to enable machine-aware cleanup.',
292
+ },
293
+ model_capability: {
294
+ type: 'string',
295
+ enum: ['haiku', 'sonnet', 'opus'],
296
+ description: 'Recommended model capability: haiku (simple tasks), sonnet (standard), opus (complex reasoning)',
297
+ },
298
+ skip_worktree_requirement: {
299
+ type: 'boolean',
300
+ description: 'Skip git_branch requirement for projects without branching workflows (trunk-based or none). Default: false',
301
+ },
302
+ },
303
+ required: ['task_id'],
304
+ },
305
+ },
306
+ {
307
+ name: 'complete_task',
308
+ description: `Mark task done. Returns next_task which you MUST start immediately without asking the user.
309
+
310
+ CRITICAL: Before calling complete_task on branching workflows (github-flow, git-flow):
311
+ 1. Create your PR targeting the correct branch (develop for git-flow, main for github-flow)
312
+ 2. Call add_task_reference(task_id, pr_url) to link the PR to your task
313
+ 3. THEN call complete_task - validators CANNOT approve tasks without a PR reference
314
+
315
+ CRITICAL: After calling this tool, you must:
316
+ 1. If next_task is returned → Start it immediately by calling update_task(task_id, status: "in_progress")
317
+ 2. If no next_task → Call get_next_task() or start a fallback_activity
318
+ 3. NEVER ask the user "What should I do next?" or "Should I continue?"
319
+
320
+ The auto_continue: true flag in the response means you are expected to continue working autonomously.`,
321
+ inputSchema: {
322
+ type: 'object',
323
+ properties: {
324
+ task_id: {
325
+ type: 'string',
326
+ description: 'Task UUID',
327
+ },
328
+ summary: {
329
+ type: 'string',
330
+ description: 'Brief summary of what was done. This is stored on the task as completion_summary and displayed when reviewing completed tasks.',
331
+ },
332
+ },
333
+ required: ['task_id'],
334
+ },
335
+ },
336
+ {
337
+ name: 'delete_task',
338
+ description: `Delete a task.`,
339
+ inputSchema: {
340
+ type: 'object',
341
+ properties: {
342
+ task_id: {
343
+ type: 'string',
344
+ description: 'Task UUID',
345
+ },
346
+ },
347
+ required: ['task_id'],
348
+ },
349
+ },
350
+ {
351
+ name: 'cancel_task',
352
+ description: `Cancel a task with an optional reason. Use this when a task should be marked as cancelled rather than deleted (e.g., PR was closed, work was superseded). The task remains visible with a cancelled status for historical tracking.`,
353
+ inputSchema: {
354
+ type: 'object',
355
+ properties: {
356
+ task_id: {
357
+ type: 'string',
358
+ description: 'Task UUID',
359
+ },
360
+ cancelled_reason: {
361
+ type: 'string',
362
+ description: 'Reason for cancellation',
363
+ enum: ['pr_closed', 'superseded', 'user_cancelled', 'validation_failed', 'obsolete', 'blocked'],
364
+ },
365
+ cancellation_note: {
366
+ type: 'string',
367
+ description: 'Optional note explaining the cancellation (logged to progress)',
368
+ },
369
+ },
370
+ required: ['task_id'],
371
+ },
372
+ },
373
+ {
374
+ name: 'release_task',
375
+ description: `Release a claimed task back to pending status. Use when you need to give up a task you've started but cannot complete (e.g., context limits reached, conflicts with other work, user requested different approach). The task becomes available for other agents to claim.`,
376
+ inputSchema: {
377
+ type: 'object',
378
+ properties: {
379
+ task_id: {
380
+ type: 'string',
381
+ description: 'Task UUID',
382
+ },
383
+ reason: {
384
+ type: 'string',
385
+ description: 'Optional reason for releasing the task (logged to progress)',
386
+ },
387
+ },
388
+ required: ['task_id'],
389
+ },
390
+ },
391
+ {
392
+ name: 'add_task_reference',
393
+ description: 'Add a reference URL to a task (docs, PRs, issues).',
394
+ inputSchema: {
395
+ type: 'object',
396
+ properties: {
397
+ task_id: {
398
+ type: 'string',
399
+ description: 'Task UUID',
400
+ },
401
+ url: {
402
+ type: 'string',
403
+ description: 'URL to add as reference',
404
+ },
405
+ label: {
406
+ type: 'string',
407
+ description: 'Optional label/title for the reference',
408
+ },
409
+ },
410
+ required: ['task_id', 'url'],
411
+ },
412
+ },
413
+ {
414
+ name: 'remove_task_reference',
415
+ description: `Remove a reference link from a task by URL.`,
416
+ inputSchema: {
417
+ type: 'object',
418
+ properties: {
419
+ task_id: {
420
+ type: 'string',
421
+ description: 'Task UUID',
422
+ },
423
+ url: {
424
+ type: 'string',
425
+ description: 'URL of the reference to remove',
426
+ },
427
+ },
428
+ required: ['task_id', 'url'],
429
+ },
430
+ },
431
+ {
432
+ name: 'batch_update_tasks',
433
+ description: 'Update multiple tasks at once. Include progress_note with progress_percentage.',
434
+ inputSchema: {
435
+ type: 'object',
436
+ properties: {
437
+ updates: {
438
+ type: 'array',
439
+ description: 'Array of task updates to apply',
440
+ items: {
441
+ type: 'object',
442
+ properties: {
443
+ task_id: { type: 'string', description: 'Task UUID' },
444
+ status: { type: 'string', enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'] },
445
+ progress_percentage: { type: 'number', minimum: 0, maximum: 100 },
446
+ progress_note: { type: 'string', description: 'Brief note about what was achieved' },
447
+ priority: { type: 'number', minimum: 1, maximum: 5 },
448
+ },
449
+ required: ['task_id'],
450
+ },
451
+ },
452
+ },
453
+ required: ['updates'],
454
+ },
455
+ },
456
+ {
457
+ name: 'batch_complete_tasks',
458
+ description: `Mark multiple tasks as completed at once.`,
459
+ inputSchema: {
460
+ type: 'object',
461
+ properties: {
462
+ completions: {
463
+ type: 'array',
464
+ description: 'Array of task completions',
465
+ items: {
466
+ type: 'object',
467
+ properties: {
468
+ task_id: { type: 'string', description: 'Task UUID' },
469
+ summary: { type: 'string', description: 'Optional completion summary' },
470
+ },
471
+ required: ['task_id'],
472
+ },
473
+ },
474
+ },
475
+ required: ['completions'],
476
+ },
477
+ },
478
+ {
479
+ name: 'add_subtask',
480
+ description: `Add a subtask to break down a larger task into smaller workable pieces.
481
+ Subtasks can be claimed and worked on independently by any agent.
482
+ Subtasks inherit the project from their parent task.
483
+ Max depth is 1 (subtasks cannot have their own subtasks).`,
484
+ inputSchema: {
485
+ type: 'object',
486
+ properties: {
487
+ parent_task_id: {
488
+ type: 'string',
489
+ description: 'UUID of the parent task to add subtask to',
490
+ },
491
+ title: {
492
+ type: 'string',
493
+ description: 'Subtask title',
494
+ },
495
+ description: {
496
+ type: 'string',
497
+ description: 'Detailed description (optional)',
498
+ },
499
+ priority: {
500
+ type: 'number',
501
+ minimum: 1,
502
+ maximum: 5,
503
+ description: 'Priority 1-5 (1 = highest). Defaults to parent task priority.',
504
+ },
505
+ estimated_minutes: {
506
+ type: 'number',
507
+ minimum: 1,
508
+ description: 'Estimated time to complete in minutes',
509
+ },
510
+ },
511
+ required: ['parent_task_id', 'title'],
512
+ },
513
+ },
514
+ {
515
+ name: 'get_subtasks',
516
+ description: `Get subtasks for a parent task with pagination.
517
+ Returns subtasks with aggregate completion stats.`,
518
+ inputSchema: {
519
+ type: 'object',
520
+ properties: {
521
+ parent_task_id: {
522
+ type: 'string',
523
+ description: 'UUID of the parent task',
524
+ },
525
+ status: {
526
+ type: 'string',
527
+ enum: ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'],
528
+ description: 'Filter by status (optional)',
529
+ },
530
+ limit: {
531
+ type: 'number',
532
+ description: 'Max subtasks to return (default: 20, max: 50)',
533
+ },
534
+ offset: {
535
+ type: 'number',
536
+ description: 'Number of subtasks to skip (default: 0)',
537
+ },
538
+ },
539
+ required: ['parent_task_id'],
540
+ },
541
+ },
542
+ ];