@arthysis/mcp-server 1.0.0 → 2.0.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 (2) hide show
  1. package/dist/index.js +289 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -92,10 +92,80 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
92
92
  type: 'string',
93
93
  description: 'Telefone do cliente',
94
94
  },
95
+ cnpj: {
96
+ type: 'string',
97
+ description: 'CNPJ do cliente',
98
+ },
99
+ state: {
100
+ type: 'string',
101
+ description: 'Estado/UF do cliente',
102
+ },
103
+ city: {
104
+ type: 'string',
105
+ description: 'Cidade do cliente',
106
+ },
107
+ neighborhood: {
108
+ type: 'string',
109
+ description: 'Bairro do cliente',
110
+ },
111
+ address: {
112
+ type: 'string',
113
+ description: 'Endereço completo do cliente',
114
+ },
95
115
  },
96
116
  required: ['name'],
97
117
  },
98
118
  },
119
+ {
120
+ name: 'update_client',
121
+ description: 'Atualiza um cliente existente no sistema ArthySis. Permite também inativar/ativar o cliente.',
122
+ inputSchema: {
123
+ type: 'object',
124
+ properties: {
125
+ id: {
126
+ type: 'string',
127
+ description: 'ID do cliente (obrigatório)',
128
+ },
129
+ name: {
130
+ type: 'string',
131
+ description: 'Novo nome do cliente',
132
+ },
133
+ email: {
134
+ type: 'string',
135
+ description: 'Novo email (ou null para remover)',
136
+ },
137
+ phone: {
138
+ type: 'string',
139
+ description: 'Novo telefone (ou null para remover)',
140
+ },
141
+ cnpj: {
142
+ type: 'string',
143
+ description: 'Novo CNPJ (ou null para remover)',
144
+ },
145
+ state: {
146
+ type: 'string',
147
+ description: 'Novo estado/UF (ou null para remover)',
148
+ },
149
+ city: {
150
+ type: 'string',
151
+ description: 'Nova cidade (ou null para remover)',
152
+ },
153
+ neighborhood: {
154
+ type: 'string',
155
+ description: 'Novo bairro (ou null para remover)',
156
+ },
157
+ address: {
158
+ type: 'string',
159
+ description: 'Novo endereço (ou null para remover)',
160
+ },
161
+ isActive: {
162
+ type: 'boolean',
163
+ description: 'Define se o cliente está ativo (true) ou inativo (false)',
164
+ },
165
+ },
166
+ required: ['id'],
167
+ },
168
+ },
99
169
  // ========== PROJETOS ==========
100
170
  {
101
171
  name: 'list_projects',
@@ -165,14 +235,72 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
165
235
  type: 'string',
166
236
  description: 'Descrição do projeto',
167
237
  },
238
+ status: {
239
+ type: 'string',
240
+ description: 'Status do projeto (ex: "Em andamento", "Concluído")',
241
+ },
242
+ startDate: {
243
+ type: 'string',
244
+ description: 'Data de início (formato ISO: 2024-12-31)',
245
+ },
246
+ endDate: {
247
+ type: 'string',
248
+ description: 'Data de término previsto (formato ISO: 2024-12-31)',
249
+ },
250
+ responsibleId: {
251
+ type: 'string',
252
+ description: 'ID do usuário responsável pelo projeto',
253
+ },
168
254
  },
169
255
  required: ['clientId', 'name'],
170
256
  },
171
257
  },
258
+ {
259
+ name: 'update_project',
260
+ description: 'Atualiza um projeto existente no sistema ArthySis. Permite também inativar/ativar o projeto.',
261
+ inputSchema: {
262
+ type: 'object',
263
+ properties: {
264
+ id: {
265
+ type: 'string',
266
+ description: 'ID do projeto (obrigatório)',
267
+ },
268
+ name: {
269
+ type: 'string',
270
+ description: 'Novo nome do projeto',
271
+ },
272
+ description: {
273
+ type: 'string',
274
+ description: 'Nova descrição (ou null para remover)',
275
+ },
276
+ status: {
277
+ type: 'string',
278
+ description: 'Novo status (ou null para remover)',
279
+ },
280
+ startDate: {
281
+ type: 'string',
282
+ description: 'Nova data de início (ou null para remover)',
283
+ },
284
+ endDate: {
285
+ type: 'string',
286
+ description: 'Nova data de término (ou null para remover)',
287
+ },
288
+ responsibleId: {
289
+ type: 'string',
290
+ description: 'Novo responsável (ou null para remover)',
291
+ },
292
+ isActive: {
293
+ type: 'boolean',
294
+ description: 'Define se o projeto está ativo (true) ou inativo (false)',
295
+ },
296
+ },
297
+ required: ['id'],
298
+ },
299
+ },
172
300
  // ========== TAREFAS ==========
