motionmcp 1.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +241 -450
  3. package/dist/handlers/CommentHandler.d.ts +9 -0
  4. package/dist/handlers/CommentHandler.d.ts.map +1 -0
  5. package/dist/handlers/CommentHandler.js +66 -0
  6. package/dist/handlers/CommentHandler.js.map +1 -0
  7. package/dist/handlers/CustomFieldHandler.d.ts +14 -0
  8. package/dist/handlers/CustomFieldHandler.d.ts.map +1 -0
  9. package/dist/handlers/CustomFieldHandler.js +95 -0
  10. package/dist/handlers/CustomFieldHandler.js.map +1 -0
  11. package/dist/handlers/HandlerFactory.d.ts +15 -0
  12. package/dist/handlers/HandlerFactory.d.ts.map +1 -0
  13. package/dist/handlers/HandlerFactory.js +58 -0
  14. package/dist/handlers/HandlerFactory.js.map +1 -0
  15. package/dist/handlers/ProjectHandler.d.ts +10 -0
  16. package/dist/handlers/ProjectHandler.d.ts.map +1 -0
  17. package/dist/handlers/ProjectHandler.js +63 -0
  18. package/dist/handlers/ProjectHandler.js.map +1 -0
  19. package/dist/handlers/RecurringTaskHandler.d.ts +10 -0
  20. package/dist/handlers/RecurringTaskHandler.d.ts.map +1 -0
  21. package/dist/handlers/RecurringTaskHandler.js +68 -0
  22. package/dist/handlers/RecurringTaskHandler.js.map +1 -0
  23. package/dist/handlers/ScheduleHandler.d.ts +8 -0
  24. package/dist/handlers/ScheduleHandler.d.ts.map +1 -0
  25. package/dist/handlers/ScheduleHandler.js +43 -0
  26. package/dist/handlers/ScheduleHandler.js.map +1 -0
  27. package/dist/handlers/SearchHandler.d.ts +10 -0
  28. package/dist/handlers/SearchHandler.d.ts.map +1 -0
  29. package/dist/handlers/SearchHandler.js +116 -0
  30. package/dist/handlers/SearchHandler.js.map +1 -0
  31. package/dist/handlers/StatusHandler.d.ts +8 -0
  32. package/dist/handlers/StatusHandler.d.ts.map +1 -0
  33. package/dist/handlers/StatusHandler.js +22 -0
  34. package/dist/handlers/StatusHandler.js.map +1 -0
  35. package/dist/handlers/TaskHandler.d.ts +22 -0
  36. package/dist/handlers/TaskHandler.d.ts.map +1 -0
  37. package/dist/handlers/TaskHandler.js +324 -0
  38. package/dist/handlers/TaskHandler.js.map +1 -0
  39. package/dist/handlers/UserHandler.d.ts +9 -0
  40. package/dist/handlers/UserHandler.d.ts.map +1 -0
  41. package/dist/handlers/UserHandler.js +36 -0
  42. package/dist/handlers/UserHandler.js.map +1 -0
  43. package/dist/handlers/WorkspaceHandler.d.ts +10 -0
  44. package/dist/handlers/WorkspaceHandler.d.ts.map +1 -0
  45. package/dist/handlers/WorkspaceHandler.js +49 -0
  46. package/dist/handlers/WorkspaceHandler.js.map +1 -0
  47. package/dist/handlers/base/BaseHandler.d.ts +16 -0
  48. package/dist/handlers/base/BaseHandler.d.ts.map +1 -0
  49. package/dist/handlers/base/BaseHandler.js +31 -0
  50. package/dist/handlers/base/BaseHandler.js.map +1 -0
  51. package/dist/handlers/base/HandlerInterface.d.ts +18 -0
  52. package/dist/handlers/base/HandlerInterface.d.ts.map +1 -0
  53. package/dist/handlers/base/HandlerInterface.js +3 -0
  54. package/dist/handlers/base/HandlerInterface.js.map +1 -0
  55. package/dist/handlers/index.d.ts +14 -0
  56. package/dist/handlers/index.d.ts.map +1 -0
  57. package/dist/handlers/index.js +31 -0
  58. package/dist/handlers/index.js.map +1 -0
  59. package/dist/mcp-server.d.ts +15 -0
  60. package/dist/mcp-server.d.ts.map +1 -0
  61. package/dist/mcp-server.js +145 -0
  62. package/dist/mcp-server.js.map +1 -0
  63. package/dist/schemas/motion.d.ts +4971 -0
  64. package/dist/schemas/motion.d.ts.map +1 -0
  65. package/dist/schemas/motion.js +328 -0
  66. package/dist/schemas/motion.js.map +1 -0
  67. package/dist/services/motionApi.d.ts +199 -0
  68. package/dist/services/motionApi.d.ts.map +1 -0
  69. package/dist/services/motionApi.js +1950 -0
  70. package/dist/services/motionApi.js.map +1 -0
  71. package/dist/tools/ToolConfigurator.d.ts +19 -0
  72. package/dist/tools/ToolConfigurator.d.ts.map +1 -0
  73. package/dist/tools/ToolConfigurator.js +89 -0
  74. package/dist/tools/ToolConfigurator.js.map +1 -0
  75. package/dist/tools/ToolDefinitions.d.ts +25 -0
  76. package/dist/tools/ToolDefinitions.d.ts.map +1 -0
  77. package/dist/tools/ToolDefinitions.js +508 -0
  78. package/dist/tools/ToolDefinitions.js.map +1 -0
  79. package/dist/tools/ToolRegistry.d.ts +16 -0
  80. package/dist/tools/ToolRegistry.d.ts.map +1 -0
  81. package/dist/tools/ToolRegistry.js +89 -0
  82. package/dist/tools/ToolRegistry.js.map +1 -0
  83. package/dist/tools/index.d.ts +4 -0
  84. package/dist/tools/index.d.ts.map +1 -0
  85. package/dist/tools/index.js +21 -0
  86. package/dist/tools/index.js.map +1 -0
  87. package/dist/types/mcp-tool-args.d.ts +123 -0
  88. package/dist/types/mcp-tool-args.d.ts.map +1 -0
  89. package/dist/types/mcp-tool-args.js +7 -0
  90. package/dist/types/mcp-tool-args.js.map +1 -0
  91. package/dist/types/mcp.d.ts +32 -0
  92. package/dist/types/mcp.d.ts.map +1 -0
  93. package/dist/types/mcp.js +3 -0
  94. package/dist/types/mcp.js.map +1 -0
  95. package/dist/types/motion.d.ts +304 -0
  96. package/dist/types/motion.d.ts.map +1 -0
  97. package/dist/types/motion.js +3 -0
  98. package/dist/types/motion.js.map +1 -0
  99. package/dist/utils/cache.d.ts +25 -0
  100. package/dist/utils/cache.d.ts.map +1 -0
  101. package/dist/utils/cache.js +135 -0
  102. package/dist/utils/cache.js.map +1 -0
  103. package/dist/utils/constants.d.ts +88 -0
  104. package/dist/utils/constants.d.ts.map +1 -0
  105. package/dist/utils/constants.js +188 -0
  106. package/dist/utils/constants.js.map +1 -0
  107. package/dist/utils/errorHandling.d.ts +50 -0
  108. package/dist/utils/errorHandling.d.ts.map +1 -0
  109. package/dist/utils/errorHandling.js +86 -0
  110. package/dist/utils/errorHandling.js.map +1 -0
  111. package/dist/utils/index.d.ts +13 -0
  112. package/dist/utils/index.d.ts.map +1 -0
  113. package/dist/utils/index.js +38 -0
  114. package/dist/utils/index.js.map +1 -0
  115. package/dist/utils/logger.d.ts +13 -0
  116. package/dist/utils/logger.d.ts.map +1 -0
  117. package/dist/utils/logger.js +47 -0
  118. package/dist/utils/logger.js.map +1 -0
  119. package/dist/utils/pagination.d.ts +61 -0
  120. package/dist/utils/pagination.d.ts.map +1 -0
  121. package/dist/utils/pagination.js +168 -0
  122. package/dist/utils/pagination.js.map +1 -0
  123. package/dist/utils/paginationNew.d.ts +44 -0
  124. package/dist/utils/paginationNew.d.ts.map +1 -0
  125. package/dist/utils/paginationNew.js +149 -0
  126. package/dist/utils/paginationNew.js.map +1 -0
  127. package/dist/utils/parameterUtils.d.ts +79 -0
  128. package/dist/utils/parameterUtils.d.ts.map +1 -0
  129. package/dist/utils/parameterUtils.js +189 -0
  130. package/dist/utils/parameterUtils.js.map +1 -0
  131. package/dist/utils/responseFormatters.d.ts +95 -0
  132. package/dist/utils/responseFormatters.d.ts.map +1 -0
  133. package/dist/utils/responseFormatters.js +342 -0
  134. package/dist/utils/responseFormatters.js.map +1 -0
  135. package/dist/utils/responseWrapper.d.ts +38 -0
  136. package/dist/utils/responseWrapper.d.ts.map +1 -0
  137. package/dist/utils/responseWrapper.js +201 -0
  138. package/dist/utils/responseWrapper.js.map +1 -0
  139. package/dist/utils/sanitize.d.ts +51 -0
  140. package/dist/utils/sanitize.d.ts.map +1 -0
  141. package/dist/utils/sanitize.js +138 -0
  142. package/dist/utils/sanitize.js.map +1 -0
  143. package/dist/utils/validator.d.ts +37 -0
  144. package/dist/utils/validator.d.ts.map +1 -0
  145. package/dist/utils/validator.js +74 -0
  146. package/dist/utils/validator.js.map +1 -0
  147. package/dist/utils/workspaceResolver.d.ts +40 -0
  148. package/dist/utils/workspaceResolver.d.ts.map +1 -0
  149. package/dist/utils/workspaceResolver.js +207 -0
  150. package/dist/utils/workspaceResolver.js.map +1 -0
  151. package/package.json +41 -17
  152. package/.claude/settings.local.json +0 -15
  153. package/.env.example +0 -3
  154. package/sample.png +0 -0
  155. package/src/index.js +0 -179
  156. package/src/mcp-server.js +0 -1137
  157. package/src/routes/motion.js +0 -152
  158. package/src/services/motionApi.js +0 -1177
  159. package/src/worker.js +0 -248
