aiquila-mcp 0.3.20 → 0.3.21

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.
@@ -478,6 +478,126 @@ export const bulkFileOperationsTool = {
478
478
  };
479
479
  },
480
480
  };
481
+ /**
482
+ * Create a zip archive from one or more files/folders
483
+ */
484
+ export const createArchiveTool = {
485
+ name: 'create_archive',
486
+ description: 'Create a zip archive in Nextcloud from one or more files and/or folders. Runs server-side; not bound by MCP file-size limits.',
487
+ inputSchema: z.object({
488
+ sources: z
489
+ .array(z.string())
490
+ .min(1)
491
+ .describe("Paths of files/folders to include (e.g., ['/Documents/a.txt', '/Photos'])"),
492
+ destination: z
493
+ .string()
494
+ .describe("Path for the resulting .zip file (e.g., '/Documents/backup.zip')"),
495
+ overwrite: z
496
+ .boolean()
497
+ .optional()
498
+ .default(false)
499
+ .describe('Whether to overwrite the destination if it already exists'),
500
+ }),
501
+ handler: async (args) => {
502
+ try {
503
+ const result = await fetchAiquilaAPI('/files/zip', {
504
+ method: 'POST',
505
+ body: {
506
+ sources: args.sources,
507
+ destination: args.destination,
508
+ overwrite: args.overwrite,
509
+ },
510
+ });
511
+ return {
512
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
513
+ };
514
+ }
515
+ catch (error) {
516
+ return {
517
+ content: [
518
+ {
519
+ type: 'text',
520
+ text: `Error creating archive: ${error instanceof Error ? error.message : String(error)}`,
521
+ },
522
+ ],
523
+ isError: true,
524
+ };
525
+ }
526
+ },
527
+ };
528
+ /**
529
+ * Extract a zip archive into a destination folder
530
+ */
531
+ export const extractArchiveTool = {
532
+ name: 'extract_archive',
533
+ description: 'Extract a zip archive in Nextcloud into a destination folder. Runs server-side.',
534
+ inputSchema: z.object({
535
+ archive: z.string().describe("Path to the .zip file (e.g., '/Documents/backup.zip')"),
536
+ destination: z.string().describe("Folder to extract into (e.g., '/Documents/restored')"),
537
+ overwrite: z
538
+ .boolean()
539
+ .optional()
540
+ .default(false)
541
+ .describe('Whether to overwrite entries that already exist'),
542
+ }),
543
+ handler: async (args) => {
544
+ try {
545
+ const result = await fetchAiquilaAPI('/files/unzip', {
546
+ method: 'POST',
547
+ body: {
548
+ archive: args.archive,
549
+ destination: args.destination,
550
+ overwrite: args.overwrite,
551
+ },
552
+ });
553
+ return {
554
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
555
+ };
556
+ }
557
+ catch (error) {
558
+ return {
559
+ content: [
560
+ {
561
+ type: 'text',
562
+ text: `Error extracting archive: ${error instanceof Error ? error.message : String(error)}`,
563
+ },
564
+ ],
565
+ isError: true,
566
+ };
567
+ }
568
+ },
569
+ };
570
+ /**
571
+ * List the contents of a zip archive without extracting
572
+ */
573
+ export const listArchiveTool = {
574
+ name: 'list_archive',
575
+ description: 'List the contents of a zip archive in Nextcloud without extracting it.',
576
+ inputSchema: z.object({
577
+ archive: z.string().describe("Path to the .zip file (e.g., '/Documents/backup.zip')"),
578
+ }),
579
+ handler: async (args) => {
580
+ try {
581
+ const result = await fetchAiquilaAPI('/files/zip/list', {
582
+ queryParams: { archive: args.archive },
583
+ });
584
+ return {
585
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
586
+ };
587
+ }
588
+ catch (error) {
589
+ return {
590
+ content: [
591
+ {
592
+ type: 'text',
593
+ text: `Error listing archive: ${error instanceof Error ? error.message : String(error)}`,
594
+ },
595
+ ],
596
+ isError: true,
597
+ };
598
+ }
599
+ },
600
+ };
481
601
  /**
482
602
  * Export all file system tools
483
603
  */
@@ -494,4 +614,7 @@ export const fileSystemTools = [
494
614
  getFileContentTool,
495
615
  analyzeImageTool,
496
616
  bulkFileOperationsTool,
617
+ createArchiveTool,
618
+ extractArchiveTool,
619
+ listArchiveTool,
497
620
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiquila-mcp",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "description": "Nextcloud MCP server — files, calendar, contacts, mail, maps, notes, tasks & 120+ more tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -43,6 +43,7 @@
43
43
  ],
44
44
  "overrides": {
45
45
  "brace-expansion": "^2.0.3",
46
+ "esbuild": ">=0.28.1",
46
47
  "hono": "^4.12.14"
47
48
  },
48
49
  "dependencies": {