173
301
  {
174
302
  name: 'list_tasks',
175
- description: 'Lista todas as tarefas de um projeto específico. Inclui campos de fase e horas.',
303
+ description: 'Lista todas as tarefas de um projeto específico. Inclui campos de sprint e horas.',
176
304
  inputSchema: {
177
305
  type: 'object',
178
306
  properties: {
@@ -186,7 +314,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
186
314
  },
187
315
  phase: {
188
316
  type: 'string',
189
- description: 'Filtrar por fase (ex: "Fase 1", "Design")',
317
+ description: 'Filtrar por sprint (ex: "Sprint 1", "Sprint 2")',
190
318
  },
191
319
  page: {
192
320
  type: 'number',
@@ -216,7 +344,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
216
344
  },
217
345
  {
218
346
  name: 'create_task',
219
- description: 'Cria uma nova tarefa em um projeto. Suporta campos de fase e horas para organização e controle de tempo.',
347
+ description: 'Cria uma nova tarefa em um projeto. Suporta campos de sprint, horas e associação com cliente.',
220
348
  inputSchema: {
221
349
  type: 'object',
222
350
  properties: {
@@ -242,11 +370,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
242
370
  },
243
371
  phase: {
244
372
  type: 'string',
245
- description: 'Nome da fase para agrupamento (ex: "Fase 1", "Design", "Desenvolvimento")',
246
- },
247
- phaseOrder: {
248
- type: 'number',
249
- description: 'Ordem dentro da fase (ex: 1, 2, 3)',
373
+ description: 'Nome da sprint para agrupamento (ex: "Sprint 1", "Sprint 2")',
250
374
  },
251
375
  estimatedHours: {
252
376
  type: 'number',
@@ -256,13 +380,17 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
256
380
  type: 'number',
257
381
  description: 'Horas já realizadas na tarefa',
258
382
  },
383
+ clientId: {
384
+ type: 'string',
385
+ description: 'ID do cliente associado à tarefa (opcional, para vincular a tarefa a um cliente específico)',
386
+ },
259
387
  },
260
388
  required: ['projectId', 'title'],
261
389
  },
262
390
  },
263
391
  {
264
392
  name: 'create_tasks_batch',
265
- description: 'Cria múltiplas tarefas de uma vez em um projeto. Ideal para criar várias tarefas rapidamente. Suporta campos de fase e horas.',
393
+ description: 'Cria múltiplas tarefas de uma vez em um projeto. Ideal para criar várias tarefas rapidamente. Suporta campos de sprint, horas e cliente. Pode definir clientId global para todas as tarefas ou individualmente em cada tarefa.',
266
394
  inputSchema: {
267
395
  type: 'object',
268
396
  properties: {
@@ -270,6 +398,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
270
398
  type: 'string',
271
399
  description: 'ID do projeto (obrigatório)',
272
400
  },
401
+ clientId: {
402
+ type: 'string',
403
+ description: 'ID do cliente para vincular a TODAS as tarefas (opcional, será aplicado a todas as tarefas que não tiverem clientId individual)',
404
+ },
273
405
  tasks: {
274
406
  type: 'array',
275
407
  description: 'Array de tarefas para criar',
@@ -294,11 +426,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
294
426
  },
295
427
  phase: {
296
428
  type: 'string',
297
- description: 'Nome da fase para agrupamento',
298
- },
299
- phaseOrder: {
300
- type: 'number',
301
- description: 'Ordem dentro da fase',
429
+ description: 'Nome da sprint para agrupamento',
302
430
  },
303
431
  estimatedHours: {
304
432
  type: 'number',
@@ -308,6 +436,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
308
436
  type: 'number',
309
437
  description: 'Horas realizadas',
310
438
  },
439
+ clientId: {
440
+ type: 'string',
441
+ description: 'ID do cliente associado à tarefa (sobrescreve o clientId global)',
442
+ },
311
443
  },
312
444
  required: ['title'],
313
445
  },
@@ -318,7 +450,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
318
450
  },