@@ -0,0 +1,508 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allToolDefinitions = exports.statusesToolDefinition = exports.schedulesToolDefinition = exports.recurringTasksToolDefinition = exports.customFieldsToolDefinition = exports.commentsToolDefinition = exports.usersToolDefinition = exports.searchToolDefinition = exports.workspacesToolDefinition = exports.tasksToolDefinition = exports.projectsToolDefinition = exports.TOOL_NAMES = void 0;
4
+ exports.TOOL_NAMES = {
5
+ PROJECTS: 'motion_projects',
6
+ TASKS: 'motion_tasks',
7
+ WORKSPACES: 'motion_workspaces',
8
+ SEARCH: 'motion_search',
9
+ USERS: 'motion_users',
10
+ COMMENTS: 'motion_comments',
11
+ CUSTOM_FIELDS: 'motion_custom_fields',
12
+ RECURRING_TASKS: 'motion_recurring_tasks',
13
+ SCHEDULES: 'motion_schedules',
14
+ STATUSES: 'motion_statuses'
15
+ };
16
+ exports.projectsToolDefinition = {
17
+ name: exports.TOOL_NAMES.PROJECTS,
18
+ description: "Manage Motion projects - supports create, list, and get operations",
19
+ inputSchema: {
20
+ type: "object",
21
+ properties: {
22
+ operation: {
23
+ type: "string",
24
+ enum: ["create", "list", "get"],
25
+ description: "Operation to perform"
26
+ },
27
+ projectId: {
28
+ type: "string",
29
+ description: "Project ID (required for get operation)"
30
+ },
31
+ workspaceId: {
32
+ type: "string",
33
+ description: "Workspace ID"
34
+ },
35
+ workspaceName: {
36
+ type: "string",
37
+ description: "Workspace name (alternative to ID)"
38
+ },
39
+ name: {
40
+ type: "string",
41
+ description: "Project name"
42
+ },
43
+ description: {
44
+ type: "string",
45
+ description: "Project description"
46
+ },
47
+ color: {
48
+ type: "string",
49
+ description: "Hex color code"
50
+ },
51
+ status: {
52
+ type: "string",
53
+ description: "Project status"
54
+ },
55
+ allWorkspaces: {
56
+ type: "boolean",
57
+ description: "List projects from all workspaces (for list operation only). When true and no workspace is specified, returns projects from all workspaces."
58
+ }
59
+ },
60
+ required: ["operation"]
61
+ }
62
+ };
63
+ exports.tasksToolDefinition = {
64
+ name: exports.TOOL_NAMES.TASKS,
65
+ description: "Manage Motion tasks - supports create, list, get, update, delete, move, unassign, and list_all_uncompleted operations",
66
+ inputSchema: {
67
+ type: "object",
68
+ properties: {
69
+ operation: {
70
+ type: "string",
71
+ enum: ["create", "list", "get", "update", "delete", "move", "unassign", "list_all_uncompleted"],
72
+ description: "Operation to perform"
73
+ },
74
+ taskId: {
75
+ type: "string",
76
+ description: "Task ID (required for get/update/delete/move/unassign)"
77
+ },
78
+ workspaceId: {
79
+ type: "string",
80
+ description: "Filter by workspace (for list)"
81
+ },
82
+ workspaceName: {
83
+ type: "string",
84
+ description: "Filter by workspace name (for list)"
85
+ },
86
+ projectId: {
87
+ type: "string",
88
+ description: "Filter by project (for list)"
89
+ },
90
+ projectName: {
91
+ type: "string",
92
+ description: "Project name (alternative to projectId)"
93
+ },
94
+ status: {
95
+ type: "string",
96
+ description: "Filter by status (for list)"
97
+ },
98
+ assigneeId: {
99
+ type: "string",
100
+ description: "Filter by assignee (for list)"
101
+ },
102
+ assignee: {
103
+ type: "string",
104
+ description: "Filter by assignee name, email, or 'me' shortcut (for list). Resolved to an ID automatically"
105
+ },
106
+ priority: {
107
+ type: "string",
108
+ description: "Filter by priority level (for list): ASAP, HIGH, MEDIUM, LOW",
109
+ enum: ["ASAP", "HIGH", "MEDIUM", "LOW"]
110
+ },
111
+ dueDate: {
112
+ type: "string",
113
+ description: "Filter by due date (for list). Format: YYYY-MM-DD or relative like 'today', 'tomorrow'"
114
+ },
115
+ labels: {
116
+ type: "array",
117
+ items: {
118
+ type: "string"
119
+ },
120
+ description: "Filter by labels (for list). Array of label names"
121
+ },
122
+ name: {
123
+ type: "string",
124
+ description: "Task name (required for create)"
125
+ },
126
+ description: {
127
+ type: "string",
128
+ description: "Task description"
129
+ },
130
+ duration: {
131
+ oneOf: [
132
+ { type: "string", enum: ["NONE", "REMINDER"] },
133
+ { type: "number", minimum: 0 }
134
+ ],
135
+ description: "Minutes (as number) or 'NONE'/'REMINDER' (as string)"
136
+ },
137
+ autoScheduled: {
138
+ oneOf: [
139
+ {
140
+ type: "object",
141
+ properties: {
142
+ schedule: {
143
+ type: "string",
144
+ description: "Name of the schedule to use for auto-scheduling (e.g., 'Work Hours')"
145
+ },
146
+ startDate: {
147
+ type: "string",
148
+ description: "Optional start date for auto-scheduling (ISO 8601 format)"
149
+ },
150
+ deadlineType: {
151
+ type: "string",
152
+ enum: ["HARD", "SOFT", "NONE"],
153
+ description: "Deadline type for auto-scheduling (default: SOFT)"
154
+ }
155
+ },
156
+ required: ["schedule"]
157
+ },
158
+ { type: "null" },
159
+ { type: "string", description: "Schedule name (shorthand for {schedule: 'name'})" }
160
+ ],
161
+ description: "Auto-scheduling configuration. Requires a schedule name. Use motion_schedules to see available schedules. Examples: 'Work Hours' or {schedule: 'Work Hours', deadlineType: 'SOFT'}"
162
+ },
163
+ targetProjectId: {
164
+ type: "string",
165
+ description: "Target project for move operation"
166
+ },
167
+ targetWorkspaceId: {
168
+ type: "string",
169
+ description: "Target workspace for move operation"
170
+ },
171
+ limit: {
172
+ type: "number",
173
+ description: "Maximum number of tasks to return (for list and list_all_uncompleted)"
174
+ }
175
+ },
176
+ required: ["operation"]
177
+ }
178
+ };
179
+ exports.workspacesToolDefinition = {
180
+ name: exports.TOOL_NAMES.WORKSPACES,
181
+ description: "Manage Motion workspaces - supports list, get, and set_default operations",
182
+ inputSchema: {
183
+ type: "object",
184
+ properties: {
185
+ operation: {
186
+ type: "string",
187
+ enum: ["list", "get", "set_default"],
188
+ description: "Operation to perform"
189
+ },
190
+ workspaceId: {
191
+ type: "string",
192
+ description: "Workspace ID (required for get and set_default operations)"
193
+ }
194
+ },
195
+ required: ["operation"]
196
+ }
197
+ };
198
+ exports.searchToolDefinition = {
199
+ name: exports.TOOL_NAMES.SEARCH,
200
+ description: "Search and context utilities for Motion - supports content, context, and smart operations",
201
+ inputSchema: {
202
+ type: "object",
203
+ properties: {
204
+ operation: {
205
+ type: "string",
206
+ enum: ["content", "context", "smart"],
207
+ description: "Operation to perform"
208
+ },
209
+ query: {
210
+ type: "string",
211
+ description: "Search query (required for content and smart operations)"
212
+ },
213
+ searchScope: {
214
+ type: "string",
215
+ enum: ["tasks", "projects", "both"],
216
+ description: "What to search for content operation (default: both)"
217
+ },
218
+ workspaceId: {
219
+ type: "string",
220
+ description: "Workspace ID to limit search/context"
221
+ },
222
+ workspaceName: {
223
+ type: "string",
224
+ description: "Workspace name (alternative to workspaceId)"
225
+ },
226
+ limit: {
227
+ type: "number",
228
+ description: "Maximum number of results for content operation"
229
+ },
230
+ includeProjects: {
231
+ type: "boolean",
232
+ description: "Include project information for context operation"
233
+ },
234
+ includeTasks: {
235
+ type: "boolean",
236
+ description: "Include task information for context operation"
237
+ },
238
+ includeUsers: {
239
+ type: "boolean",
240
+ description: "Include user information for context operation"
241
+ },
242
+ entityType: {
243
+ type: "string",
244
+ enum: ["project", "task"],
245
+ description: "Entity type for smart operation"
246
+ },
247
+ entityId: {
248
+ type: "string",
249
+ description: "Entity ID for smart operation"
250
+ },
251
+ includeRelated: {
252
+ type: "boolean",
253
+ description: "Include related entities for smart operation"
254
+ }
255
+ },
256
+ required: ["operation"]
257
+ }
258
+ };
259
+ exports.usersToolDefinition = {
260
+ name: exports.TOOL_NAMES.USERS,
261
+ description: "Manage users and get current user information",
262
+ inputSchema: {
263
+ type: "object",
264
+ properties: {
265
+ operation: {
266
+ type: "string",
267
+ enum: ["list", "current"],
268
+ description: "Operation to perform"
269
+ },
270
+ workspaceId: {
271
+ type: "string",
272
+ description: "Workspace ID (optional for list operation, ignored for current)"
273
+ },
274
+ workspaceName: {
275
+ type: "string",
276
+ description: "Workspace name (alternative to workspaceId, ignored for current)"
277
+ }
278
+ },
279
+ required: ["operation"]
280
+ }
281
+ };
282
+ exports.commentsToolDefinition = {
283
+ name: exports.TOOL_NAMES.COMMENTS,
284
+ description: "Manage comments on tasks",
285
+ inputSchema: {
286
+ type: "object",
287
+ properties: {
288
+ operation: {
289
+ type: "string",
290
+ enum: ["list", "create"],
291
+ description: "Operation to perform"
292
+ },
293
+ taskId: {
294
+ type: "string",
295
+ description: "Task ID to comment on or fetch comments from (required)"
296
+ },
297
+ content: {
298
+ type: "string",
299
+ description: "Comment content (required for create operation)"
300
+ },
301
+ cursor: {
302
+ type: "string",
303
+ description: "Pagination cursor for list operation (optional)"
304
+ }
305
+ },
306
+ required: ["operation", "taskId"]
307
+ }
308
+ };
309
+ exports.customFieldsToolDefinition = {
310
+ name: exports.TOOL_NAMES.CUSTOM_FIELDS,
311
+ description: "Manage custom fields for tasks and projects",
312
+ inputSchema: {
313
+ type: "object",
314
+ properties: {
315
+ operation: {
316
+ type: "string",
317
+ enum: ["list", "create", "delete", "add_to_project", "remove_from_project", "add_to_task", "remove_from_task"],
318
+ description: "Operation to perform"
319
+ },
320
+ fieldId: {
321
+ type: "string",
322
+ description: "Custom field ID"
323
+ },
324
+ workspaceId: {
325
+ type: "string",
326
+ description: "Workspace ID"
327
+ },
328
+ name: {
329
+ type: "string",
330
+ description: "Field name (for create)"
331
+ },
332
+ field: {
333
+ type: "string",
334
+ enum: ["text", "url", "date", "person", "multiPerson", "phone", "select", "multiSelect", "number", "email", "checkbox", "relatedTo"],
335
+ description: "Field type (for create)"
336
+ },
337
+ options: {
338
+ type: "array",
339
+ items: { type: "string" },
340
+ description: "Options for select/multiselect fields"
341
+ },
342
+ required: {
343
+ type: "boolean",
344
+ description: "Whether field is required"
345
+ },
346
+ projectId: {
347
+ type: "string",
348
+ description: "Project ID (for add/remove operations)"
349
+ },
350
+ taskId: {
351
+ type: "string",
352
+ description: "Task ID (for add/remove operations)"
353
+ },
354
+ value: {
355
+ type: ["string", "number", "boolean", "array", "null"],
356
+ description: "Field value"
357
+ }
358
+ },
359
+ required: ["operation", "workspaceId"]
360
+ }
361
+ };
362
+ exports.recurringTasksToolDefinition = {
363
+ name: exports.TOOL_NAMES.RECURRING_TASKS,
364
+ description: "Manage recurring tasks",
365
+ inputSchema: {
366
+ type: "object",
367
+ properties: {
368
+ operation: {
369
+ type: "string",
370
+ enum: ["list", "create", "delete"],
371
+ description: "Operation to perform"
372
+ },
373
+ recurringTaskId: {
374
+ type: "string",
375
+ description: "Recurring task ID (for delete)"
376
+ },
377
+ workspaceId: {
378
+ type: "string",
379
+ description: "Workspace ID"
380
+ },
381
+ name: {
382
+ type: "string",
383
+ description: "Task name (for create)"
384
+ },
385
+ description: {
386
+ type: "string",
387
+ description: "Task description"
388
+ },
389
+ projectId: {
390
+ type: "string",
391
+ description: "Project ID"
392
+ },
393
+ assigneeId: {
394
+ type: "string",
395
+ description: "User ID to assign the recurring task to (required for create)"
396
+ },
397
+ frequency: {
398
+ type: "object",
399
+ properties: {
400
+ type: {
401
+ type: "string",
402
+ enum: ["daily", "weekly", "monthly", "yearly"],
403
+ description: "Frequency type"
404
+ },
405
+ interval: {
406
+ type: "number",
407
+ description: "Repeat every N periods"
408
+ },
409
+ daysOfWeek: {
410
+ type: "array",
411
+ items: { type: "number" },
412
+ description: "0-6 for Sunday-Saturday (for weekly)"
413
+ },
414
+ dayOfMonth: {
415
+ type: "number",
416
+ description: "1-31 for monthly recurrence"
417
+ },
418
+ endDate: {
419
+ type: "string",
420
+ description: "ISO 8601 format end date"
421
+ }
422
+ },
423
+ required: ["type"],
424
+ description: "Frequency configuration (required for create)"
425
+ },
426
+ deadlineType: {
427
+ type: "string",
428
+ enum: ["HARD", "SOFT"],
429
+ description: "Deadline type (default: SOFT)"
430
+ },
431
+ duration: {
432
+ oneOf: [
433
+ { type: "number" },
434
+ { type: "string", enum: ["REMINDER"] }
435
+ ],
436
+ description: "Task duration in minutes or REMINDER"
437
+ },
438
+ startingOn: {
439
+ type: "string",
440
+ description: "Start date (ISO 8601 format)"
441
+ },
442
+ idealTime: {
443
+ type: "string",
444
+ description: "Ideal time in HH:mm format"
445
+ },
446
+ schedule: {
447
+ type: "string",
448
+ description: "Schedule name (default: Work Hours)"
449
+ },
450
+ priority: {
451
+ type: "string",
452
+ enum: ["ASAP", "HIGH", "MEDIUM", "LOW"],
453
+ description: "Task priority (default: MEDIUM)"
454
+ }
455
+ },
456
+ required: ["operation"]
457
+ }
458
+ };
459
+ exports.schedulesToolDefinition = {
460
+ name: exports.TOOL_NAMES.SCHEDULES,
461
+ description: "Get user schedules showing their weekly working hours and time zones",
462
+ inputSchema: {
463
+ type: "object",
464
+ properties: {
465
+ userId: {
466
+ type: "string",
467
+ description: "User ID to get schedule for (optional, returns all schedules if not specified)"
468
+ },
469
+ startDate: {
470
+ type: "string",
471
+ description: "Start date for filtering schedules (optional)"
472
+ },
473
+ endDate: {
474
+ type: "string",
475
+ description: "End date for filtering schedules (optional)"
476
+ }
477
+ },
478
+ additionalProperties: false
479
+ }
480
+ };
481
+ exports.statusesToolDefinition = {
482
+ name: exports.TOOL_NAMES.STATUSES,
483
+ description: "Get available task/project statuses for a workspace",
484
+ inputSchema: {
485
+ type: "object",
486
+ properties: {
487
+ workspaceId: {
488
+ type: "string",
489
+ description: "Workspace ID to get statuses for (optional, returns all statuses if not specified)"
490
+ }
491
+ },
492
+ additionalProperties: false
493
+ }
494
+ };
495
+ // Combined tool definitions array
496
+ exports.allToolDefinitions = [
497
+ exports.projectsToolDefinition,
498
+ exports.tasksToolDefinition,
499
+ exports.workspacesToolDefinition,
500
+ exports.searchToolDefinition,
501
+ exports.usersToolDefinition,
502
+ exports.commentsToolDefinition,
503
+ exports.customFieldsToolDefinition,
504
+ exports.recurringTasksToolDefinition,
505
+ exports.schedulesToolDefinition,
506
+ exports.statusesToolDefinition
507
+ ];
508
+ //# sourceMappingURL=ToolDef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 -0,0 +1,16 @@
1
+ import { McpToolDefinition } from '../types/mcp';
2
+ export declare class ToolRegistry {
3
+ private tools;
4
+ constructor();
5
+ private registerAllTools;
6
+ register(tool: McpToolDefinition): void;
7
+ unregister(name: string): void;
8
+ get(name: string): McpToolDefinition | undefined;
9
+ getAll(): McpToolDefinition[];
10
+ getAllNames(): string[];
11
+ getEnabled(config: string): McpToolDefinition[];
12
+ has(name: string): boolean;
13
+ size(): number;
14
+ clear(): void;
15
+ }
16
+ //# sourceMappingURL=ToolRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolRegistry.d.ts","sourceRoot":"","sources":["../../src/tools/ToolRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAiC;;IAO9C,OAAO,CAAC,gBAAgB;IAMxB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI;IAIvC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIhD,MAAM,IAAI,iBAAiB,EAAE;IAI7B,WAAW,IAAI,MAAM,EAAE;IAIvB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,EAAE;IAsD/C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,IAAI,IAAI,MAAM;IAId,KAAK,IAAI,IAAI;CAGd"}
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ToolRegistry = void 0;
4
+ const ToolDefinitions_1 = require("./ToolDefinitions");
5
+ class ToolRegistry {
6
+ constructor() {
7
+ this.tools = new Map();
8
+ this.registerAllTools();
9
+ }
10
+ registerAllTools() {
11
+ ToolDefinitions_1.allToolDefinitions.forEach(tool => {
12
+ this.register(tool);
13
+ });
14
+ }
15
+ register(tool) {
16
+ this.tools.set(tool.name, tool);
17
+ }
18
+ unregister(name) {
19
+ this.tools.delete(name);
20
+ }
21
+ get(name) {
22
+ return this.tools.get(name);
23
+ }
24
+ getAll() {
25
+ return Array.from(this.tools.values());
26
+ }
27
+ getAllNames() {
28
+ return Array.from(this.tools.keys());
29
+ }
30
+ getEnabled(config) {
31
+ const toolsMap = new Map(this.getAll().map(tool => [tool.name, tool]));
32
+ switch (config) {
33
+ case 'minimal':
34
+ // Only core consolidated tools
35
+ return [
36
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.TASKS),
37
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.PROJECTS),
38
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.WORKSPACES)
39
+ ].filter((tool) => tool !== undefined);
40
+ case 'essential':
41
+ // Consolidated tools plus commonly needed tools
42
+ return [
43
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.TASKS),
44
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.PROJECTS),
45
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.WORKSPACES),
46
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.USERS),
47
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.SEARCH),
48
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.COMMENTS),
49
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.SCHEDULES)
50
+ ].filter((tool) => tool !== undefined);
51
+ case 'complete':
52
+ // All consolidated tools
53
+ return [
54
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.TASKS),
55
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.PROJECTS),
56
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.WORKSPACES),
57
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.USERS),
58
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.SEARCH),
59
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.COMMENTS),
60
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.CUSTOM_FIELDS),
61
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.RECURRING_TASKS),
62
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.SCHEDULES),
63
+ toolsMap.get(ToolDefinitions_1.TOOL_NAMES.STATUSES)
64
+ ].filter((tool) => tool !== undefined);
65
+ default:
66
+ // Handle custom configuration
67
+ if (config.startsWith('custom:')) {
68
+ const customTools = config.substring(7).split(',').map(s => s.trim());
69
+ return customTools
70
+ .map(name => toolsMap.get(name))
71
+ .filter((tool) => tool !== undefined);
72
+ }
73
+ // This should never happen since we validate in configurator
74
+ // But if it does, throw an error instead of silently defaulting
75
+ throw new Error(`Unexpected tools configuration: ${config}`);
76
+ }
77
+ }
78
+ has(name) {
79
+ return this.tools.has(name);
80
+ }
81
+ size() {
82
+ return this.tools.size;
83
+ }
84
+ clear() {
85
+ this.tools.clear();
86
+ }
87
+ }
88
+ exports.ToolRegistry = ToolRegistry;
89
+ //# sourceMappingURL=ToolRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolRegistry.js","sourceRoot":"","sources":["../../src/tools/ToolRegistry.ts"],"names":[],"mappings":";;;AACA,uDAAmE;AAEnE,MAAa,YAAY;IAGvB;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAEO,gBAAgB;QACtB,oCAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,IAAuB;QAC9B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,UAAU,CAAC,IAAY;QACrB,IAAI,CA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AC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;yBAC/B,MAAM,CAAC,CAAC,IAAI,EAA6B,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;gBACrE,CAAC;gBAED,6DAA6D;gBAC7D,gEAAgE;gBAChE,MAAM,IAAI,KAAK,CAAC,mCAAmC,MAAM,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,GAAG,CAAC,IAAY;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF;AAnGD,oCAmGC"}
@@ -0,0 +1,4 @@
1
+ export { ToolRegistry } from './ToolRegistry';
2
+ export { ToolConfigurator } from './ToolConfigurator';
3
+ export { allToolDefinitions, TOOL_NAMES, projectsToolDefinition, tasksToolDefinition, workspacesToolDefinition, searchToolDefinition, usersToolDefinition, commentsToolDefinition, customFieldsToolDefinition, recurringTasksToolDefinition, schedulesToolDefinition, statusesToolDefinition } from './ToolDefinitions';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC"}