@dod/planax-mcp 0.1.4 → 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.
- package/README.md +26 -18
- package/dist/api-client.js +11 -4
- package/dist/server.js +4 -1
- package/dist/tools/comment.tools.js +27 -5
- package/dist/tools/document.tools.js +278 -134
- package/dist/tools/folder.tools.js +40 -17
- package/dist/tools/plan-items.tools.js +8 -4
- package/dist/tools/plan.tools.js +53 -22
- package/dist/tools/project.tools.js +22 -0
- package/dist/tools/resource-link.tools.js +14 -7
- package/dist/tools/shared.js +23 -0
- package/dist/tools/task.tools.js +80 -64
- package/dist/tools/workspace.tools.js +59 -0
- package/package.json +5 -3
|
@@ -25,13 +25,24 @@ export function register({ server, apiClient }) {
|
|
|
25
25
|
- Phase: 프로젝트 단계/일정 (언제/무엇을)
|
|
26
26
|
- Folder: 문서 저장 위치 (어디에)
|
|
27
27
|
|
|
28
|
-
**
|
|
28
|
+
**Filters:** With search or parentFolderId you get a FLAT list (no nesting) of matching folders instead of the tree.
|
|
29
|
+
|
|
30
|
+
**Returns:** Root folders with nested subFolders as tree structure.
|
|
31
|
+
Each folder: id, name, description, color, parentFolderId, folderKey, subFolders, subFolderCount, documentCount, copyStatus, copyJob`,
|
|
29
32
|
inputSchema: {
|
|
30
33
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
34
|
+
search: z.string().optional().describe('Search folder names (returns a flat list)'),
|
|
35
|
+
parentFolderId: z.string().uuid().optional().describe('Only direct children of this folder (returns a flat list)'),
|
|
31
36
|
},
|
|
32
|
-
}, async ({ projectId }) => {
|
|
37
|
+
}, async ({ projectId, search, parentFolderId }) => {
|
|
33
38
|
try {
|
|
34
|
-
const
|
|
39
|
+
const params = new URLSearchParams();
|
|
40
|
+
if (search)
|
|
41
|
+
params.append('search', search);
|
|
42
|
+
if (parentFolderId)
|
|
43
|
+
params.append('parentFolderId', parentFolderId);
|
|
44
|
+
const queryString = params.toString();
|
|
45
|
+
const result = await apiClient.get(`/projects/${projectId}/folders${queryString ? `?${queryString}` : ''}`);
|
|
35
46
|
return successResponse(result);
|
|
36
47
|
}
|
|
37
48
|
catch (error) {
|
|
@@ -39,7 +50,10 @@ export function register({ server, apiClient }) {
|
|
|
39
50
|
}
|
|
40
51
|
});
|
|
41
52
|
server.registerTool('folder_get', {
|
|
42
|
-
description:
|
|
53
|
+
description: `Get a specific folder by ID.
|
|
54
|
+
|
|
55
|
+
**Returns:** { id, name, description, color, parentFolderId, folderKey, subFolderCount, documentCount, copyStatus, copyJob, createdAt, updatedAt }.
|
|
56
|
+
copyJob shows the progress of a folder copy started in the web app.`,
|
|
43
57
|
inputSchema: {
|
|
44
58
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
45
59
|
folderId: z.string().uuid().describe('Folder ID (UUID)'),
|
|
@@ -72,21 +86,25 @@ export function register({ server, apiClient }) {
|
|
|
72
86
|
|
|
73
87
|
**Colors:** blue, green, yellow, orange, red, purple, pink, gray
|
|
74
88
|
|
|
75
|
-
**
|
|
89
|
+
**Note:** Viewers cannot create folders.
|
|
90
|
+
|
|
91
|
+
**Returns:** Created folder with id, name, color, folderKey and hierarchy info`,
|
|
76
92
|
inputSchema: {
|
|
77
93
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
78
94
|
name: z.string().min(1).max(255).describe('Folder name'),
|
|
79
95
|
description: z.string().optional().describe('Folder description'),
|
|
80
96
|
color: FolderColorSchema.optional().describe('Folder color (blue, green, yellow, orange, red, purple, pink, gray)'),
|
|
81
97
|
parentFolderId: z.string().uuid().optional().describe('Parent folder ID for creating subfolder (omit for root folder)'),
|
|
98
|
+
folderKey: z.string().optional().describe('Folder key / number shown with the name (e.g. "01.01")'),
|
|
82
99
|
},
|
|
83
|
-
}, async ({ projectId, name, description, color, parentFolderId }) => {
|
|
100
|
+
}, async ({ projectId, name, description, color, parentFolderId, folderKey }) => {
|
|
84
101
|
try {
|
|
85
102
|
const result = await apiClient.post(`/projects/${projectId}/folders`, {
|
|
86
103
|
name,
|
|
87
104
|
description,
|
|
88
105
|
color,
|
|
89
106
|
parentFolderId,
|
|
107
|
+
folderKey,
|
|
90
108
|
});
|
|
91
109
|
const folderType = parentFolderId ? 'Subfolder' : 'Folder';
|
|
92
110
|
return successResponse(result, `${folderType} "${name}" created successfully`);
|
|
@@ -101,24 +119,27 @@ export function register({ server, apiClient }) {
|
|
|
101
119
|
**Usage:**
|
|
102
120
|
- 이름/설명/색상 변경
|
|
103
121
|
- 다른 폴더 하위로 이동 (parentFolderId 변경)
|
|
104
|
-
|
|
122
|
+
|
|
123
|
+
**Not supported:** moving a folder back to the root, or clearing its description/color.
|
|
124
|
+
The backend currently ignores null for these fields (tracked as a separate bug), so null is not accepted here.
|
|
125
|
+
|
|
126
|
+
**Rules:**
|
|
127
|
+
- A folder that is being copied cannot be changed (400)
|
|
128
|
+
- A folder cannot become its own parent or move under its own subfolder (400)
|
|
105
129
|
|
|
106
130
|
**Examples:**
|
|
107
131
|
1. 이름/색상 변경:
|
|
108
132
|
{ projectId: "...", folderId: "...", name: "New Name", color: "purple" }
|
|
109
133
|
|
|
110
134
|
2. 다른 폴더로 이동:
|
|
111
|
-
{ projectId: "...", folderId: "...", parentFolderId: "new-parent-uuid" }
|
|
112
|
-
|
|
113
|
-
3. Root로 이동:
|
|
114
|
-
{ projectId: "...", folderId: "...", parentFolderId: null }`,
|
|
135
|
+
{ projectId: "...", folderId: "...", parentFolderId: "new-parent-uuid" }`,
|
|
115
136
|
inputSchema: {
|
|
116
137
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
117
138
|
folderId: z.string().uuid().describe('Folder ID (UUID)'),
|
|
118
139
|
name: z.string().min(1).max(255).optional().describe('New folder name'),
|
|
119
|
-
description: z.string().
|
|
120
|
-
color: FolderColorSchema.
|
|
121
|
-
parentFolderId: z.string().uuid().
|
|
140
|
+
description: z.string().optional().describe('New folder description'),
|
|
141
|
+
color: FolderColorSchema.optional().describe('New folder color'),
|
|
142
|
+
parentFolderId: z.string().uuid().optional().describe('Move folder under this parent folder'),
|
|
122
143
|
},
|
|
123
144
|
}, async ({ projectId, folderId, name, description, color, parentFolderId }) => {
|
|
124
145
|
try {
|
|
@@ -146,6 +167,8 @@ export function register({ server, apiClient }) {
|
|
|
146
167
|
- 하위 폴더가 있으면 삭제 불가
|
|
147
168
|
- 문서가 있으면 삭제 불가
|
|
148
169
|
|
|
170
|
+
- 복사 중인 폴더는 삭제 불가 (400)
|
|
171
|
+
|
|
149
172
|
**Tip:** 하위 항목을 먼저 이동하거나 삭제 후 폴더 삭제`,
|
|
150
173
|
inputSchema: {
|
|
151
174
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
@@ -164,14 +187,14 @@ export function register({ server, apiClient }) {
|
|
|
164
187
|
server.registerTool('folder_get_path', {
|
|
165
188
|
description: `Get the breadcrumb path for a folder.
|
|
166
189
|
|
|
167
|
-
**Returns:**
|
|
190
|
+
**Returns:** { path: [{ id, name }] } from the root folder down to the target folder
|
|
168
191
|
|
|
169
192
|
**Example Response:**
|
|
170
|
-
[
|
|
193
|
+
{ path: [
|
|
171
194
|
{ "id": "root-uuid", "name": "Research Documents" },
|
|
172
195
|
{ "id": "sub-uuid", "name": "Literature Review" },
|
|
173
196
|
{ "id": "target-uuid", "name": "2024 Papers" }
|
|
174
|
-
]`,
|
|
197
|
+
] }`,
|
|
175
198
|
inputSchema: {
|
|
176
199
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
177
200
|
folderId: z.string().uuid().describe('Folder ID (UUID)'),
|
|
@@ -26,7 +26,9 @@ export function register({ server, apiClient }) {
|
|
|
26
26
|
2. Create task at root level:
|
|
27
27
|
{ projectId: "...", title: "Initial planning" }
|
|
28
28
|
|
|
29
|
-
**
|
|
29
|
+
**Note:** Only title and description are set here. Set assignee, dates or priority afterwards with task_update.
|
|
30
|
+
|
|
31
|
+
**Returns:** { id, title, description, status, phaseTaskId, taskOrder }`,
|
|
30
32
|
inputSchema: {
|
|
31
33
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
32
34
|
title: z.string().min(1).max(255).describe('Task title (required)'),
|
|
@@ -66,7 +68,9 @@ export function register({ server, apiClient }) {
|
|
|
66
68
|
2. Create document at root level:
|
|
67
69
|
{ projectId: "...", title: "Project Overview", description: "Main overview doc" }
|
|
68
70
|
|
|
69
|
-
**
|
|
71
|
+
**Note:** Creates a DRAFT document (file name = title). Set dates or assignee afterwards with document_update.
|
|
72
|
+
|
|
73
|
+
**Returns:** { id, title, description, status, phaseDocumentId, documentOrder }`,
|
|
70
74
|
inputSchema: {
|
|
71
75
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
72
76
|
title: z.string().min(1).max(255).describe('Document title (required)'),
|
|
@@ -110,7 +114,7 @@ export function register({ server, apiClient }) {
|
|
|
110
114
|
3. Move task to different phase:
|
|
111
115
|
{ projectId: "...", taskId: "task-uuid", phaseId: "new-phase-uuid" }
|
|
112
116
|
|
|
113
|
-
**Returns:**
|
|
117
|
+
**Returns:** { phaseId }`,
|
|
114
118
|
inputSchema: {
|
|
115
119
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
116
120
|
taskId: z.string().uuid().describe('Task ID (UUID)'),
|
|
@@ -147,7 +151,7 @@ export function register({ server, apiClient }) {
|
|
|
147
151
|
3. Move document to different phase:
|
|
148
152
|
{ projectId: "...", documentId: "doc-uuid", phaseId: "new-phase-uuid" }
|
|
149
153
|
|
|
150
|
-
**Returns:**
|
|
154
|
+
**Returns:** { phaseId }`,
|
|
151
155
|
inputSchema: {
|
|
152
156
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
153
157
|
documentId: z.string().uuid().describe('Document ID (UUID)'),
|
package/dist/tools/plan.tools.js
CHANGED
|
@@ -51,10 +51,15 @@ export function register({ server, apiClient }) {
|
|
|
51
51
|
2. Create from template:
|
|
52
52
|
{ projectId: "...", templateId: "template-uuid" }
|
|
53
53
|
|
|
54
|
+
**Note:**
|
|
55
|
+
- Only project managers can create a plan. If the project already has a plan, the backend returns 409.
|
|
56
|
+
- Find template ids with workspace_list_templates. A template plan also creates its folders and documents.
|
|
57
|
+
- Omit templateId (or pass "blank") for an empty plan.
|
|
58
|
+
|
|
54
59
|
**Returns:** Created plan object with initial structure`,
|
|
55
60
|
inputSchema: {
|
|
56
61
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
57
|
-
templateId: z.string().
|
|
62
|
+
templateId: z.string().max(50).nullable().optional().describe('Template id from workspace_list_templates, or "blank" / omit for an empty plan'),
|
|
58
63
|
},
|
|
59
64
|
}, async ({ projectId, templateId }) => {
|
|
60
65
|
try {
|
|
@@ -79,11 +84,10 @@ export function register({ server, apiClient }) {
|
|
|
79
84
|
1. Get full plan tree:
|
|
80
85
|
{ projectId: "..." }
|
|
81
86
|
|
|
82
|
-
**Returns:**
|
|
83
|
-
|
|
84
|
-
- tasks
|
|
85
|
-
|
|
86
|
-
- root-level tasks and documents`,
|
|
87
|
+
**Returns:** { planId, templateId, phases }
|
|
88
|
+
Each phase: id, name, description, phaseOrder, status, level, startDate, expectedEndDate,
|
|
89
|
+
children (sub-phases), tasks [{ id, title, status, assignee, startDate, dueDate, ... }], documents [{ id, title, status, folderId, ... }].
|
|
90
|
+
Tasks and documents not linked to any phase are NOT in this tree; use plan_get_root_items.`,
|
|
87
91
|
inputSchema: {
|
|
88
92
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
89
93
|
},
|
|
@@ -135,11 +139,8 @@ export function register({ server, apiClient }) {
|
|
|
135
139
|
1. List all phases:
|
|
136
140
|
{ projectId: "..." }
|
|
137
141
|
|
|
138
|
-
**Returns:** Flat array of all phases
|
|
139
|
-
|
|
140
|
-
- parentPhaseId
|
|
141
|
-
- path (breadcrumb info)
|
|
142
|
-
- depth level`,
|
|
142
|
+
**Returns:** Flat array of all phases: { id, name, level, path (breadcrumb string), parentPhaseId }.
|
|
143
|
+
No status here; use plan_get_tree or plan_list_root_phases for status.`,
|
|
143
144
|
inputSchema: {
|
|
144
145
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
145
146
|
},
|
|
@@ -188,7 +189,9 @@ export function register({ server, apiClient }) {
|
|
|
188
189
|
**Usage:**
|
|
189
190
|
- Creates a phase at root level or as a sub-phase under another phase
|
|
190
191
|
- Phases organize tasks and documents hierarchically
|
|
191
|
-
-
|
|
192
|
+
- Maximum depth is 3 levels; creating a 4th level fails with 400
|
|
193
|
+
- Only project managers can create phases
|
|
194
|
+
- Dates are YYYY-MM-DD; an unparsable date is silently dropped (the phase is created without it)
|
|
192
195
|
|
|
193
196
|
**Examples:**
|
|
194
197
|
1. Create root phase:
|
|
@@ -227,13 +230,17 @@ export function register({ server, apiClient }) {
|
|
|
227
230
|
|
|
228
231
|
**When to use:**
|
|
229
232
|
- Rename a phase
|
|
230
|
-
- Update phase status
|
|
231
|
-
- Set or
|
|
232
|
-
|
|
233
|
+
- Update phase status: pending -> in_progress -> completed (blocked = on hold)
|
|
234
|
+
- Set, change or clear phase dates (start, expected end, actual end)
|
|
235
|
+
|
|
236
|
+
**Note:**
|
|
237
|
+
- Phase status is recalculated automatically when tasks/documents in the phase change, so a status you set by hand may be overwritten.
|
|
238
|
+
- Only project managers can update phases.
|
|
239
|
+
- Dates are YYYY-MM-DD. To clear a date send an empty string "" (null is ignored by the backend).
|
|
233
240
|
|
|
234
241
|
**Examples:**
|
|
235
242
|
1. Update status:
|
|
236
|
-
{ projectId: "...", phaseId: "...", status: "
|
|
243
|
+
{ projectId: "...", phaseId: "...", status: "in_progress" }
|
|
237
244
|
|
|
238
245
|
2. Rename phase:
|
|
239
246
|
{ projectId: "...", phaseId: "...", name: "Updated Phase Name" }
|
|
@@ -250,19 +257,22 @@ export function register({ server, apiClient }) {
|
|
|
250
257
|
{
|
|
251
258
|
projectId: "...",
|
|
252
259
|
phaseId: "...",
|
|
253
|
-
status: "
|
|
260
|
+
status: "completed",
|
|
254
261
|
actualEndDate: "2024-03-10"
|
|
255
262
|
}
|
|
256
263
|
|
|
264
|
+
5. Clear the start date:
|
|
265
|
+
{ projectId: "...", phaseId: "...", startDate: "" }
|
|
266
|
+
|
|
257
267
|
**Returns:** Updated phase object`,
|
|
258
268
|
inputSchema: {
|
|
259
269
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
260
270
|
phaseId: z.string().uuid().describe('Phase ID (UUID)'),
|
|
261
271
|
name: z.string().min(1).max(255).optional().describe('New phase name'),
|
|
262
|
-
startDate: z.string().
|
|
263
|
-
expectedEndDate: z.string().
|
|
264
|
-
actualEndDate: z.string().
|
|
265
|
-
status: z.enum(['
|
|
272
|
+
startDate: z.string().optional().describe('Start date (YYYY-MM-DD). Send "" to clear'),
|
|
273
|
+
expectedEndDate: z.string().optional().describe('Expected end date (YYYY-MM-DD). Send "" to clear'),
|
|
274
|
+
actualEndDate: z.string().optional().describe('Actual end date (YYYY-MM-DD). Send "" to clear'),
|
|
275
|
+
status: z.enum(['pending', 'in_progress', 'completed', 'blocked']).optional().describe('Phase status (blocked = on hold)'),
|
|
266
276
|
},
|
|
267
277
|
}, async ({ projectId, phaseId, name, startDate, expectedEndDate, actualEndDate, status }) => {
|
|
268
278
|
try {
|
|
@@ -291,12 +301,13 @@ export function register({ server, apiClient }) {
|
|
|
291
301
|
- Deletes the specified phase and all its sub-phases recursively
|
|
292
302
|
- Task and Document links are removed (but Tasks/Documents themselves are preserved)
|
|
293
303
|
- This action cannot be undone
|
|
304
|
+
- Project managers or admins only
|
|
294
305
|
|
|
295
306
|
**Examples:**
|
|
296
307
|
1. Delete a phase:
|
|
297
308
|
{ projectId: "...", phaseId: "..." }
|
|
298
309
|
|
|
299
|
-
**Returns:**
|
|
310
|
+
**Returns:** { success, message }`,
|
|
300
311
|
inputSchema: {
|
|
301
312
|
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
302
313
|
phaseId: z.string().uuid().describe('Phase ID to delete (UUID)'),
|
|
@@ -310,4 +321,24 @@ export function register({ server, apiClient }) {
|
|
|
310
321
|
return errorResponse(error);
|
|
311
322
|
}
|
|
312
323
|
});
|
|
324
|
+
server.registerTool('plan_get_root_items', {
|
|
325
|
+
description: `Get tasks and documents that are not linked to any phase.
|
|
326
|
+
|
|
327
|
+
**When to use:**
|
|
328
|
+
- Find items missing from the plan structure (plan_get_tree does not include them)
|
|
329
|
+
- Then link them with plan_link_task_to_phase / plan_link_document_to_phase
|
|
330
|
+
|
|
331
|
+
**Returns:** { tasks: [...], documents: [...] }`,
|
|
332
|
+
inputSchema: {
|
|
333
|
+
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
334
|
+
},
|
|
335
|
+
}, async ({ projectId }) => {
|
|
336
|
+
try {
|
|
337
|
+
const result = await apiClient.get(`/projects/${projectId}/plan/root-items`);
|
|
338
|
+
return successResponse(result);
|
|
339
|
+
}
|
|
340
|
+
catch (error) {
|
|
341
|
+
return errorResponse(error);
|
|
342
|
+
}
|
|
343
|
+
});
|
|
313
344
|
}
|
|
@@ -36,4 +36,26 @@ export function register({ server, apiClient }) {
|
|
|
36
36
|
return errorResponse(error);
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
+
server.registerTool('project_list_members', {
|
|
40
|
+
description: `List members of a project.
|
|
41
|
+
|
|
42
|
+
**When to use:**
|
|
43
|
+
- Find user ids for task_create / task_update / task_assign (assignee must be a project member)
|
|
44
|
+
- Find user ids to mention in comments: write @{userId} in comment_create content
|
|
45
|
+
- Check who can be assigned or mentioned
|
|
46
|
+
|
|
47
|
+
**Returns:** Array of members: { id (membership id), userId, user { id, name, email, ... }, roleId, role { name, ... }, expiresAt }.
|
|
48
|
+
Use userId (not id) for assignee and mention.`,
|
|
49
|
+
inputSchema: {
|
|
50
|
+
projectId: z.string().uuid().describe('Project ID (UUID)'),
|
|
51
|
+
},
|
|
52
|
+
}, async ({ projectId }) => {
|
|
53
|
+
try {
|
|
54
|
+
const result = await apiClient.get(`/projects/${projectId}/members`);
|
|
55
|
+
return successResponse(result);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
return errorResponse(error);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
39
61
|
}
|
|
@@ -12,7 +12,7 @@ import { successResponse, errorResponse } from './types.js';
|
|
|
12
12
|
* - Get reference relations
|
|
13
13
|
*
|
|
14
14
|
* Supported link types:
|
|
15
|
-
* - blocks (Task
|
|
15
|
+
* - blocks (Task/Document ↔ Task/Document): source must be completed before target
|
|
16
16
|
* - clones (Task → Task): Task was cloned from target
|
|
17
17
|
* - duplicates (Task → Task): Task is duplicate of target
|
|
18
18
|
* - relates_to (Any → Any): Resources are related
|
|
@@ -37,6 +37,11 @@ export function register({ server, apiClient }) {
|
|
|
37
37
|
- \`references\`: Any → Any (source references target)
|
|
38
38
|
- \`supersedes\`: Document → Document only (source replaces target)
|
|
39
39
|
|
|
40
|
+
**Other rules:**
|
|
41
|
+
- A resource cannot be linked to itself
|
|
42
|
+
- The same link twice returns 409
|
|
43
|
+
- You must be a project member, and both resources must be in that project
|
|
44
|
+
|
|
40
45
|
**Examples:**
|
|
41
46
|
1. Task blocks another task:
|
|
42
47
|
{
|
|
@@ -116,7 +121,8 @@ export function register({ server, apiClient }) {
|
|
|
116
121
|
**Returns:** Object with:
|
|
117
122
|
- outward: Links where this resource is the source
|
|
118
123
|
- inward: Links where this resource is the target
|
|
119
|
-
- total: Total link count
|
|
124
|
+
- total: Total link count
|
|
125
|
+
Each link also has direction, displayName, linkedResource (the other side) and canDelete.`,
|
|
120
126
|
inputSchema: {
|
|
121
127
|
resourceType: z
|
|
122
128
|
.enum(['Task', 'Document'])
|
|
@@ -150,7 +156,7 @@ export function register({ server, apiClient }) {
|
|
|
150
156
|
- Unblock a task
|
|
151
157
|
- Remove an incorrect or outdated link
|
|
152
158
|
|
|
153
|
-
**Note:**
|
|
159
|
+
**Note:** The link creator, a project manager or a workspace admin can delete a link. Returns no body (204).
|
|
154
160
|
|
|
155
161
|
**Examples:**
|
|
156
162
|
1. Delete a link:
|
|
@@ -223,8 +229,8 @@ export function register({ server, apiClient }) {
|
|
|
223
229
|
description: `Get blocking relationships for a task.
|
|
224
230
|
|
|
225
231
|
**When to use:**
|
|
226
|
-
- See
|
|
227
|
-
- See
|
|
232
|
+
- See what is blocking a specific task
|
|
233
|
+
- See what a specific task is blocking (the other side can be a Task or a Document)
|
|
228
234
|
- Identify bottlenecks in task dependencies
|
|
229
235
|
|
|
230
236
|
**Examples:**
|
|
@@ -232,8 +238,9 @@ export function register({ server, apiClient }) {
|
|
|
232
238
|
{ taskId: "task-uuid" }
|
|
233
239
|
|
|
234
240
|
**Returns:** Object with:
|
|
235
|
-
- blocks:
|
|
236
|
-
- blockedBy:
|
|
241
|
+
- blocks: items this task is blocking (they must wait for this task)
|
|
242
|
+
- blockedBy: items blocking this task (this task must wait)
|
|
243
|
+
Each item: { linkId, task: { id, resourceType: "Task" | "Document", title, status, assignee } }`,
|
|
237
244
|
inputSchema: {
|
|
238
245
|
taskId: z.string().uuid().describe('Task ID (UUID) to check blocking relations'),
|
|
239
246
|
},
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Enums shared by several tool modules. Values must match the backend (persistence) enums.
|
|
4
|
+
*/
|
|
5
|
+
/** persistence TaskPriority */
|
|
6
|
+
export const TaskPrioritySchema = z.enum(['HIGH', 'MEDIUM', 'LOW']);
|
|
7
|
+
/** persistence TaskStatus */
|
|
8
|
+
export const TaskStatusSchema = z.enum(['TODO', 'IN_PROGRESS', 'BLOCKED', 'DONE', 'CLOSED']);
|
|
9
|
+
/** persistence DocumentStatus */
|
|
10
|
+
export const DocumentStatusSchema = z.enum([
|
|
11
|
+
'DRAFT',
|
|
12
|
+
'REVIEW',
|
|
13
|
+
'APPROVED',
|
|
14
|
+
'DONE',
|
|
15
|
+
'REJECTED',
|
|
16
|
+
'CLOSED',
|
|
17
|
+
'ARCHIVED',
|
|
18
|
+
'SIGNED',
|
|
19
|
+
'SIGNING_IN_PROGRESS',
|
|
20
|
+
'SIGNING_CANCELLED',
|
|
21
|
+
]);
|
|
22
|
+
/** Date-only input (YYYY-MM-DD), interpreted in the workspace timezone */
|
|
23
|
+
export const DateOnlySchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'Use YYYY-MM-DD');
|