319
451
  {
320
452
  name: 'update_task',
321
- description: 'Atualiza uma tarefa existente. Suporta campos de fase e horas.',
453
+ description: 'Atualiza uma tarefa existente. Suporta campos de sprint, horas e cliente.',
322
454
  inputSchema: {
323
455
  type: 'object',
324
456
  properties: {
@@ -344,11 +476,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
344
476
  },
345
477
  phase: {
346
478
  type: 'string',
347
- description: 'Nome da fase (ou null para remover)',
348
- },
349
- phaseOrder: {
350
- type: 'number',
351
- description: 'Ordem dentro da fase (ou null para remover)',
479
+ description: 'Nome da sprint (ou null para remover)',
352
480
  },
353
481
  estimatedHours: {
354
482
  type: 'number',
@@ -358,13 +486,96 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
358
486
  type: 'number',
359
487
  description: 'Horas realizadas (ou null para remover)',
360
488
  },
489
+ clientId: {
490
+ type: 'string',
491
+ description: 'ID do cliente associado à tarefa (ou null para remover associação)',
492
+ },
493
+ },
494
+ required: ['id'],
495
+ },
496
+ },
497
+ {
498
+ name: 'batch_update_tasks',
499
+ description: 'Atualiza múltiplas tarefas de uma vez. Ideal para vincular cliente, atualizar sprint, descrição ou outros campos em lote.',
500
+ inputSchema: {
501
+ type: 'object',
502
+ properties: {
503
+ taskIds: {
504
+ type: 'array',
505
+ items: { type: 'string' },
506
+ description: 'Array de IDs das tarefas (obrigatório)',
507
+ },
508
+ title: {
509
+ type: 'string',
510
+ description: 'Novo título para todas as tarefas',
511
+ },
512
+ description: {
513
+ type: 'string',
514
+ description: 'Nova descrição para todas as tarefas (ou null para remover)',
515
+ },
516
+ clientId: {
517
+ type: 'string',
518
+ description: 'ID do cliente para vincular às tarefas (ou null para remover)',
519
+ },
520
+ statusId: {
521
+ type: 'string',
522
+ description: 'ID do status para atualizar',
523
+ },
524
+ responsibleId: {
525
+ type: 'string',
526
+ description: 'ID do responsável para atualizar (ou null para remover)',
527
+ },
528
+ phase: {
529
+ type: 'string',
530
+ description: 'Nome da sprint para atualizar (ou null para remover)',
531
+ },
532
+ estimatedHours: {
533
+ type: 'number',
534
+ description: 'Horas estimadas para atualizar',
535
+ },
536
+ actualHours: {
537
+ type: 'number',
538
+ description: 'Horas realizadas para atualizar',
539
+ },
540
+ dueDate: {
541
+ type: 'string',
542
+ description: 'Data de vencimento para atualizar (ou null para remover)',
543
+ },
544
+ },
545
+ required: ['taskIds'],
546
+ },
547
+ },
548
+ {
549
+ name: 'cancel_task',
550
+ description: 'Cancela uma tarefa. A tarefa não aparecerá mais no kanban, mas poderá ser restaurada depois.',
551
+ inputSchema: {
552
+ type: 'object',
553
+ properties: {
554
+ id: {
555
+ type: 'string',
556
+ description: 'ID da tarefa (obrigatório)',
557
+ },
558
+ },
559
+ required: ['id'],
560
+ },
561
+ },
562
+ {
563
+ name: 'restore_task',
564
+ description: 'Restaura uma tarefa cancelada.',
565
+ inputSchema: {
566
+ type: 'object',
567
+ properties: {
568
+ id: {
569
+ type: 'string',
570
+ description: 'ID da tarefa (obrigatório)',
571
+ },
361
572
  },
362
573
  required: ['id'],
363
574
  },
364
575
  },
