@ezmodo/mcp-server 0.13.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.
- package/README.md +305 -0
- package/config/development.js +20 -0
- package/config/endpoint-map.js +351 -0
- package/config/index.js +34 -0
- package/config/production.js +18 -0
- package/config/staging.js +18 -0
- package/handlers/access.js +141 -0
- package/handlers/activity.js +112 -0
- package/handlers/agents.js +95 -0
- package/handlers/ai-intelligence.js +55 -0
- package/handlers/attachments.js +30 -0
- package/handlers/catalogs.js +169 -0
- package/handlers/components.js +282 -0
- package/handlers/context-manifest.js +1150 -0
- package/handlers/decisions.js +114 -0
- package/handlers/designs.js +118 -0
- package/handlers/documents.js +227 -0
- package/handlers/entities.js +95 -0
- package/handlers/epics.js +190 -0
- package/handlers/facts.js +62 -0
- package/handlers/feature-flags.js +142 -0
- package/handlers/features.js +137 -0
- package/handlers/folders.js +127 -0
- package/handlers/git-context.js +917 -0
- package/handlers/github.js +72 -0
- package/handlers/graph.js +23 -0
- package/handlers/index.js +205 -0
- package/handlers/links.js +156 -0
- package/handlers/milestones.js +131 -0
- package/handlers/organizations.js +14 -0
- package/handlers/projects.js +122 -0
- package/handlers/recurring-tasks.js +33 -0
- package/handlers/tags.js +124 -0
- package/handlers/tasks.js +561 -0
- package/handlers/testing.js +116 -0
- package/handlers/todos.js +43 -0
- package/handlers/watchers.js +54 -0
- package/handlers/work-templates.js +32 -0
- package/index.js +175 -0
- package/lib/active-session.js +86 -0
- package/lib/auto-assign.js +93 -0
- package/lib/autolink.js +176 -0
- package/lib/changed-files.js +22 -0
- package/lib/env.js +45 -0
- package/lib/git-helpers.js +553 -0
- package/lib/git-utils.js +73 -0
- package/lib/http-client.js +164 -0
- package/lib/links-at-create.js +94 -0
- package/lib/local-cache.js +140 -0
- package/lib/logger.js +109 -0
- package/lib/manifest-loader.js +182 -0
- package/lib/manifest-query.js +686 -0
- package/lib/repo-config-dir.js +118 -0
- package/lib/version.js +10 -0
- package/lib/web-url.js +69 -0
- package/lib/worktree-tools.js +950 -0
- package/package.json +62 -0
- package/prompts/ai-workflow-automation.js +96 -0
- package/prompts/index.js +39 -0
- package/prompts/zephly-usage-guide-content.txt +631 -0
- package/prompts/zephly-usage-guide.js +119 -0
- package/tools/access-entity-types.js +28 -0
- package/tools/access.js +152 -0
- package/tools/activity.js +38 -0
- package/tools/agents.js +208 -0
- package/tools/ai-intelligence.js +111 -0
- package/tools/attachments.js +92 -0
- package/tools/catalogs.js +341 -0
- package/tools/components.js +249 -0
- package/tools/context-manifest.js +236 -0
- package/tools/decisions.js +168 -0
- package/tools/designs.js +222 -0
- package/tools/documents.js +287 -0
- package/tools/entities.js +223 -0
- package/tools/epics.js +267 -0
- package/tools/facts.js +70 -0
- package/tools/feature-flags.js +300 -0
- package/tools/features.js +246 -0
- package/tools/folders.js +122 -0
- package/tools/git-context.js +109 -0
- package/tools/github.js +172 -0
- package/tools/graph.js +70 -0
- package/tools/index.js +77 -0
- package/tools/link-params.js +93 -0
- package/tools/linkable-types.js +36 -0
- package/tools/links.js +199 -0
- package/tools/milestones.js +176 -0
- package/tools/organizations.js +23 -0
- package/tools/projects.js +172 -0
- package/tools/recurring-tasks.js +115 -0
- package/tools/tags.js +219 -0
- package/tools/task-item-schema.js +57 -0
- package/tools/task-type.js +33 -0
- package/tools/tasks.js +680 -0
- package/tools/testing.js +344 -0
- package/tools/todos.js +69 -0
- package/tools/watchers.js +81 -0
- package/tools/work-templates.js +96 -0
package/tools/testing.js
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Testing Tools
|
|
3
|
+
* MCP tools for managing test cases, test suites, and test runs
|
|
4
|
+
*
|
|
5
|
+
* Consolidated:
|
|
6
|
+
* - manage_test_case (create/update/delete/record_run)
|
|
7
|
+
* - manage_test_suite (create/update/delete/add_cases/remove_cases)
|
|
8
|
+
* - list_test_cases (get single or list with filters)
|
|
9
|
+
* - list_test_suites (get single or list with filters)
|
|
10
|
+
* - get_testing_summary (unchanged)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { LINKS_ARRAY_SCHEMA } from './link-params.js';
|
|
14
|
+
|
|
15
|
+
export const TESTING_TOOLS = [
|
|
16
|
+
{
|
|
17
|
+
name: 'manage_test_case',
|
|
18
|
+
description: 'Create, update, delete test cases, or record a test run. ' +
|
|
19
|
+
'Test cases belong to projects and define verification criteria with optional structured steps.',
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
action: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
enum: ['create', 'update', 'delete', 'record_run'],
|
|
26
|
+
description: 'Action to perform',
|
|
27
|
+
},
|
|
28
|
+
// --- Identifiers ---
|
|
29
|
+
projectId: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Project ID (required for all actions)',
|
|
32
|
+
},
|
|
33
|
+
caseId: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Test case ID (required for update, delete, record_run)',
|
|
36
|
+
},
|
|
37
|
+
// --- Create/update fields ---
|
|
38
|
+
title: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Test case title (required for create, optional for update)',
|
|
41
|
+
},
|
|
42
|
+
description: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Description of what this test case verifies. Used by create and update.',
|
|
45
|
+
},
|
|
46
|
+
preconditions: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'Preconditions before executing the test. Used by create and update.',
|
|
49
|
+
},
|
|
50
|
+
steps: {
|
|
51
|
+
type: 'array',
|
|
52
|
+
items: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
properties: {
|
|
55
|
+
instruction: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'The step instruction to execute',
|
|
58
|
+
},
|
|
59
|
+
expectedResult: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'The expected result after executing the step',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
description: 'Ordered list of test steps. Used by create and update.',
|
|
66
|
+
},
|
|
67
|
+
priority: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
enum: ['critical', 'high', 'medium', 'low'],
|
|
70
|
+
description: 'Priority level. Used by create and update.',
|
|
71
|
+
},
|
|
72
|
+
category: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Test category (e.g., "functional", "regression", "edge-case"). Used by create and update.',
|
|
75
|
+
},
|
|
76
|
+
links: LINKS_ARRAY_SCHEMA,
|
|
77
|
+
environments: {
|
|
78
|
+
type: 'array',
|
|
79
|
+
items: { type: 'string' },
|
|
80
|
+
description: 'Target environments (e.g., ["staging", "production"]). Used by create and update.',
|
|
81
|
+
},
|
|
82
|
+
lifecycleStatus: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
enum: ['active', 'needs_review', 'stale', 'deprecated'],
|
|
85
|
+
description: 'Lifecycle status. Used by create and update.',
|
|
86
|
+
},
|
|
87
|
+
retention: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
enum: ['transient', 'persistent'],
|
|
90
|
+
description: 'Retention type: transient (auto-cleaned) or persistent. Used by create and update.',
|
|
91
|
+
},
|
|
92
|
+
// --- Create-only fields ---
|
|
93
|
+
originTaskId: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
description: 'Origin task ID that generated this test case (create only)',
|
|
96
|
+
},
|
|
97
|
+
taskId: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
description: 'Deprecated: use originTaskId instead (create only)',
|
|
100
|
+
},
|
|
101
|
+
linkedTaskIds: {
|
|
102
|
+
type: 'array',
|
|
103
|
+
items: { type: 'string' },
|
|
104
|
+
description: 'Array of task IDs this test case is linked to (create only)',
|
|
105
|
+
},
|
|
106
|
+
epicId: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
description: 'Optional epic ID for context (create only)',
|
|
109
|
+
},
|
|
110
|
+
userName: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
description: 'Name of the user creating the test case. Used by create and record_run.',
|
|
113
|
+
},
|
|
114
|
+
// --- Record run fields ---
|
|
115
|
+
overallStatus: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
enum: ['pass', 'fail', 'skip', 'blocked'],
|
|
118
|
+
description: 'Overall result of the test run (required for record_run)',
|
|
119
|
+
},
|
|
120
|
+
stepResults: {
|
|
121
|
+
type: 'array',
|
|
122
|
+
items: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties: {
|
|
125
|
+
stepId: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
description: 'The ID of the step',
|
|
128
|
+
},
|
|
129
|
+
status: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
description: 'Result status for this step (pass/fail/skip/blocked)',
|
|
132
|
+
},
|
|
133
|
+
actualResult: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
description: 'What actually happened when the step was executed',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
description: 'Per-step execution results (record_run only)',
|
|
140
|
+
},
|
|
141
|
+
notes: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
description: 'Additional notes about the test run (record_run only)',
|
|
144
|
+
},
|
|
145
|
+
environment: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'Environment where the test was executed e.g. "staging" (record_run only)',
|
|
148
|
+
},
|
|
149
|
+
duration: {
|
|
150
|
+
type: 'number',
|
|
151
|
+
description: 'Duration of the test run in milliseconds (record_run only)',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
required: ['action', 'projectId'],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'manage_test_suite',
|
|
159
|
+
description: 'Create, update, delete test suites, or add/remove cases from a suite. ' +
|
|
160
|
+
'Suites are project-level groupings of test cases (e.g., regression, smoke, acceptance).',
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
action: {
|
|
165
|
+
type: 'string',
|
|
166
|
+
enum: ['create', 'update', 'delete', 'add_cases', 'remove_cases'],
|
|
167
|
+
description: 'Action to perform',
|
|
168
|
+
},
|
|
169
|
+
// --- Identifiers ---
|
|
170
|
+
projectId: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
description: 'Project ID (required for all actions)',
|
|
173
|
+
},
|
|
174
|
+
suiteId: {
|
|
175
|
+
type: 'string',
|
|
176
|
+
description: 'Test suite ID (required for update, delete, add_cases, remove_cases)',
|
|
177
|
+
},
|
|
178
|
+
// --- Create/update fields ---
|
|
179
|
+
title: {
|
|
180
|
+
type: 'string',
|
|
181
|
+
description: 'Suite title (required for create, optional for update)',
|
|
182
|
+
},
|
|
183
|
+
description: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: 'Suite description. Used by create and update.',
|
|
186
|
+
},
|
|
187
|
+
category: {
|
|
188
|
+
type: 'string',
|
|
189
|
+
enum: ['regression', 'smoke', 'acceptance', 'integration', 'custom'],
|
|
190
|
+
description: 'Suite category (defaults to "custom"). Used by create and update.',
|
|
191
|
+
},
|
|
192
|
+
links: LINKS_ARRAY_SCHEMA,
|
|
193
|
+
// --- Create-only fields ---
|
|
194
|
+
organizationId: {
|
|
195
|
+
type: 'string',
|
|
196
|
+
description: 'Organization ID — auto-resolved from API key if not provided (create only)',
|
|
197
|
+
},
|
|
198
|
+
userName: {
|
|
199
|
+
type: 'string',
|
|
200
|
+
description: 'Name of the user creating the suite (create only)',
|
|
201
|
+
},
|
|
202
|
+
// --- Add/remove cases fields ---
|
|
203
|
+
cases: {
|
|
204
|
+
type: 'array',
|
|
205
|
+
items: {
|
|
206
|
+
type: 'object',
|
|
207
|
+
properties: {
|
|
208
|
+
caseId: {
|
|
209
|
+
type: 'string',
|
|
210
|
+
description: 'The test case ID',
|
|
211
|
+
},
|
|
212
|
+
taskId: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description: 'Optional: the task ID the test case is linked to',
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
required: ['caseId'],
|
|
218
|
+
},
|
|
219
|
+
description: 'Array of test case references (required for add_cases, remove_cases)',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
required: ['action', 'projectId'],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'list_test_cases',
|
|
227
|
+
description: 'List test cases or get a single test case. ' +
|
|
228
|
+
'Provide testCaseId (+ projectId) for single lookup, or projectId with optional filters for listing.',
|
|
229
|
+
inputSchema: {
|
|
230
|
+
type: 'object',
|
|
231
|
+
properties: {
|
|
232
|
+
projectId: {
|
|
233
|
+
type: 'string',
|
|
234
|
+
description: 'Project ID (required)',
|
|
235
|
+
},
|
|
236
|
+
// --- Single lookup ---
|
|
237
|
+
testCaseId: {
|
|
238
|
+
type: 'string',
|
|
239
|
+
description: 'Test case ID for single lookup',
|
|
240
|
+
},
|
|
241
|
+
// --- List filters ---
|
|
242
|
+
originTaskId: {
|
|
243
|
+
type: 'string',
|
|
244
|
+
description: 'Filter by origin task ID',
|
|
245
|
+
},
|
|
246
|
+
taskId: {
|
|
247
|
+
type: 'string',
|
|
248
|
+
description: 'Deprecated: use originTaskId instead',
|
|
249
|
+
},
|
|
250
|
+
category: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
description: 'Filter by test category (e.g., "functional", "regression")',
|
|
253
|
+
},
|
|
254
|
+
priority: {
|
|
255
|
+
type: 'string',
|
|
256
|
+
enum: ['critical', 'high', 'medium', 'low'],
|
|
257
|
+
description: 'Filter by priority level',
|
|
258
|
+
},
|
|
259
|
+
status: {
|
|
260
|
+
type: 'string',
|
|
261
|
+
enum: ['not_run', 'pass', 'fail', 'skip', 'blocked'],
|
|
262
|
+
description: 'Filter by latest run status',
|
|
263
|
+
},
|
|
264
|
+
epicId: {
|
|
265
|
+
type: 'string',
|
|
266
|
+
description: 'Filter by epic ID',
|
|
267
|
+
},
|
|
268
|
+
lifecycleStatus: {
|
|
269
|
+
type: 'string',
|
|
270
|
+
enum: ['active', 'needs_review', 'stale', 'deprecated'],
|
|
271
|
+
description: 'Filter by lifecycle status',
|
|
272
|
+
},
|
|
273
|
+
retention: {
|
|
274
|
+
type: 'string',
|
|
275
|
+
enum: ['transient', 'persistent'],
|
|
276
|
+
description: 'Filter by retention type',
|
|
277
|
+
},
|
|
278
|
+
limit: {
|
|
279
|
+
type: 'number',
|
|
280
|
+
description: 'Max results per page (default 50, max 200)',
|
|
281
|
+
},
|
|
282
|
+
cursor: {
|
|
283
|
+
type: 'string',
|
|
284
|
+
description: 'Pagination cursor from a previous response',
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
required: ['projectId'],
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: 'list_test_suites',
|
|
292
|
+
description: 'List test suites or get a single test suite. ' +
|
|
293
|
+
'Provide testSuiteId (+ projectId) for single lookup, or projectId with optional filters for listing.',
|
|
294
|
+
inputSchema: {
|
|
295
|
+
type: 'object',
|
|
296
|
+
properties: {
|
|
297
|
+
projectId: {
|
|
298
|
+
type: 'string',
|
|
299
|
+
description: 'Project ID (required)',
|
|
300
|
+
},
|
|
301
|
+
// --- Single lookup ---
|
|
302
|
+
testSuiteId: {
|
|
303
|
+
type: 'string',
|
|
304
|
+
description: 'Test suite ID for single lookup',
|
|
305
|
+
},
|
|
306
|
+
// --- List filters ---
|
|
307
|
+
category: {
|
|
308
|
+
type: 'string',
|
|
309
|
+
enum: ['regression', 'smoke', 'acceptance', 'integration', 'custom'],
|
|
310
|
+
description: 'Filter by suite category',
|
|
311
|
+
},
|
|
312
|
+
limit: {
|
|
313
|
+
type: 'number',
|
|
314
|
+
description: 'Max results per page (default 50, max 200)',
|
|
315
|
+
},
|
|
316
|
+
cursor: {
|
|
317
|
+
type: 'string',
|
|
318
|
+
description: 'Pagination cursor from a previous response',
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
required: ['projectId'],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
name: 'get_testing_summary',
|
|
326
|
+
description: 'Get aggregate test statistics for a project (or a specific task) ' +
|
|
327
|
+
'including pass/fail counts, coverage, recent run history, and ' +
|
|
328
|
+
'per-environment breakdowns.',
|
|
329
|
+
inputSchema: {
|
|
330
|
+
type: 'object',
|
|
331
|
+
properties: {
|
|
332
|
+
projectId: {
|
|
333
|
+
type: 'string',
|
|
334
|
+
description: 'Project ID (required)',
|
|
335
|
+
},
|
|
336
|
+
taskId: {
|
|
337
|
+
type: 'string',
|
|
338
|
+
description: 'Optional: filter summary to a specific task',
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
required: ['projectId'],
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
];
|
package/tools/todos.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Todo Tools
|
|
3
|
+
* MCP tools for managing personal todos (todo list)
|
|
4
|
+
*
|
|
5
|
+
* Todos are lightweight personal tasks for quick capture.
|
|
6
|
+
* They can later be promoted to full project tasks via move_to_project.
|
|
7
|
+
*
|
|
8
|
+
* Consolidated: manage_todo (create/complete/move_to_project) + list_todos
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export const TODO_TOOLS = [
|
|
12
|
+
{
|
|
13
|
+
name: 'manage_todo',
|
|
14
|
+
description: 'Create, complete, or promote personal todos. ' +
|
|
15
|
+
'Todos are lightweight tasks for quick capture that can be promoted to project tasks.',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
action: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
enum: ['create', 'complete', 'move_to_project'],
|
|
22
|
+
description: 'Action to perform',
|
|
23
|
+
},
|
|
24
|
+
// --- Identifiers ---
|
|
25
|
+
todoId: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Todo ID (required for complete, move_to_project)',
|
|
28
|
+
},
|
|
29
|
+
// --- Create fields ---
|
|
30
|
+
title: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Todo title (required for create)',
|
|
33
|
+
},
|
|
34
|
+
description: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'Optional description or notes — supports markdown (create only)',
|
|
37
|
+
},
|
|
38
|
+
// --- Move to project fields ---
|
|
39
|
+
projectId: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Target project ID (required for move_to_project)',
|
|
42
|
+
},
|
|
43
|
+
epicId: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Optional epic to assign the task to (move_to_project only)',
|
|
46
|
+
},
|
|
47
|
+
componentId: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Optional component to assign the task to (move_to_project only)',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['action'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'list_todos',
|
|
57
|
+
description: 'List personal todos from your todo list. Returns active todos by default.',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
status: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
enum: ['active', 'completed', 'all'],
|
|
64
|
+
description: 'Filter by status (default: active)',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watching Tools
|
|
3
|
+
* MCP tools for task subscriptions and the notification inbox (E-41)
|
|
4
|
+
*
|
|
5
|
+
* NOTE: none of these take a userId. The acting user is the API key's owner,
|
|
6
|
+
* resolved server-side. A userId parameter would let an agent subscribe a
|
|
7
|
+
* colleague to anything.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const WATCHER_TOOLS = [
|
|
11
|
+
{
|
|
12
|
+
name: 'manage_watch',
|
|
13
|
+
description: 'Watch or unwatch a task. Watching subscribes YOU (the API key owner) to notifications ' +
|
|
14
|
+
'about the task: status changes and new comments. Use this for "watch this task for me" or ' +
|
|
15
|
+
'"stop notifying me about this". Both actions are idempotent. ' +
|
|
16
|
+
'Note you are subscribed automatically to tasks you are assigned, own, or comment on — ' +
|
|
17
|
+
'this tool is for following work that is not yours.',
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
action: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
enum: ['watch', 'unwatch'],
|
|
24
|
+
description: 'Whether to start or stop watching the task',
|
|
25
|
+
},
|
|
26
|
+
taskId: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'The task ID to watch or unwatch (required)',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ['action', 'taskId'],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'list_watched',
|
|
36
|
+
description: 'List the tasks you are watching, with their current status, priority, project and ' +
|
|
37
|
+
'when each last changed. Answers "what is happening on the work I follow?" in one call — ' +
|
|
38
|
+
'do NOT follow this with get_task per row. Each result also carries `reason`, why you are ' +
|
|
39
|
+
'subscribed (manual, assignee, owner or commenter). Results are ordered most-recently-changed ' +
|
|
40
|
+
'first, and PAGED: read `total` and `hasMore` rather than the row count — a short page and the ' +
|
|
41
|
+
'end of the list look identical otherwise, which is how you conclude a subscription is gone.',
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
properties: {
|
|
45
|
+
organizationId: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
description: 'Organization to list watched tasks for (required)',
|
|
48
|
+
},
|
|
49
|
+
limit: {
|
|
50
|
+
type: 'number',
|
|
51
|
+
description: 'Page size (default 50, max 200)',
|
|
52
|
+
},
|
|
53
|
+
offset: {
|
|
54
|
+
type: 'number',
|
|
55
|
+
description: 'Rows to skip, for paging past the first page (default 0)',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
required: ['organizationId'],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'list_notifications',
|
|
63
|
+
description: 'List your in-app notifications — mentions, replies, assignments, status changes on ' +
|
|
64
|
+
'watched tasks. Defaults to UNREAD only, which is usually what "what have I missed?" means. ' +
|
|
65
|
+
'Pass unreadOnly: false to include already-read history.',
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
unreadOnly: {
|
|
70
|
+
type: 'boolean',
|
|
71
|
+
description: 'Only unread notifications (default: true)',
|
|
72
|
+
default: true,
|
|
73
|
+
},
|
|
74
|
+
limit: {
|
|
75
|
+
type: 'number',
|
|
76
|
+
description: 'Maximum results (default 20, max 100)',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work Template Tools
|
|
3
|
+
* MCP tools for E-211 task/epic templates (work_templates).
|
|
4
|
+
*
|
|
5
|
+
* A work template is a reusable blueprint for a task or an epic (a `kind`). A
|
|
6
|
+
* task template carries a taskBlueprint; an epic template carries an
|
|
7
|
+
* epicBlueprint with a nested child-task list. Templates are org-level (or
|
|
8
|
+
* project-scoped) and are instantiated either manually (action "instantiate") or
|
|
9
|
+
* by a recurring task schedule (manage_recurring_task with a templateId).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { TASK_TYPE_PROPERTY } from './task-type.js';
|
|
13
|
+
|
|
14
|
+
const TASK_BLUEPRINT_SCHEMA = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
description: 'Reusable task shape (used when kind="task", and as each child of an epic template).',
|
|
17
|
+
properties: {
|
|
18
|
+
title: { type: 'string' },
|
|
19
|
+
description: { type: 'string' },
|
|
20
|
+
steps: { type: 'array', items: { type: 'string' } },
|
|
21
|
+
taskType: TASK_TYPE_PROPERTY,
|
|
22
|
+
priority: { type: 'string', enum: ['low', 'medium', 'high', 'urgent'] },
|
|
23
|
+
componentId: { type: 'string' },
|
|
24
|
+
tagIds: { type: 'array', items: { type: 'string' } },
|
|
25
|
+
},
|
|
26
|
+
required: ['title'],
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const EPIC_BLUEPRINT_SCHEMA = {
|
|
30
|
+
type: 'object',
|
|
31
|
+
description: 'Reusable epic shape (used when kind="epic"), including its child tasks.',
|
|
32
|
+
properties: {
|
|
33
|
+
title: { type: 'string' },
|
|
34
|
+
description: { type: 'string' },
|
|
35
|
+
status: { type: 'string' },
|
|
36
|
+
color: { type: 'string' },
|
|
37
|
+
tasks: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
items: TASK_BLUEPRINT_SCHEMA,
|
|
40
|
+
description: 'Child tasks created under the epic on instantiation.',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ['title'],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const WORK_TEMPLATE_TOOLS = [
|
|
47
|
+
{
|
|
48
|
+
name: 'manage_work_template',
|
|
49
|
+
description: 'Create, update, delete, list, get, or instantiate a work template (E-211) — a ' +
|
|
50
|
+
'reusable blueprint for a task or an epic. "instantiate" creates a real task (kind=task) or an ' +
|
|
51
|
+
'epic plus its child tasks (kind=epic) into a project, applying optional overrides. Templates ' +
|
|
52
|
+
'can also be referenced by a recurring schedule (manage_recurring_task templateId).',
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {
|
|
56
|
+
action: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
enum: ['create', 'update', 'delete', 'list', 'get', 'instantiate'],
|
|
59
|
+
description: 'Action to perform. "list" needs organizationId (optional kind filter); ' +
|
|
60
|
+
'"get"/"update"/"delete"/"instantiate" need templateId. "create" needs organizationId, ' +
|
|
61
|
+
'kind, name, and the matching blueprint.',
|
|
62
|
+
},
|
|
63
|
+
// --- Identifiers ---
|
|
64
|
+
organizationId: { type: 'string', description: 'Organization ID (required for create, list).' },
|
|
65
|
+
templateId: { type: 'string', description: 'Template ID (required for get, update, delete, instantiate).' },
|
|
66
|
+
projectId: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Scope the template to a project (create/update; omit = org-wide). For ' +
|
|
69
|
+
'instantiate this is REQUIRED — the project the task/epic is created into.',
|
|
70
|
+
},
|
|
71
|
+
// --- Create / update fields ---
|
|
72
|
+
kind: { type: 'string', enum: ['task', 'epic'], description: 'Template kind (required for create).' },
|
|
73
|
+
name: { type: 'string', description: 'Template name (required for create).' },
|
|
74
|
+
description: { type: 'string', description: 'What the template is for.' },
|
|
75
|
+
category: { type: 'string', description: 'Org-scoped categorization.' },
|
|
76
|
+
taskBlueprint: TASK_BLUEPRINT_SCHEMA,
|
|
77
|
+
epicBlueprint: EPIC_BLUEPRINT_SCHEMA,
|
|
78
|
+
// --- Instantiate overrides ---
|
|
79
|
+
title: { type: 'string', description: 'Instantiate: override the blueprint title.' },
|
|
80
|
+
epicId: { type: 'string', description: 'Instantiate (task kind): attach the new task to this epic.' },
|
|
81
|
+
milestoneId: { type: 'string', description: 'Instantiate (epic kind): link the new epic to this milestone.' },
|
|
82
|
+
componentId: { type: 'string', description: 'Instantiate (task kind): override component.' },
|
|
83
|
+
priority: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['low', 'medium', 'high', 'urgent'],
|
|
86
|
+
description: 'Instantiate: override priority.',
|
|
87
|
+
},
|
|
88
|
+
assigneeId: { type: 'string', description: 'Instantiate (task kind): assignee ID.' },
|
|
89
|
+
assigneeName: { type: 'string', description: 'Instantiate (task kind): assignee name.' },
|
|
90
|
+
assigneeType: { type: 'string', enum: ['human', 'ai'], description: 'Instantiate (task kind): assignee type.' },
|
|
91
|
+
tagIds: { type: 'array', items: { type: 'string' }, description: 'Instantiate: tag IDs to apply.' },
|
|
92
|
+
},
|
|
93
|
+
required: ['action'],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
];
|