365
576
  {
366
577
  name: 'batch_update_status',
367
- description: 'Atualiza o status de múltiplas tarefas de uma vez.',
578
+ description: 'Atualiza o status de múltiplas tarefas de uma vez. (Use batch_update_tasks para atualizar outros campos)',
368
579
  inputSchema: {
369
580
  type: 'object',
370
581
  properties: {
@@ -430,10 +641,23 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
430
641
  name: args?.name,
431
642
  email: args?.email,
432
643
  phone: args?.phone,
644
+ cnpj: args?.cnpj,
645
+ state: args?.state,
646
+ city: args?.city,
647
+ neighborhood: args?.neighborhood,
648
+ address: args?.address,
433
649
  }),
434
650
  });
435
651
  break;
436
652
  }
653
+ case 'update_client': {
654
+ const { id, ...data } = args;
655
+ result = await apiRequest(`/clients/${id}`, {
656
+ method: 'PATCH',
657
+ body: JSON.stringify(data),
658
+ });
659
+ break;
660
+ }
437
661
  // ========== PROJETOS ==========
438
662
  case 'list_projects': {
439
663
  const params = new URLSearchParams();
@@ -472,10 +696,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
472
696
  clientId: args?.clientId,
473
697
  name: args?.name,
474
698
  description: args?.description,
699
+ status: args?.status,
700
+ startDate: args?.startDate,
701
+ endDate: args?.endDate,
702
+ responsibleId: args?.responsibleId,
475
703
  }),
476
704
  });
477
705
  break;
478
706
  }
707
+ case 'update_project': {
708
+ const { id, ...data } = args;
709
+ result = await apiRequest(`/projects/${id}`, {
710
+ method: 'PATCH',
711
+ body: JSON.stringify(data),
712
+ });
713
+ break;
714
+ }
479
715
  // ========== TAREFAS ==========
480
716
  case 'list_tasks': {
481
717
  const params = new URLSearchParams();
@@ -503,9 +739,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
503
739
  statusId: args?.statusId,
504
740
  dueDate: args?.dueDate,
505
741
  phase: args?.phase,
506
- phaseOrder: args?.phaseOrder,
507
742
  estimatedHours: args?.estimatedHours,
508
743
  actualHours: args?.actualHours,
744
+ clientId: args?.clientId,
509
745
  }),
510
746
  });
511
747
  break;
@@ -514,6 +750,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
514
750
  result = await apiRequest(`/projects/${args?.projectId}/tasks/batch`, {
515
751
  method: 'POST',
516
752
  body: JSON.stringify({
753
+ clientId: args?.clientId, // clientId global para todas as tarefas
517
754
  tasks: args?.tasks,
518
755
  }),
519
756
  });
@@ -527,6 +764,24 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
527
764
  });
528
765
  break;
529
766
  }
767
+ case 'batch_update_tasks': {
768
+ result = await apiRequest('/tasks/batch', {
769
+ method: 'PATCH',
770
+ body: JSON.stringify({
771
+ taskIds: args?.taskIds,
772
+ title: args?.title,
773
+ description: args?.description,
774
+ clientId: args?.clientId,
775
+ statusId: args?.statusId,
776
+ responsibleId: args?.responsibleId,
777
+ phase: args?.phase,
778
+ estimatedHours: args?.estimatedHours,
779
+ actualHours: args?.actualHours,
780
+ dueDate: args?.dueDate,
781
+ }),
782
+ });
783
+ break;
784
+ }
530
785
  case 'batch_update_status': {
531
786
  result = await apiRequest('/tasks/batch-status', {
532
787
  method: 'PATCH',
@@ -537,6 +792,18 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
537
792
  });
538
793
  break;
539
794
  }
795
+ case 'cancel_task': {
796
+ result = await apiRequest(`/tasks/${args?.id}/cancel`, {
797
+ method: 'PATCH',
798
+ });
799
+ break;
800
+ }
801
+ case 'restore_task': {
802
+ result = await apiRequest(`/tasks/${args?.id}/restore`, {
803
+ method: 'PATCH',
804
+ });
805
+ break;
806
+ }
540
807
  // ========== ESTATÍSTICAS ==========
541
808
  case 'get_stats': {
542
809
  result = await apiRequest('/stats');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arthysis/mcp-server",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "MCP Server para integração do ArthySis com Claude Desktop",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",