@contentful/mcp-tools 0.2.6 → 0.3.1

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 (3) hide show
  1. package/dist/index.d.ts +55 -29
  2. package/dist/index.js +564 -383
  3. package/package.json +4 -1
package/dist/index.js CHANGED
@@ -2226,109 +2226,263 @@ function searchEntriesTool(config) {
2226
2226
  }
2227
2227
 
2228
2228
  // src/tools/entries/createEntry.ts
2229
- import { z as z37 } from "zod";
2229
+ import { z as z38 } from "zod";
2230
2230
 
2231
2231
  // src/types/entryFieldSchema.ts
2232
- import { z as z36 } from "zod";
2232
+ import { z as z37 } from "zod";
2233
+
2234
+ // src/types/richTextSchema.ts
2233
2235
  import { BLOCKS as BLOCKS2, INLINES as INLINES2, MARKS } from "@contentful/rich-text-types";
2234
- var markSchema = z36.object({
2236
+ import { z as z36 } from "zod";
2237
+ var emptyNodeDataSchema = z36.object({});
2238
+ var entryLinkTargetSchema = z36.object({
2239
+ sys: z36.object({
2240
+ id: z36.string(),
2241
+ type: z36.literal("Link"),
2242
+ linkType: z36.literal("Entry")
2243
+ })
2244
+ });
2245
+ var assetLinkTargetSchema = z36.object({
2246
+ sys: z36.object({
2247
+ id: z36.string(),
2248
+ type: z36.literal("Link"),
2249
+ linkType: z36.literal("Asset")
2250
+ })
2251
+ });
2252
+ var resourceLinkTargetSchema = z36.object({
2253
+ sys: z36.object({
2254
+ type: z36.literal("ResourceLink"),
2255
+ linkType: z36.string(),
2256
+ urn: z36.string()
2257
+ })
2258
+ });
2259
+ var richTextMarkSchema = z36.object({
2235
2260
  type: z36.nativeEnum(MARKS)
2236
2261
  });
2237
- var textNodeSchema = z36.object({
2262
+ var richTextTextNodeSchema = z36.object({
2238
2263
  nodeType: z36.literal("text"),
2239
2264
  value: z36.string(),
2240
- marks: z36.array(markSchema),
2241
- data: z36.record(z36.any())
2265
+ marks: z36.array(richTextMarkSchema),
2266
+ data: emptyNodeDataSchema
2242
2267
  });
2243
- var inlineNodeSchema = z36.lazy(
2268
+ var embeddedEntryBlockNodeSchema = z36.object({
2269
+ nodeType: z36.literal(BLOCKS2.EMBEDDED_ENTRY),
2270
+ data: z36.object({
2271
+ target: entryLinkTargetSchema
2272
+ }),
2273
+ content: z36.array(z36.never())
2274
+ });
2275
+ var embeddedEntryInlineNodeSchema = z36.object({
2276
+ nodeType: z36.literal(INLINES2.EMBEDDED_ENTRY),
2277
+ data: z36.object({
2278
+ target: entryLinkTargetSchema
2279
+ }),
2280
+ content: z36.array(z36.never())
2281
+ });
2282
+ var embeddedAssetBlockNodeSchema = z36.object({
2283
+ nodeType: z36.literal(BLOCKS2.EMBEDDED_ASSET),
2284
+ data: z36.object({
2285
+ target: assetLinkTargetSchema
2286
+ }),
2287
+ content: z36.array(z36.never())
2288
+ });
2289
+ var hyperlinkInlineNodeSchema = z36.object({
2290
+ nodeType: z36.literal(INLINES2.HYPERLINK),
2291
+ data: z36.object({
2292
+ uri: z36.string().url()
2293
+ }),
2294
+ content: z36.array(richTextTextNodeSchema)
2295
+ });
2296
+ var entryHyperlinkInlineNodeSchema = z36.object({
2297
+ nodeType: z36.literal(INLINES2.ENTRY_HYPERLINK),
2298
+ data: z36.object({
2299
+ target: entryLinkTargetSchema
2300
+ }),
2301
+ content: z36.array(richTextTextNodeSchema)
2302
+ });
2303
+ var assetHyperlinkInlineNodeSchema = z36.object({
2304
+ nodeType: z36.literal(INLINES2.ASSET_HYPERLINK),
2305
+ data: z36.object({
2306
+ target: assetLinkTargetSchema
2307
+ }),
2308
+ content: z36.array(richTextTextNodeSchema)
2309
+ });
2310
+ var embeddedResourceBlockNodeSchema = z36.object({
2311
+ nodeType: z36.literal(BLOCKS2.EMBEDDED_RESOURCE),
2312
+ data: z36.object({
2313
+ target: resourceLinkTargetSchema
2314
+ }),
2315
+ content: z36.array(z36.never())
2316
+ });
2317
+ var embeddedResourceInlineNodeSchema = z36.object({
2318
+ nodeType: z36.literal(INLINES2.EMBEDDED_RESOURCE),
2319
+ data: z36.object({
2320
+ target: resourceLinkTargetSchema
2321
+ }),
2322
+ content: z36.array(z36.never())
2323
+ });
2324
+ var resourceHyperlinkInlineNodeSchema = z36.object({
2325
+ nodeType: z36.literal(INLINES2.RESOURCE_HYPERLINK),
2326
+ data: z36.object({
2327
+ target: resourceLinkTargetSchema
2328
+ }),
2329
+ content: z36.array(richTextTextNodeSchema)
2330
+ });
2331
+ var richTextInlineNodeSchema = z36.lazy(
2332
+ () => z36.union([
2333
+ richTextTextNodeSchema,
2334
+ embeddedEntryInlineNodeSchema,
2335
+ hyperlinkInlineNodeSchema,
2336
+ entryHyperlinkInlineNodeSchema,
2337
+ assetHyperlinkInlineNodeSchema,
2338
+ embeddedResourceInlineNodeSchema,
2339
+ resourceHyperlinkInlineNodeSchema
2340
+ ])
2341
+ );
2342
+ var paragraphNodeSchema = z36.lazy(
2244
2343
  () => z36.object({
2245
- nodeType: z36.nativeEnum(INLINES2),
2246
- data: z36.record(z36.any()),
2247
- content: z36.array(z36.union([inlineNodeSchema, textNodeSchema]))
2344
+ nodeType: z36.literal(BLOCKS2.PARAGRAPH),
2345
+ data: emptyNodeDataSchema,
2346
+ content: z36.array(richTextInlineNodeSchema)
2248
2347
  })
2249
2348
  );
2250
- var blockNodeSchema = z36.lazy(
2349
+ var headingNodeSchema = (headingNodeType) => z36.object({
2350
+ nodeType: z36.literal(headingNodeType),
2351
+ data: emptyNodeDataSchema,
2352
+ content: z36.array(richTextInlineNodeSchema)
2353
+ });
2354
+ var heading1NodeSchema = headingNodeSchema(BLOCKS2.HEADING_1);
2355
+ var heading2NodeSchema = headingNodeSchema(BLOCKS2.HEADING_2);
2356
+ var heading3NodeSchema = headingNodeSchema(BLOCKS2.HEADING_3);
2357
+ var heading4NodeSchema = headingNodeSchema(BLOCKS2.HEADING_4);
2358
+ var heading5NodeSchema = headingNodeSchema(BLOCKS2.HEADING_5);
2359
+ var heading6NodeSchema = headingNodeSchema(BLOCKS2.HEADING_6);
2360
+ var hrNodeSchema = z36.object({
2361
+ nodeType: z36.literal(BLOCKS2.HR),
2362
+ data: emptyNodeDataSchema,
2363
+ content: z36.array(z36.never())
2364
+ });
2365
+ var quoteNodeSchema = z36.object({
2366
+ nodeType: z36.literal(BLOCKS2.QUOTE),
2367
+ data: emptyNodeDataSchema,
2368
+ content: z36.array(paragraphNodeSchema)
2369
+ });
2370
+ var tableHeaderCellNodeSchema = z36.object({
2371
+ nodeType: z36.literal(BLOCKS2.TABLE_HEADER_CELL),
2372
+ data: emptyNodeDataSchema,
2373
+ content: z36.array(paragraphNodeSchema)
2374
+ });
2375
+ var tableCellNodeSchema = z36.object({
2376
+ nodeType: z36.literal(BLOCKS2.TABLE_CELL),
2377
+ data: emptyNodeDataSchema,
2378
+ content: z36.array(paragraphNodeSchema)
2379
+ });
2380
+ var tableRowNodeSchema = z36.object({
2381
+ nodeType: z36.literal(BLOCKS2.TABLE_ROW),
2382
+ data: emptyNodeDataSchema,
2383
+ content: z36.array(z36.union([tableHeaderCellNodeSchema, tableCellNodeSchema]))
2384
+ });
2385
+ var tableNodeSchema = z36.object({
2386
+ nodeType: z36.literal(BLOCKS2.TABLE),
2387
+ data: emptyNodeDataSchema,
2388
+ content: z36.array(tableRowNodeSchema)
2389
+ });
2390
+ var orderedListNodeSchema = z36.lazy(
2251
2391
  () => z36.object({
2252
- nodeType: z36.nativeEnum(BLOCKS2),
2253
- data: z36.record(z36.any()),
2254
- content: z36.array(
2255
- z36.union([blockNodeSchema, inlineNodeSchema, textNodeSchema])
2256
- )
2392
+ nodeType: z36.literal(BLOCKS2.OL_LIST),
2393
+ data: emptyNodeDataSchema,
2394
+ content: z36.array(listItemNodeSchema)
2257
2395
  })
2258
2396
  );
2259
- var topLevelBlockNodeSchema = z36.lazy(
2397
+ var unorderedListNodeSchema = z36.lazy(
2260
2398
  () => z36.object({
2261
- nodeType: z36.enum([
2262
- BLOCKS2.PARAGRAPH,
2263
- BLOCKS2.HEADING_1,
2264
- BLOCKS2.HEADING_2,
2265
- BLOCKS2.HEADING_3,
2266
- BLOCKS2.HEADING_4,
2267
- BLOCKS2.HEADING_5,
2268
- BLOCKS2.HEADING_6,
2269
- BLOCKS2.OL_LIST,
2270
- BLOCKS2.UL_LIST,
2271
- BLOCKS2.HR,
2272
- BLOCKS2.QUOTE,
2273
- BLOCKS2.EMBEDDED_ENTRY,
2274
- BLOCKS2.EMBEDDED_ASSET,
2275
- BLOCKS2.EMBEDDED_RESOURCE,
2276
- BLOCKS2.TABLE
2277
- ]),
2278
- data: z36.record(z36.any()),
2399
+ nodeType: z36.literal(BLOCKS2.UL_LIST),
2400
+ data: emptyNodeDataSchema,
2401
+ content: z36.array(listItemNodeSchema)
2402
+ })
2403
+ );
2404
+ var listItemNodeSchema = z36.lazy(
2405
+ () => z36.object({
2406
+ nodeType: z36.literal(BLOCKS2.LIST_ITEM),
2407
+ data: emptyNodeDataSchema,
2279
2408
  content: z36.array(
2280
- z36.union([blockNodeSchema, inlineNodeSchema, textNodeSchema])
2409
+ z36.union([
2410
+ paragraphNodeSchema,
2411
+ orderedListNodeSchema,
2412
+ unorderedListNodeSchema
2413
+ ])
2281
2414
  )
2282
2415
  })
2283
2416
  );
2417
+ var topLevelBlockNodeSchema = z36.lazy(
2418
+ () => z36.union([
2419
+ paragraphNodeSchema,
2420
+ heading1NodeSchema,
2421
+ heading2NodeSchema,
2422
+ heading3NodeSchema,
2423
+ heading4NodeSchema,
2424
+ heading5NodeSchema,
2425
+ heading6NodeSchema,
2426
+ embeddedEntryBlockNodeSchema,
2427
+ embeddedAssetBlockNodeSchema,
2428
+ embeddedResourceBlockNodeSchema,
2429
+ orderedListNodeSchema,
2430
+ unorderedListNodeSchema,
2431
+ hrNodeSchema,
2432
+ quoteNodeSchema,
2433
+ tableNodeSchema
2434
+ ])
2435
+ );
2284
2436
  var richTextDocumentSchema = z36.object({
2285
2437
  nodeType: z36.literal(BLOCKS2.DOCUMENT),
2286
- data: z36.record(z36.any()),
2438
+ data: emptyNodeDataSchema,
2287
2439
  content: z36.array(topLevelBlockNodeSchema)
2288
2440
  }).describe("Contentful Rich Text document");
2289
- var linkSchema = z36.object({
2290
- sys: z36.object({
2291
- type: z36.literal("Link"),
2292
- linkType: z36.enum(["Entry", "Asset"]),
2293
- id: z36.string()
2441
+
2442
+ // src/types/entryFieldSchema.ts
2443
+ var linkSchema = z37.object({
2444
+ sys: z37.object({
2445
+ type: z37.literal("Link"),
2446
+ linkType: z37.enum(["Entry", "Asset"]),
2447
+ id: z37.string()
2294
2448
  })
2295
2449
  });
2296
- var resourceLinkSchema = z36.object({
2297
- sys: z36.object({
2298
- type: z36.literal("ResourceLink"),
2299
- linkType: z36.string(),
2300
- urn: z36.string()
2450
+ var resourceLinkSchema = z37.object({
2451
+ sys: z37.object({
2452
+ type: z37.literal("ResourceLink"),
2453
+ linkType: z37.string(),
2454
+ urn: z37.string()
2301
2455
  })
2302
2456
  });
2303
- var locationSchema = z36.object({
2304
- lat: z36.number(),
2305
- lon: z36.number()
2457
+ var locationSchema = z37.object({
2458
+ lat: z37.number(),
2459
+ lon: z37.number()
2306
2460
  });
2307
- var jsonPrimitive = z36.union([z36.string(), z36.number(), z36.boolean(), z36.null()]);
2308
- var jsonValueSchema = z36.lazy(
2309
- () => z36.union([jsonPrimitive, z36.array(jsonValueSchema), z36.record(jsonValueSchema)]).describe("Freeform JSON value (not for Rich Text)")
2461
+ var jsonPrimitive = z37.union([z37.string(), z37.number(), z37.boolean(), z37.null()]);
2462
+ var jsonValueSchema = z37.lazy(
2463
+ () => z37.union([jsonPrimitive, z37.array(jsonValueSchema), z37.record(jsonValueSchema)]).describe("Freeform JSON value (not for Rich Text)")
2310
2464
  );
2311
- var fieldValueSchema = z36.union([
2312
- z36.string().describe("Symbol, Text, or Date field"),
2313
- z36.number().describe("Integer or Number field"),
2314
- z36.boolean().describe("Boolean field"),
2465
+ var fieldValueSchema = z37.union([
2466
+ z37.string().describe("Symbol, Text, or Date field"),
2467
+ z37.number().describe("Integer or Number field"),
2468
+ z37.boolean().describe("Boolean field"),
2315
2469
  richTextDocumentSchema,
2316
2470
  linkSchema.describe("Link field (Entry or Asset reference)"),
2317
2471
  resourceLinkSchema.describe("ResourceLink field"),
2318
2472
  locationSchema.describe("Location field"),
2319
- z36.array(z36.string()).describe("Array field of Symbols"),
2320
- z36.array(linkSchema).describe("Array field of Links"),
2321
- z36.array(resourceLinkSchema).describe("Array field of ResourceLinks"),
2473
+ z37.array(z37.string()).describe("Array field of Symbols"),
2474
+ z37.array(linkSchema).describe("Array field of Links"),
2475
+ z37.array(resourceLinkSchema).describe("Array field of ResourceLinks"),
2322
2476
  jsonValueSchema
2323
2477
  ]);
2324
- var localizedFieldSchema = z36.record(fieldValueSchema);
2325
- var entryFieldsSchema = z36.record(localizedFieldSchema).describe(
2478
+ var localizedFieldSchema = z37.record(fieldValueSchema);
2479
+ var entryFieldsSchema = z37.record(localizedFieldSchema).describe(
2326
2480
  "Field values to update. Keys are field IDs, values are locale-keyed objects. Will be merged with existing fields."
2327
2481
  );
2328
2482
 
2329
2483
  // src/tools/entries/createEntry.ts
2330
2484
  var CreateEntryToolParams = BaseToolSchema.extend({
2331
- contentTypeId: z37.string().describe("The ID of the content type to create an entry for"),
2485
+ contentTypeId: z38.string().describe("The ID of the content type to create an entry for"),
2332
2486
  fields: entryFieldsSchema.describe(
2333
2487
  "The field values for the new entry. Keys should be field IDs and values should be the field content."
2334
2488
  ),
@@ -2357,9 +2511,9 @@ function createEntryTool(config) {
2357
2511
  }
2358
2512
 
2359
2513
  // src/tools/entries/deleteEntry.ts
2360
- import { z as z38 } from "zod";
2514
+ import { z as z39 } from "zod";
2361
2515
  var DeleteEntryToolParams = BaseToolSchema.extend({
2362
- entryId: z38.string().describe("The ID of the entry to delete")
2516
+ entryId: z39.string().describe("The ID of the entry to delete")
2363
2517
  });
2364
2518
  function deleteEntryTool(config) {
2365
2519
  async function tool2(args) {
@@ -2377,9 +2531,9 @@ function deleteEntryTool(config) {
2377
2531
  }
2378
2532
 
2379
2533
  // src/tools/entries/updateEntry.ts
2380
- import { z as z39 } from "zod";
2534
+ import { z as z40 } from "zod";
2381
2535
  var UpdateEntryToolParams = BaseToolSchema.extend({
2382
- entryId: z39.string().describe("The ID of the entry to update"),
2536
+ entryId: z40.string().describe("The ID of the entry to update"),
2383
2537
  fields: entryFieldsSchema.describe(
2384
2538
  "The field values to update. Keys should be field IDs and values should be the field content. Will be merged with existing fields."
2385
2539
  ),
@@ -2422,9 +2576,9 @@ function updateEntryTool(config) {
2422
2576
  }
2423
2577
 
2424
2578
  // src/tools/entries/getEntry.ts
2425
- import { z as z40 } from "zod";
2579
+ import { z as z41 } from "zod";
2426
2580
  var GetEntryToolParams = BaseToolSchema.extend({
2427
- entryId: z40.string().describe("The ID of the entry to retrieve")
2581
+ entryId: z41.string().describe("The ID of the entry to retrieve")
2428
2582
  });
2429
2583
  function getEntryTool(config) {
2430
2584
  async function tool2(args) {
@@ -2441,9 +2595,9 @@ function getEntryTool(config) {
2441
2595
  }
2442
2596
 
2443
2597
  // src/tools/entries/publishEntry.ts
2444
- import { z as z41 } from "zod";
2598
+ import { z as z42 } from "zod";
2445
2599
  var PublishEntryToolParams = BaseToolSchema.extend({
2446
- entryId: z41.union([z41.string(), z41.array(z41.string()).max(100)]).describe(
2600
+ entryId: z42.union([z42.string(), z42.array(z42.string()).max(100)]).describe(
2447
2601
  "The ID of the entry to publish (string) or an array of entry IDs (up to 100 entries)"
2448
2602
  )
2449
2603
  });
@@ -2491,9 +2645,9 @@ function publishEntryTool(config) {
2491
2645
  }
2492
2646
 
2493
2647
  // src/tools/entries/unpublishEntry.ts
2494
- import { z as z42 } from "zod";
2648
+ import { z as z43 } from "zod";
2495
2649
  var UnpublishEntryToolParams = BaseToolSchema.extend({
2496
- entryId: z42.union([z42.string(), z42.array(z42.string()).max(100)]).describe(
2650
+ entryId: z43.union([z43.string(), z43.array(z43.string()).max(100)]).describe(
2497
2651
  "The ID of the entry to unpublish (string) or an array of entry IDs (up to 100 entries)"
2498
2652
  )
2499
2653
  });
@@ -2544,9 +2698,9 @@ function unpublishEntryTool(config) {
2544
2698
  }
2545
2699
 
2546
2700
  // src/tools/entries/archiveEntry.ts
2547
- import { z as z43 } from "zod";
2701
+ import { z as z44 } from "zod";
2548
2702
  var ArchiveEntryToolParams = BaseToolSchema.extend({
2549
- entryId: z43.union([z43.string(), z43.array(z43.string()).max(100)]).describe(
2703
+ entryId: z44.union([z44.string(), z44.array(z44.string()).max(100)]).describe(
2550
2704
  "The ID of the entry to archive (string) or an array of entry IDs (up to 100 entries)"
2551
2705
  )
2552
2706
  });
@@ -2590,9 +2744,9 @@ function archiveEntryTool(config) {
2590
2744
  }
2591
2745
 
2592
2746
  // src/tools/entries/unarchiveEntry.ts
2593
- import { z as z44 } from "zod";
2747
+ import { z as z45 } from "zod";
2594
2748
  var UnarchiveEntryToolParams = BaseToolSchema.extend({
2595
- entryId: z44.union([z44.string(), z44.array(z44.string()).max(100)]).describe(
2749
+ entryId: z45.union([z45.string(), z45.array(z45.string()).max(100)]).describe(
2596
2750
  "The ID of the entry to unarchive (string) or an array of entry IDs (up to 100 entries)"
2597
2751
  )
2598
2752
  });
@@ -2755,11 +2909,11 @@ function createEntryTools(config) {
2755
2909
  }
2756
2910
 
2757
2911
  // src/tools/environments/createEnvironment.ts
2758
- import { z as z45 } from "zod";
2912
+ import { z as z46 } from "zod";
2759
2913
  var CreateEnvironmentToolParams = BaseToolSchema.extend({
2760
- environmentId: z45.string().describe("The ID of the environment to create"),
2761
- name: z45.string().describe("The name of the environment to create"),
2762
- sourceEnvironmentId: z45.string().describe(
2914
+ environmentId: z46.string().describe("The ID of the environment to create"),
2915
+ name: z46.string().describe("The name of the environment to create"),
2916
+ sourceEnvironmentId: z46.string().describe(
2763
2917
  "The ID of the source environment to clone from (defaults to master)"
2764
2918
  ).optional()
2765
2919
  });
@@ -2784,15 +2938,15 @@ function createEnvironmentTool(config) {
2784
2938
  }
2785
2939
 
2786
2940
  // src/tools/environments/listEnvironments.ts
2787
- import { z as z46 } from "zod";
2941
+ import { z as z47 } from "zod";
2788
2942
  var ListEnvironmentsToolParams = BaseToolSchema.extend({
2789
- environmentId: z46.string().optional().describe(
2943
+ environmentId: z47.string().optional().describe(
2790
2944
  "The ID of the Contentful environment (not required for listing)"
2791
2945
  ),
2792
- limit: z46.number().optional().describe("Maximum number of environments to return (max 10)"),
2793
- skip: z46.number().optional().describe("Skip this many environments for pagination"),
2794
- select: z46.string().optional().describe("Comma-separated list of fields to return"),
2795
- order: z46.string().optional().describe("Order environments by this field")
2946
+ limit: z47.number().optional().describe("Maximum number of environments to return (max 10)"),
2947
+ skip: z47.number().optional().describe("Skip this many environments for pagination"),
2948
+ select: z47.string().optional().describe("Comma-separated list of fields to return"),
2949
+ order: z47.string().optional().describe("Order environments by this field")
2796
2950
  });
2797
2951
  function listEnvironmentsTool(config) {
2798
2952
  async function tool2(args) {
@@ -2838,9 +2992,9 @@ function listEnvironmentsTool(config) {
2838
2992
  }
2839
2993
 
2840
2994
  // src/tools/environments/deleteEnvironment.ts
2841
- import { z as z47 } from "zod";
2995
+ import { z as z48 } from "zod";
2842
2996
  var DeleteEnvironmentToolParams = BaseToolSchema.extend({
2843
- environmentId: z47.string().describe("The ID of the environment to delete")
2997
+ environmentId: z48.string().describe("The ID of the environment to delete")
2844
2998
  });
2845
2999
  function deleteEnvironmentTool(config) {
2846
3000
  async function tool2(args) {
@@ -2901,9 +3055,9 @@ function createEnvironmentTools(config) {
2901
3055
  }
2902
3056
 
2903
3057
  // src/tools/locales/getLocale.ts
2904
- import { z as z48 } from "zod";
3058
+ import { z as z49 } from "zod";
2905
3059
  var GetLocaleToolParams = BaseToolSchema.extend({
2906
- localeId: z48.string().describe("The ID of the locale to retrieve")
3060
+ localeId: z49.string().describe("The ID of the locale to retrieve")
2907
3061
  });
2908
3062
  function getLocaleTool(config) {
2909
3063
  async function tool2(args) {
@@ -2920,21 +3074,21 @@ function getLocaleTool(config) {
2920
3074
  }
2921
3075
 
2922
3076
  // src/tools/locales/createLocale.ts
2923
- import { z as z49 } from "zod";
3077
+ import { z as z50 } from "zod";
2924
3078
  var CreateLocaleToolParams = BaseToolSchema.extend({
2925
- name: z49.string().describe("The name of the locale"),
2926
- code: z49.string().describe('The locale code (e.g., "en-US")'),
2927
- fallbackCode: z49.string().nullable().describe(
3079
+ name: z50.string().describe("The name of the locale"),
3080
+ code: z50.string().describe('The locale code (e.g., "en-US")'),
3081
+ fallbackCode: z50.string().nullable().describe(
2928
3082
  "The locale code to fallback to when there is no content for the current locale"
2929
3083
  ),
2930
- contentDeliveryApi: z49.boolean().optional().default(true).describe(
3084
+ contentDeliveryApi: z50.boolean().optional().default(true).describe(
2931
3085
  "If the content under this locale should be available on the CDA (for public reading)"
2932
3086
  ),
2933
- contentManagementApi: z49.boolean().optional().default(true).describe(
3087
+ contentManagementApi: z50.boolean().optional().default(true).describe(
2934
3088
  "If the content under this locale should be available on the CMA (for editing)"
2935
3089
  ),
2936
- default: z49.boolean().optional().default(false).describe("If this is the default locale"),
2937
- optional: z49.boolean().optional().default(false).describe("If the locale needs to be filled in on entries or not")
3090
+ default: z50.boolean().optional().default(false).describe("If this is the default locale"),
3091
+ optional: z50.boolean().optional().default(false).describe("If the locale needs to be filled in on entries or not")
2938
3092
  });
2939
3093
  function createLocaleTool(config) {
2940
3094
  async function tool2(args) {
@@ -2957,13 +3111,13 @@ function createLocaleTool(config) {
2957
3111
  }
2958
3112
 
2959
3113
  // src/tools/locales/listLocales.ts
2960
- import { z as z50 } from "zod";
3114
+ import { z as z51 } from "zod";
2961
3115
  var ListLocaleToolParams = BaseToolSchema.extend({
2962
- limit: z50.number().optional().describe("Maximum number of locales to return"),
2963
- skip: z50.number().optional().describe("Skip this many locales for pagination"),
2964
- select: z50.string().optional().describe("Comma-separated list of fields to return"),
2965
- include: z50.number().optional().describe("Include this many levels of linked entries"),
2966
- order: z50.string().optional().describe("Order locales by this field")
3116
+ limit: z51.number().optional().describe("Maximum number of locales to return"),
3117
+ skip: z51.number().optional().describe("Skip this many locales for pagination"),
3118
+ select: z51.string().optional().describe("Comma-separated list of fields to return"),
3119
+ include: z51.number().optional().describe("Include this many levels of linked entries"),
3120
+ order: z51.string().optional().describe("Order locales by this field")
2967
3121
  });
2968
3122
  function listLocaleTool(config) {
2969
3123
  async function tool2(args) {
@@ -3016,23 +3170,23 @@ function listLocaleTool(config) {
3016
3170
  }
3017
3171
 
3018
3172
  // src/tools/locales/updateLocale.ts
3019
- import { z as z51 } from "zod";
3173
+ import { z as z52 } from "zod";
3020
3174
  var UpdateLocaleToolParams = BaseToolSchema.extend({
3021
- localeId: z51.string().describe("The ID of the locale to update"),
3022
- fields: z51.object({
3023
- name: z51.string().optional().describe("The name of the locale"),
3175
+ localeId: z52.string().describe("The ID of the locale to update"),
3176
+ fields: z52.object({
3177
+ name: z52.string().optional().describe("The name of the locale"),
3024
3178
  // NOTE: internal_code changes are not allowed
3025
- code: z51.string().optional().describe("The code of the locale"),
3026
- fallbackCode: z51.string().optional().describe(
3179
+ code: z52.string().optional().describe("The code of the locale"),
3180
+ fallbackCode: z52.string().optional().describe(
3027
3181
  "The locale code to fallback to when there is no content for the current locale"
3028
3182
  ),
3029
- contentDeliveryApi: z51.boolean().optional().describe(
3183
+ contentDeliveryApi: z52.boolean().optional().describe(
3030
3184
  "If the content under this locale should be available on the CDA (for public reading)"
3031
3185
  ),
3032
- contentManagementApi: z51.boolean().optional().describe(
3186
+ contentManagementApi: z52.boolean().optional().describe(
3033
3187
  "If the content under this locale should be available on the CMA (for editing)"
3034
3188
  ),
3035
- optional: z51.boolean().optional().describe("If the locale needs to be filled in on entries or not")
3189
+ optional: z52.boolean().optional().describe("If the locale needs to be filled in on entries or not")
3036
3190
  })
3037
3191
  });
3038
3192
  function updateLocaleTool(config) {
@@ -3058,9 +3212,9 @@ function updateLocaleTool(config) {
3058
3212
  }
3059
3213
 
3060
3214
  // src/tools/locales/deleteLocale.ts
3061
- import { z as z52 } from "zod";
3215
+ import { z as z53 } from "zod";
3062
3216
  var DeleteLocaleToolParams = BaseToolSchema.extend({
3063
- localeId: z52.string().describe("The ID of the locale to delete")
3217
+ localeId: z53.string().describe("The ID of the locale to delete")
3064
3218
  });
3065
3219
  function deleteLocaleTool(config) {
3066
3220
  async function tool2(args) {
@@ -3145,13 +3299,13 @@ function createLocaleTools(config) {
3145
3299
  }
3146
3300
 
3147
3301
  // src/tools/orgs/listOrgs.ts
3148
- import { z as z53 } from "zod";
3302
+ import { z as z54 } from "zod";
3149
3303
  import ctfl2 from "contentful-management";
3150
- var ListOrgsToolParams = z53.object({
3151
- limit: z53.number().optional().describe("Maximum number of organizations to return (max 10)"),
3152
- skip: z53.number().optional().describe("Skip this many organizations for pagination"),
3153
- select: z53.string().optional().describe("Comma-separated list of fields to return"),
3154
- order: z53.string().optional().describe("Order organizations by this field")
3304
+ var ListOrgsToolParams = z54.object({
3305
+ limit: z54.number().optional().describe("Maximum number of organizations to return (max 10)"),
3306
+ skip: z54.number().optional().describe("Skip this many organizations for pagination"),
3307
+ select: z54.string().optional().describe("Comma-separated list of fields to return"),
3308
+ order: z54.string().optional().describe("Order organizations by this field")
3155
3309
  });
3156
3310
  function listOrgsTool(config) {
3157
3311
  async function tool2(args) {
@@ -3193,10 +3347,10 @@ function listOrgsTool(config) {
3193
3347
  }
3194
3348
 
3195
3349
  // src/tools/orgs/getOrg.ts
3196
- import { z as z54 } from "zod";
3350
+ import { z as z55 } from "zod";
3197
3351
  import ctfl3 from "contentful-management";
3198
- var GetOrgToolParams = z54.object({
3199
- organizationId: z54.string().describe("The ID of the organization to retrieve")
3352
+ var GetOrgToolParams = z55.object({
3353
+ organizationId: z55.string().describe("The ID of the organization to retrieve")
3200
3354
  });
3201
3355
  function getOrgTool(config) {
3202
3356
  async function tool2(args) {
@@ -3242,13 +3396,13 @@ function createOrgTools(config) {
3242
3396
  }
3243
3397
 
3244
3398
  // src/tools/spaces/listSpaces.ts
3245
- import { z as z55 } from "zod";
3399
+ import { z as z56 } from "zod";
3246
3400
  import ctfl4 from "contentful-management";
3247
- var ListSpacesToolParams = z55.object({
3248
- limit: z55.number().optional().describe("Maximum number of spaces to return (max 10)"),
3249
- skip: z55.number().optional().describe("Skip this many spaces for pagination"),
3250
- select: z55.string().optional().describe("Comma-separated list of fields to return"),
3251
- order: z55.string().optional().describe("Order spaces by this field")
3401
+ var ListSpacesToolParams = z56.object({
3402
+ limit: z56.number().optional().describe("Maximum number of spaces to return (max 10)"),
3403
+ skip: z56.number().optional().describe("Skip this many spaces for pagination"),
3404
+ select: z56.string().optional().describe("Comma-separated list of fields to return"),
3405
+ order: z56.string().optional().describe("Order spaces by this field")
3252
3406
  });
3253
3407
  function listSpacesTool(config) {
3254
3408
  async function tool2(args) {
@@ -3290,10 +3444,10 @@ function listSpacesTool(config) {
3290
3444
  }
3291
3445
 
3292
3446
  // src/tools/spaces/getSpace.ts
3293
- import { z as z56 } from "zod";
3447
+ import { z as z57 } from "zod";
3294
3448
  import ctfl5 from "contentful-management";
3295
- var GetSpaceToolParams = z56.object({
3296
- spaceId: z56.string().describe("The ID of the space to retrieve")
3449
+ var GetSpaceToolParams = z57.object({
3450
+ spaceId: z57.string().describe("The ID of the space to retrieve")
3297
3451
  });
3298
3452
  function getSpaceTool(config) {
3299
3453
  async function tool2(args) {
@@ -3337,12 +3491,12 @@ function createSpaceTools(config) {
3337
3491
  }
3338
3492
 
3339
3493
  // src/tools/tags/listTags.ts
3340
- import { z as z57 } from "zod";
3494
+ import { z as z58 } from "zod";
3341
3495
  var ListTagsToolParams = BaseToolSchema.extend({
3342
- limit: z57.number().optional().describe("Maximum number of tags to return"),
3343
- skip: z57.number().optional().describe("Skip this many tags for pagination"),
3344
- select: z57.string().optional().describe("Comma-separated list of fields to return"),
3345
- order: z57.string().optional().describe("Order tags by this field")
3496
+ limit: z58.number().optional().describe("Maximum number of tags to return"),
3497
+ skip: z58.number().optional().describe("Skip this many tags for pagination"),
3498
+ select: z58.string().optional().describe("Comma-separated list of fields to return"),
3499
+ order: z58.string().optional().describe("Order tags by this field")
3346
3500
  });
3347
3501
  function listTagsTool(config) {
3348
3502
  async function tool2(args) {
@@ -3388,11 +3542,11 @@ function listTagsTool(config) {
3388
3542
  }
3389
3543
 
3390
3544
  // src/tools/tags/createTag.ts
3391
- import { z as z58 } from "zod";
3545
+ import { z as z59 } from "zod";
3392
3546
  var CreateTagToolParams = BaseToolSchema.extend({
3393
- name: z58.string().describe("The name of the tag"),
3394
- id: z58.string().describe("The ID of the tag"),
3395
- visibility: z58.enum(["public", "private"]).describe("The visibility of the tag. Default to private if not specified")
3547
+ name: z59.string().describe("The name of the tag"),
3548
+ id: z59.string().describe("The ID of the tag"),
3549
+ visibility: z59.enum(["public", "private"]).describe("The visibility of the tag. Default to private if not specified")
3396
3550
  });
3397
3551
  function createTagTool(config) {
3398
3552
  async function tool2(args) {
@@ -3442,34 +3596,34 @@ function createTagTools(config) {
3442
3596
  }
3443
3597
 
3444
3598
  // src/tools/taxonomies/concept-schemes/createConceptScheme.ts
3445
- import { z as z60 } from "zod";
3599
+ import { z as z61 } from "zod";
3446
3600
  import ctfl6 from "contentful-management";
3447
3601
 
3448
3602
  // src/types/conceptPayloadTypes.ts
3449
- import { z as z59 } from "zod";
3450
- var TaxonomyConceptLinkSchema = z59.object({
3451
- sys: z59.object({
3452
- type: z59.literal("Link"),
3453
- linkType: z59.literal("TaxonomyConcept"),
3454
- id: z59.string()
3603
+ import { z as z60 } from "zod";
3604
+ var TaxonomyConceptLinkSchema = z60.object({
3605
+ sys: z60.object({
3606
+ type: z60.literal("Link"),
3607
+ linkType: z60.literal("TaxonomyConcept"),
3608
+ id: z60.string()
3455
3609
  })
3456
3610
  });
3457
3611
 
3458
3612
  // src/tools/taxonomies/concept-schemes/createConceptScheme.ts
3459
- var CreateConceptSchemeToolParams = z60.object({
3460
- organizationId: z60.string().describe("The ID of the Contentful organization"),
3461
- conceptSchemeId: z60.string().optional().describe(
3613
+ var CreateConceptSchemeToolParams = z61.object({
3614
+ organizationId: z61.string().describe("The ID of the Contentful organization"),
3615
+ conceptSchemeId: z61.string().optional().describe(
3462
3616
  "Optional user-defined ID for the concept scheme. If not provided, Contentful will generate one automatically."
3463
3617
  ),
3464
- prefLabel: z60.record(z60.string()).describe("The preferred label for the concept scheme (localized)"),
3465
- uri: z60.string().nullable().optional().describe("The URI for the concept scheme"),
3466
- definition: z60.record(z60.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
3467
- editorialNote: z60.record(z60.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
3468
- historyNote: z60.record(z60.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
3469
- example: z60.record(z60.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
3470
- note: z60.record(z60.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
3471
- scopeNote: z60.record(z60.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
3472
- topConcepts: z60.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme")
3618
+ prefLabel: z61.record(z61.string()).describe("The preferred label for the concept scheme (localized)"),
3619
+ uri: z61.string().nullable().optional().describe("The URI for the concept scheme"),
3620
+ definition: z61.record(z61.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
3621
+ editorialNote: z61.record(z61.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
3622
+ historyNote: z61.record(z61.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
3623
+ example: z61.record(z61.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
3624
+ note: z61.record(z61.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
3625
+ scopeNote: z61.record(z61.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
3626
+ topConcepts: z61.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme")
3473
3627
  });
3474
3628
  function createConceptSchemeTool(config) {
3475
3629
  async function tool2(args) {
@@ -3509,11 +3663,11 @@ function createConceptSchemeTool(config) {
3509
3663
  }
3510
3664
 
3511
3665
  // src/tools/taxonomies/concept-schemes/getConceptScheme.ts
3512
- import { z as z61 } from "zod";
3666
+ import { z as z62 } from "zod";
3513
3667
  import ctfl7 from "contentful-management";
3514
- var GetConceptSchemeToolParams = z61.object({
3515
- organizationId: z61.string().describe("The ID of the Contentful organization"),
3516
- conceptSchemeId: z61.string().describe("The ID of the concept scheme to retrieve")
3668
+ var GetConceptSchemeToolParams = z62.object({
3669
+ organizationId: z62.string().describe("The ID of the Contentful organization"),
3670
+ conceptSchemeId: z62.string().describe("The ID of the concept scheme to retrieve")
3517
3671
  });
3518
3672
  function getConceptSchemeTool(config) {
3519
3673
  async function tool2(args) {
@@ -3533,30 +3687,60 @@ function getConceptSchemeTool(config) {
3533
3687
  }
3534
3688
 
3535
3689
  // src/tools/taxonomies/concept-schemes/listConceptSchemes.ts
3536
- import { z as z62 } from "zod";
3690
+ import { z as z63 } from "zod";
3537
3691
  import ctfl8 from "contentful-management";
3538
- var ListConceptSchemesToolParams = z62.object({
3539
- organizationId: z62.string().describe("The ID of the Contentful organization"),
3540
- limit: z62.number().optional().describe("Maximum number of concept schemes to return"),
3541
- skip: z62.number().optional().describe("Skip this many concept schemes for pagination"),
3542
- select: z62.string().optional().describe("Comma-separated list of fields to return"),
3543
- include: z62.number().optional().describe("Include this many levels of linked entries"),
3544
- order: z62.string().optional().describe("Order concept schemes by this field")
3545
- });
3692
+ import { cloneDeep } from "lodash-es";
3693
+ var ListConceptSchemesToolParams = z63.object({
3694
+ organizationId: z63.string(),
3695
+ query: z63.union([
3696
+ z63.object({
3697
+ query: z63.string().optional(),
3698
+ pageNext: z63.string().optional().describe("Cursor token for the next page of concept schemes"),
3699
+ pagePrev: z63.string().optional().describe(
3700
+ "Cursor token for the previous page of concept schemes"
3701
+ ),
3702
+ limit: z63.number().optional().describe("Maximum number of concept schemes to return"),
3703
+ order: z63.string().optional().describe("Order concept schemes by this field"),
3704
+ skip: z63.never().optional()
3705
+ }).passthrough(),
3706
+ // handles [key: string]: any from BasicQueryOptions
3707
+ z63.object({
3708
+ pageUrl: z63.string().optional()
3709
+ })
3710
+ ]).optional().describe(
3711
+ 'Query parameters for listing concept schemes, supports either pageUrl for cursor-based pagination. Offset "skip" pagination is not supported.'
3712
+ )
3713
+ }).describe(
3714
+ "Parameters for listing concept schemes, cursor-based pagination is strictly enforced"
3715
+ );
3546
3716
  function listConceptSchemesTool(config) {
3547
3717
  async function tool2(args) {
3548
3718
  const clientConfig = createClientConfig(config);
3549
3719
  delete clientConfig.space;
3550
3720
  const contentfulClient = ctfl8.createClient(clientConfig, { type: "plain" });
3721
+ const query = {};
3722
+ if (args.query) {
3723
+ if ("pageUrl" in args.query && args.query.pageUrl) {
3724
+ query["pageUrl"] = args.query.pageUrl;
3725
+ } else {
3726
+ const complexQuery = cloneDeep(args.query);
3727
+ if (complexQuery["query"]) query["query"] = complexQuery["query"];
3728
+ if (complexQuery["pageNext"])
3729
+ query["pageNext"] = complexQuery["pageNext"];
3730
+ if (complexQuery["pagePrev"])
3731
+ query["pagePrev"] = complexQuery["pagePrev"];
3732
+ if (complexQuery["select"]) query["select"] = complexQuery["select"];
3733
+ if (complexQuery["include"]) query["include"] = complexQuery["include"];
3734
+ if (complexQuery["order"]) query["order"] = complexQuery["order"];
3735
+ if (complexQuery["limit"]) query["limit"] = complexQuery["limit"];
3736
+ }
3737
+ }
3738
+ if (!query["limit"] && !query["pageUrl"]) {
3739
+ query["limit"] = 10;
3740
+ }
3551
3741
  const conceptSchemes = await contentfulClient.conceptScheme.getMany({
3552
3742
  organizationId: args.organizationId,
3553
- query: {
3554
- limit: args.limit || 10,
3555
- skip: args.skip || 0,
3556
- ...args.select && { select: args.select },
3557
- ...args.include && { include: args.include },
3558
- ...args.order && { order: args.order }
3559
- }
3743
+ query
3560
3744
  });
3561
3745
  const summarizedConceptSchemes = conceptSchemes.items.map(
3562
3746
  (conceptScheme) => ({
@@ -3577,36 +3761,36 @@ function listConceptSchemesTool(config) {
3577
3761
  },
3578
3762
  {
3579
3763
  maxItems: 10,
3580
- remainingMessage: "To see more concept schemes, please ask me to retrieve the next page using the skip parameter."
3764
+ remainingMessage: "To see more concept schemes, please ask me to retrieve the next page using cursor based pagination with pageNext and pagePrev."
3581
3765
  }
3582
3766
  );
3767
+ const queryLimit = args.query && "limit" in args.query ? args.query.limit : void 0;
3583
3768
  return createSuccessResponse("Concept schemes retrieved successfully", {
3584
3769
  conceptSchemes: summarized,
3585
3770
  total: conceptSchemes.total || conceptSchemes.items.length,
3586
- limit: conceptSchemes.limit || args.limit || 10,
3587
- skip: conceptSchemes.skip || args.skip || 0
3771
+ limit: conceptSchemes.limit || queryLimit || 10
3588
3772
  });
3589
3773
  }
3590
3774
  return withErrorHandling(tool2, "Error listing concept schemes");
3591
3775
  }
3592
3776
 
3593
3777
  // src/tools/taxonomies/concept-schemes/updateConceptScheme.ts
3594
- import { z as z63 } from "zod";
3778
+ import { z as z64 } from "zod";
3595
3779
  import ctfl9 from "contentful-management";
3596
- var UpdateConceptSchemeToolParams = z63.object({
3597
- organizationId: z63.string().describe("The ID of the Contentful organization"),
3598
- conceptSchemeId: z63.string().describe("The ID of the concept scheme to update"),
3599
- version: z63.number().describe("The current version of the concept scheme"),
3600
- prefLabel: z63.record(z63.string()).optional().describe("The preferred label for the concept scheme (localized)"),
3601
- uri: z63.string().nullable().optional().describe("The URI for the concept scheme"),
3602
- definition: z63.record(z63.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
3603
- editorialNote: z63.record(z63.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
3604
- historyNote: z63.record(z63.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
3605
- example: z63.record(z63.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
3606
- note: z63.record(z63.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
3607
- scopeNote: z63.record(z63.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
3608
- topConcepts: z63.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme"),
3609
- addConcept: z63.string().optional().describe(
3780
+ var UpdateConceptSchemeToolParams = z64.object({
3781
+ organizationId: z64.string().describe("The ID of the Contentful organization"),
3782
+ conceptSchemeId: z64.string().describe("The ID of the concept scheme to update"),
3783
+ version: z64.number().describe("The current version of the concept scheme"),
3784
+ prefLabel: z64.record(z64.string()).optional().describe("The preferred label for the concept scheme (localized)"),
3785
+ uri: z64.string().nullable().optional().describe("The URI for the concept scheme"),
3786
+ definition: z64.record(z64.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
3787
+ editorialNote: z64.record(z64.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
3788
+ historyNote: z64.record(z64.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
3789
+ example: z64.record(z64.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
3790
+ note: z64.record(z64.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
3791
+ scopeNote: z64.record(z64.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
3792
+ topConcepts: z64.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme"),
3793
+ addConcept: z64.string().optional().describe(
3610
3794
  "ID of a concept to add to this scheme (adds to both concepts and topConcepts)"
3611
3795
  )
3612
3796
  });
@@ -3681,12 +3865,12 @@ function updateConceptSchemeTool(config) {
3681
3865
  }
3682
3866
 
3683
3867
  // src/tools/taxonomies/concept-schemes/deleteConceptScheme.ts
3684
- import { z as z64 } from "zod";
3868
+ import { z as z65 } from "zod";
3685
3869
  import ctfl10 from "contentful-management";
3686
- var DeleteConceptSchemeToolParams = z64.object({
3687
- organizationId: z64.string().describe("The ID of the Contentful organization"),
3688
- conceptSchemeId: z64.string().describe("The ID of the concept scheme to delete"),
3689
- version: z64.number().describe("The version of the concept scheme to delete")
3870
+ var DeleteConceptSchemeToolParams = z65.object({
3871
+ organizationId: z65.string().describe("The ID of the Contentful organization"),
3872
+ conceptSchemeId: z65.string().describe("The ID of the concept scheme to delete"),
3873
+ version: z65.number().describe("The version of the concept scheme to delete")
3690
3874
  });
3691
3875
  function deleteConceptSchemeTool(config) {
3692
3876
  async function tool2(args) {
@@ -3773,26 +3957,26 @@ function createConceptSchemeTools(config) {
3773
3957
  }
3774
3958
 
3775
3959
  // src/tools/taxonomies/concepts/createConcept.ts
3776
- import { z as z65 } from "zod";
3960
+ import { z as z66 } from "zod";
3777
3961
  import ctfl11 from "contentful-management";
3778
- var CreateConceptToolParams = z65.object({
3779
- organizationId: z65.string().describe("The ID of the Contentful organization"),
3780
- conceptId: z65.string().optional().describe(
3962
+ var CreateConceptToolParams = z66.object({
3963
+ organizationId: z66.string().describe("The ID of the Contentful organization"),
3964
+ conceptId: z66.string().optional().describe(
3781
3965
  "Optional user-defined ID for the concept. If not provided, Contentful will generate one automatically."
3782
3966
  ),
3783
- prefLabel: z65.record(z65.string()).describe("The preferred label for the concept (localized)"),
3784
- uri: z65.string().nullable().optional().describe("The URI for the concept"),
3785
- altLabels: z65.record(z65.array(z65.string())).optional().describe("Alternative labels for the concept (localized)"),
3786
- hiddenLabels: z65.record(z65.array(z65.string())).optional().describe("Hidden labels for the concept (localized)"),
3787
- definition: z65.record(z65.string().nullable()).optional().describe("Definition of the concept (localized)"),
3788
- editorialNote: z65.record(z65.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
3789
- historyNote: z65.record(z65.string().nullable()).optional().describe("History note for the concept (localized)"),
3790
- example: z65.record(z65.string().nullable()).optional().describe("Example for the concept (localized)"),
3791
- note: z65.record(z65.string().nullable()).optional().describe("General note for the concept (localized)"),
3792
- scopeNote: z65.record(z65.string().nullable()).optional().describe("Scope note for the concept (localized)"),
3793
- notations: z65.array(z65.string()).optional().describe("Notations for the concept"),
3794
- broader: z65.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
3795
- related: z65.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
3967
+ prefLabel: z66.record(z66.string()).describe("The preferred label for the concept (localized)"),
3968
+ uri: z66.string().nullable().optional().describe("The URI for the concept"),
3969
+ altLabels: z66.record(z66.array(z66.string())).optional().describe("Alternative labels for the concept (localized)"),
3970
+ hiddenLabels: z66.record(z66.array(z66.string())).optional().describe("Hidden labels for the concept (localized)"),
3971
+ definition: z66.record(z66.string().nullable()).optional().describe("Definition of the concept (localized)"),
3972
+ editorialNote: z66.record(z66.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
3973
+ historyNote: z66.record(z66.string().nullable()).optional().describe("History note for the concept (localized)"),
3974
+ example: z66.record(z66.string().nullable()).optional().describe("Example for the concept (localized)"),
3975
+ note: z66.record(z66.string().nullable()).optional().describe("General note for the concept (localized)"),
3976
+ scopeNote: z66.record(z66.string().nullable()).optional().describe("Scope note for the concept (localized)"),
3977
+ notations: z66.array(z66.string()).optional().describe("Notations for the concept"),
3978
+ broader: z66.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
3979
+ related: z66.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
3796
3980
  });
3797
3981
  function createConceptTool(config) {
3798
3982
  async function tool2(args) {
@@ -3827,12 +4011,12 @@ function createConceptTool(config) {
3827
4011
  }
3828
4012
 
3829
4013
  // src/tools/taxonomies/concepts/deleteConcept.ts
3830
- import { z as z66 } from "zod";
4014
+ import { z as z67 } from "zod";
3831
4015
  import ctfl12 from "contentful-management";
3832
- var DeleteConceptToolParams = z66.object({
3833
- organizationId: z66.string().describe("The ID of the Contentful organization"),
3834
- conceptId: z66.string().describe("The ID of the concept to delete"),
3835
- version: z66.number().describe("The version of the concept to delete")
4016
+ var DeleteConceptToolParams = z67.object({
4017
+ organizationId: z67.string().describe("The ID of the Contentful organization"),
4018
+ conceptId: z67.string().describe("The ID of the concept to delete"),
4019
+ version: z67.number().describe("The version of the concept to delete")
3836
4020
  });
3837
4021
  function deleteConceptTool(config) {
3838
4022
  async function tool2(args) {
@@ -3852,25 +4036,25 @@ function deleteConceptTool(config) {
3852
4036
  }
3853
4037
 
3854
4038
  // src/tools/taxonomies/concepts/updateConcept.ts
3855
- import { z as z67 } from "zod";
4039
+ import { z as z68 } from "zod";
3856
4040
  import ctfl13 from "contentful-management";
3857
- var UpdateConceptToolParams = z67.object({
3858
- organizationId: z67.string().describe("The ID of the Contentful organization"),
3859
- conceptId: z67.string().describe("The ID of the concept to update"),
3860
- version: z67.number().describe("The current version of the concept"),
3861
- prefLabel: z67.record(z67.string()).optional().describe("The preferred label for the concept (localized)"),
3862
- uri: z67.string().nullable().optional().describe("The URI for the concept"),
3863
- altLabels: z67.record(z67.array(z67.string())).optional().describe("Alternative labels for the concept (localized)"),
3864
- hiddenLabels: z67.record(z67.array(z67.string())).optional().describe("Hidden labels for the concept (localized)"),
3865
- definition: z67.record(z67.string().nullable()).optional().describe("Definition of the concept (localized)"),
3866
- editorialNote: z67.record(z67.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
3867
- historyNote: z67.record(z67.string().nullable()).optional().describe("History note for the concept (localized)"),
3868
- example: z67.record(z67.string().nullable()).optional().describe("Example for the concept (localized)"),
3869
- note: z67.record(z67.string().nullable()).optional().describe("General note for the concept (localized)"),
3870
- scopeNote: z67.record(z67.string().nullable()).optional().describe("Scope note for the concept (localized)"),
3871
- notations: z67.array(z67.string()).optional().describe("Notations for the concept"),
3872
- broader: z67.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
3873
- related: z67.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
4041
+ var UpdateConceptToolParams = z68.object({
4042
+ organizationId: z68.string().describe("The ID of the Contentful organization"),
4043
+ conceptId: z68.string().describe("The ID of the concept to update"),
4044
+ version: z68.number().describe("The current version of the concept"),
4045
+ prefLabel: z68.record(z68.string()).optional().describe("The preferred label for the concept (localized)"),
4046
+ uri: z68.string().nullable().optional().describe("The URI for the concept"),
4047
+ altLabels: z68.record(z68.array(z68.string())).optional().describe("Alternative labels for the concept (localized)"),
4048
+ hiddenLabels: z68.record(z68.array(z68.string())).optional().describe("Hidden labels for the concept (localized)"),
4049
+ definition: z68.record(z68.string().nullable()).optional().describe("Definition of the concept (localized)"),
4050
+ editorialNote: z68.record(z68.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
4051
+ historyNote: z68.record(z68.string().nullable()).optional().describe("History note for the concept (localized)"),
4052
+ example: z68.record(z68.string().nullable()).optional().describe("Example for the concept (localized)"),
4053
+ note: z68.record(z68.string().nullable()).optional().describe("General note for the concept (localized)"),
4054
+ scopeNote: z68.record(z68.string().nullable()).optional().describe("Scope note for the concept (localized)"),
4055
+ notations: z68.array(z68.string()).optional().describe("Notations for the concept"),
4056
+ broader: z68.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
4057
+ related: z68.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
3874
4058
  });
3875
4059
  function updateConceptTool(config) {
3876
4060
  async function tool2(args) {
@@ -3912,11 +4096,11 @@ function updateConceptTool(config) {
3912
4096
  }
3913
4097
 
3914
4098
  // src/tools/taxonomies/concepts/getConcept.ts
3915
- import { z as z68 } from "zod";
4099
+ import { z as z69 } from "zod";
3916
4100
  import ctfl14 from "contentful-management";
3917
- var GetConceptToolParams = z68.object({
3918
- organizationId: z68.string().describe("The ID of the Contentful organization"),
3919
- conceptId: z68.string().describe("The ID of the concept to retrieve")
4101
+ var GetConceptToolParams = z69.object({
4102
+ organizationId: z69.string().describe("The ID of the Contentful organization"),
4103
+ conceptId: z69.string().describe("The ID of the concept to retrieve")
3920
4104
  });
3921
4105
  function getConceptTool(config) {
3922
4106
  async function tool2(args) {
@@ -3933,19 +4117,18 @@ function getConceptTool(config) {
3933
4117
  }
3934
4118
 
3935
4119
  // src/tools/taxonomies/concepts/listConcepts.ts
3936
- import { z as z69 } from "zod";
4120
+ import { z as z70 } from "zod";
3937
4121
  import ctfl15 from "contentful-management";
3938
- var ListConceptsToolParams = z69.object({
3939
- organizationId: z69.string().describe("The ID of the Contentful organization"),
3940
- conceptId: z69.string().optional().describe("The ID of the concept (required for descendants/ancestors)"),
3941
- limit: z69.number().optional().describe("Maximum number of concepts to return"),
3942
- skip: z69.number().optional().describe("Skip this many concepts for pagination"),
3943
- select: z69.string().optional().describe("Comma-separated list of fields to return"),
3944
- include: z69.number().optional().describe("Include this many levels of linked entries"),
3945
- order: z69.string().optional().describe("Order concepts by this field"),
3946
- getDescendants: z69.boolean().optional().describe("Get descendants of the specified concept (requires conceptId)"),
3947
- getAncestors: z69.boolean().optional().describe("Get ancestors of the specified concept (requires conceptId)"),
3948
- getTotalOnly: z69.boolean().optional().describe("Get only the total number of concepts without full data")
4122
+ var ListConceptsToolParams = z70.object({
4123
+ organizationId: z70.string().describe("The ID of the Contentful organization"),
4124
+ conceptId: z70.string().optional().describe("The ID of the concept (required for descendants/ancestors)"),
4125
+ limit: z70.number().optional().describe("Maximum number of concepts to return"),
4126
+ select: z70.string().optional().describe("Comma-separated list of fields to return"),
4127
+ include: z70.number().optional().describe("Include this many levels of linked entries"),
4128
+ order: z70.string().optional().describe("Order concepts by this field"),
4129
+ getDescendants: z70.boolean().optional().describe("Get descendants of the specified concept (requires conceptId)"),
4130
+ getAncestors: z70.boolean().optional().describe("Get ancestors of the specified concept (requires conceptId)"),
4131
+ getTotalOnly: z70.boolean().optional().describe("Get only the total number of concepts without full data")
3949
4132
  });
3950
4133
  function listConceptsTool(config) {
3951
4134
  async function tool2(args) {
@@ -3970,7 +4153,6 @@ function listConceptsTool(config) {
3970
4153
  organizationId: args.organizationId,
3971
4154
  conceptId: args.conceptId,
3972
4155
  ...args.limit && { limit: args.limit },
3973
- ...args.skip && { skip: args.skip },
3974
4156
  ...args.select && { select: args.select },
3975
4157
  ...args.include && { include: args.include },
3976
4158
  ...args.order && { order: args.order }
@@ -3996,7 +4178,6 @@ function listConceptsTool(config) {
3996
4178
  organizationId: args.organizationId,
3997
4179
  conceptId: args.conceptId,
3998
4180
  ...args.limit && { limit: args.limit },
3999
- ...args.skip && { skip: args.skip },
4000
4181
  ...args.select && { select: args.select },
4001
4182
  ...args.include && { include: args.include },
4002
4183
  ...args.order && { order: args.order }
@@ -4021,7 +4202,6 @@ function listConceptsTool(config) {
4021
4202
  organizationId: args.organizationId,
4022
4203
  query: {
4023
4204
  limit: args.limit || 10,
4024
- skip: args.skip || 0,
4025
4205
  ...args.select && { select: args.select },
4026
4206
  ...args.include && { include: args.include },
4027
4207
  ...args.order && { order: args.order }
@@ -4124,61 +4304,64 @@ function createTaxonomyTools(config) {
4124
4304
  }
4125
4305
 
4126
4306
  // src/tools/jobs/space-to-space-migration/exportSpace.ts
4127
- import { z as z71 } from "zod";
4307
+ import { z as z72 } from "zod";
4308
+ import * as contentfulExportModule from "contentful-export";
4309
+ import { join } from "path";
4128
4310
 
4129
4311
  // src/types/querySchema.ts
4130
- import { z as z70 } from "zod";
4131
- var EntryQuerySchema = z70.object({
4132
- content_type: z70.string().optional().describe("Filter by content type"),
4133
- include: z70.number().optional().describe("Include this many levels of linked entries"),
4134
- select: z70.string().optional().describe("Comma-separated list of fields to return"),
4135
- links_to_entry: z70.string().optional().describe("Find entries that link to the specified entry ID"),
4136
- limit: z70.number().optional().describe("Maximum number of entries to return"),
4137
- skip: z70.number().optional().describe("Skip this many entries"),
4138
- order: z70.string().optional().describe("Order entries by this field")
4312
+ import { z as z71 } from "zod";
4313
+ var EntryQuerySchema = z71.object({
4314
+ content_type: z71.string().optional().describe("Filter by content type"),
4315
+ include: z71.number().optional().describe("Include this many levels of linked entries"),
4316
+ select: z71.string().optional().describe("Comma-separated list of fields to return"),
4317
+ links_to_entry: z71.string().optional().describe("Find entries that link to the specified entry ID"),
4318
+ limit: z71.number().optional().describe("Maximum number of entries to return"),
4319
+ skip: z71.number().optional().describe("Skip this many entries"),
4320
+ order: z71.string().optional().describe("Order entries by this field")
4139
4321
  });
4140
- var AssetQuerySchema = z70.object({
4141
- mimetype_group: z70.string().optional().describe("Filter by MIME type group"),
4142
- select: z70.string().optional().describe("Comma-separated list of fields to return"),
4143
- limit: z70.number().optional().describe("Maximum number of assets to return"),
4144
- skip: z70.number().optional().describe("Skip this many assets"),
4145
- order: z70.string().optional().describe("Order assets by this field")
4322
+ var AssetQuerySchema = z71.object({
4323
+ mimetype_group: z71.string().optional().describe("Filter by MIME type group"),
4324
+ select: z71.string().optional().describe("Comma-separated list of fields to return"),
4325
+ limit: z71.number().optional().describe("Maximum number of assets to return"),
4326
+ skip: z71.number().optional().describe("Skip this many assets"),
4327
+ order: z71.string().optional().describe("Order assets by this field")
4146
4328
  });
4147
4329
 
4148
4330
  // src/tools/jobs/space-to-space-migration/exportSpace.ts
4331
+ var contentfulExport = contentfulExportModule.default ?? contentfulExportModule;
4149
4332
  var ExportSpaceToolParams = BaseToolSchema.extend({
4150
- exportDir: z71.string().optional().describe(
4333
+ exportDir: z72.string().optional().describe(
4151
4334
  "Directory to save the exported space data (optional, defaults to current directory)"
4152
4335
  ),
4153
- saveFile: z71.boolean().optional().default(true).describe("Save the exported space data to a file"),
4154
- contentFile: z71.string().optional().describe("Custom filename for the exported space data (optional)"),
4155
- includeDrafts: z71.boolean().optional().default(false).describe("Include draft entries in the export"),
4156
- includeArchived: z71.boolean().optional().default(false).describe("Include archived entries in the export"),
4157
- skipContentModel: z71.boolean().optional().default(false).describe("Skip exporting content types"),
4158
- skipEditorInterfaces: z71.boolean().optional().default(false).describe("Skip exporting editor interfaces"),
4159
- skipContent: z71.boolean().optional().default(false).describe("Skip exporting entries and assets"),
4160
- skipRoles: z71.boolean().optional().default(false).describe("Skip exporting roles and permissions"),
4161
- skipTags: z71.boolean().optional().default(false).describe("Skip exporting tags"),
4162
- skipWebhooks: z71.boolean().optional().default(false).describe("Skip exporting webhooks"),
4163
- stripTags: z71.boolean().optional().default(false).describe("Untag assets and entries"),
4164
- contentOnly: z71.boolean().optional().default(false).describe("Only export assets and entries"),
4336
+ saveFile: z72.boolean().optional().default(true).describe("Save the exported space data to a file"),
4337
+ contentFile: z72.string().optional().describe("Custom filename for the exported space data (optional)"),
4338
+ includeDrafts: z72.boolean().optional().default(false).describe("Include draft entries in the export"),
4339
+ includeArchived: z72.boolean().optional().default(false).describe("Include archived entries in the export"),
4340
+ skipContentModel: z72.boolean().optional().default(false).describe("Skip exporting content types"),
4341
+ skipEditorInterfaces: z72.boolean().optional().default(false).describe("Skip exporting editor interfaces"),
4342
+ skipContent: z72.boolean().optional().default(false).describe("Skip exporting entries and assets"),
4343
+ skipRoles: z72.boolean().optional().default(false).describe("Skip exporting roles and permissions"),
4344
+ skipTags: z72.boolean().optional().default(false).describe("Skip exporting tags"),
4345
+ skipWebhooks: z72.boolean().optional().default(false).describe("Skip exporting webhooks"),
4346
+ stripTags: z72.boolean().optional().default(false).describe("Untag assets and entries"),
4347
+ contentOnly: z72.boolean().optional().default(false).describe("Only export assets and entries"),
4165
4348
  queryEntries: EntryQuerySchema.optional().describe(
4166
4349
  "Export only entries that match query parameters"
4167
4350
  ),
4168
4351
  queryAssets: AssetQuerySchema.optional().describe(
4169
4352
  "Export only assets that match query parameters"
4170
4353
  ),
4171
- downloadAssets: z71.boolean().optional().default(false).describe("Download actual asset files"),
4172
- maxAllowedLimit: z71.number().optional().default(1e3).describe("Maximum number of items per request"),
4173
- deliveryToken: z71.string().optional().describe("CDA token to export only published content (excludes tags)"),
4174
- host: z71.string().optional().describe("Management API host"),
4175
- hostDelivery: z71.string().optional().describe("Delivery API host"),
4176
- proxy: z71.string().optional().describe("HTTP/HTTPS proxy config"),
4177
- rawProxy: z71.boolean().optional().describe("Pass raw proxy config directly to Axios"),
4178
- headers: z71.record(z71.string()).optional().describe("Additional headers to include in requests"),
4179
- errorLogFile: z71.string().optional().describe("Path to error log output file"),
4180
- useVerboseRenderer: z71.boolean().optional().describe("Line-by-line logging, useful for CI"),
4181
- config: z71.string().optional().describe("Path to a JSON config file with all options")
4354
+ downloadAssets: z72.boolean().optional().default(false).describe("Download actual asset files"),
4355
+ maxAllowedLimit: z72.number().optional().default(1e3).describe("Maximum number of items per request"),
4356
+ deliveryToken: z72.string().optional().describe("CDA token to export only published content (excludes tags)"),
4357
+ host: z72.string().optional().describe("Management API host"),
4358
+ hostDelivery: z72.string().optional().describe("Delivery API host"),
4359
+ proxy: z72.string().optional().describe("HTTP/HTTPS proxy config"),
4360
+ rawProxy: z72.boolean().optional().describe("Pass raw proxy config directly to Axios"),
4361
+ headers: z72.record(z72.string()).optional().describe("Additional headers to include in requests"),
4362
+ errorLogFile: z72.string().optional().describe("Path to error log output file"),
4363
+ useVerboseRenderer: z72.boolean().optional().describe("Line-by-line logging, useful for CI"),
4364
+ config: z72.string().optional().describe("Path to a JSON config file with all options")
4182
4365
  });
4183
4366
  function createExportSpaceTool(config) {
4184
4367
  async function tool2(args) {
@@ -4195,10 +4378,8 @@ function createExportSpaceTool(config) {
4195
4378
  contentFile: args.contentFile || `contentful-export-${args.spaceId}.json`
4196
4379
  };
4197
4380
  try {
4198
- const contentfulExport = await import("contentful-export");
4199
- const path = await import("path");
4200
- const result = await contentfulExport.default(exportOptions);
4201
- const exportPath = path.join(
4381
+ const result = await contentfulExport(exportOptions);
4382
+ const exportPath = join(
4202
4383
  exportOptions.exportDir,
4203
4384
  exportOptions.contentFile
4204
4385
  );
@@ -4225,70 +4406,70 @@ function createExportSpaceTool(config) {
4225
4406
  }
4226
4407
 
4227
4408
  // src/tools/jobs/space-to-space-migration/paramCollection.ts
4228
- import { z as z72 } from "zod";
4409
+ import { z as z73 } from "zod";
4229
4410
  var ParamCollectionToolParams = BaseToolSchema.extend({
4230
- confirmation: z72.boolean().optional().describe(
4411
+ confirmation: z73.boolean().optional().describe(
4231
4412
  "User confirmation that they are ready to proceed with the workflow"
4232
4413
  ),
4233
- export: z72.object({
4234
- spaceId: z72.string().optional().describe("ID of the space with source data"),
4235
- environmentId: z72.string().optional().describe("ID of the environment in the source space"),
4236
- deliveryToken: z72.string().optional().describe("CDA token to export only published content (excludes tags)"),
4237
- exportDir: z72.string().optional().describe("Path to export JSON output"),
4238
- saveFile: z72.boolean().optional().describe("Save the export as a JSON file"),
4239
- contentFile: z72.string().optional().describe("Filename for exported data"),
4240
- includeDrafts: z72.boolean().optional().describe("Include drafts in exported entries"),
4241
- includeArchived: z72.boolean().optional().describe("Include archived entries"),
4242
- skipContentModel: z72.boolean().optional().describe("Skip exporting content models"),
4243
- skipEditorInterfaces: z72.boolean().optional().describe("Skip exporting editor interfaces"),
4244
- skipContent: z72.boolean().optional().describe("Skip exporting entries and assets"),
4245
- skipRoles: z72.boolean().optional().describe("Skip exporting roles and permissions"),
4246
- skipTags: z72.boolean().optional().describe("Skip exporting tags"),
4247
- skipWebhooks: z72.boolean().optional().describe("Skip exporting webhooks"),
4248
- stripTags: z72.boolean().optional().describe("Remove tags from entries and assets"),
4249
- contentOnly: z72.boolean().optional().describe("Export only entries and assets"),
4414
+ export: z73.object({
4415
+ spaceId: z73.string().optional().describe("ID of the space with source data"),
4416
+ environmentId: z73.string().optional().describe("ID of the environment in the source space"),
4417
+ deliveryToken: z73.string().optional().describe("CDA token to export only published content (excludes tags)"),
4418
+ exportDir: z73.string().optional().describe("Path to export JSON output"),
4419
+ saveFile: z73.boolean().optional().describe("Save the export as a JSON file"),
4420
+ contentFile: z73.string().optional().describe("Filename for exported data"),
4421
+ includeDrafts: z73.boolean().optional().describe("Include drafts in exported entries"),
4422
+ includeArchived: z73.boolean().optional().describe("Include archived entries"),
4423
+ skipContentModel: z73.boolean().optional().describe("Skip exporting content models"),
4424
+ skipEditorInterfaces: z73.boolean().optional().describe("Skip exporting editor interfaces"),
4425
+ skipContent: z73.boolean().optional().describe("Skip exporting entries and assets"),
4426
+ skipRoles: z73.boolean().optional().describe("Skip exporting roles and permissions"),
4427
+ skipTags: z73.boolean().optional().describe("Skip exporting tags"),
4428
+ skipWebhooks: z73.boolean().optional().describe("Skip exporting webhooks"),
4429
+ stripTags: z73.boolean().optional().describe("Remove tags from entries and assets"),
4430
+ contentOnly: z73.boolean().optional().describe("Export only entries and assets"),
4250
4431
  queryEntries: EntryQuerySchema.optional().describe(
4251
4432
  "Export only entries that match query parameters"
4252
4433
  ),
4253
4434
  queryAssets: AssetQuerySchema.optional().describe(
4254
4435
  "Export only assets that match query parameters"
4255
4436
  ),
4256
- downloadAssets: z72.boolean().optional().describe("Download asset files to disk"),
4257
- host: z72.string().optional().describe("Management API host"),
4258
- hostDelivery: z72.string().optional().describe("Delivery API host"),
4259
- proxy: z72.string().optional().describe("HTTP/HTTPS proxy config"),
4260
- rawProxy: z72.boolean().optional().describe("Pass raw proxy config directly to Axios"),
4261
- maxAllowedLimit: z72.number().optional().describe("Page size for requests"),
4262
- headers: z72.record(z72.any()).optional().describe("Additional headers to include in requests"),
4263
- errorLogFile: z72.string().optional().describe("Path to error log output file"),
4264
- useVerboseRenderer: z72.boolean().optional().describe("Line-by-line logging, useful for CI"),
4265
- config: z72.string().optional().describe("Path to a JSON config file with all options")
4437
+ downloadAssets: z73.boolean().optional().describe("Download asset files to disk"),
4438
+ host: z73.string().optional().describe("Management API host"),
4439
+ hostDelivery: z73.string().optional().describe("Delivery API host"),
4440
+ proxy: z73.string().optional().describe("HTTP/HTTPS proxy config"),
4441
+ rawProxy: z73.boolean().optional().describe("Pass raw proxy config directly to Axios"),
4442
+ maxAllowedLimit: z73.number().optional().describe("Page size for requests"),
4443
+ headers: z73.record(z73.any()).optional().describe("Additional headers to include in requests"),
4444
+ errorLogFile: z73.string().optional().describe("Path to error log output file"),
4445
+ useVerboseRenderer: z73.boolean().optional().describe("Line-by-line logging, useful for CI"),
4446
+ config: z73.string().optional().describe("Path to a JSON config file with all options")
4266
4447
  }).optional(),
4267
- import: z72.object({
4268
- spaceId: z72.string().optional().describe("ID of the space to import into"),
4269
- environmentId: z72.string().optional().describe("Target environment in destination space"),
4270
- contentFile: z72.string().optional().describe("Path to JSON file containing the content to import"),
4271
- content: z72.record(z72.any()).optional().describe(
4448
+ import: z73.object({
4449
+ spaceId: z73.string().optional().describe("ID of the space to import into"),
4450
+ environmentId: z73.string().optional().describe("Target environment in destination space"),
4451
+ contentFile: z73.string().optional().describe("Path to JSON file containing the content to import"),
4452
+ content: z73.record(z73.any()).optional().describe(
4272
4453
  "JS object containing import content (must match expected structure)"
4273
4454
  ),
4274
- contentModelOnly: z72.boolean().optional().describe("Import only content types"),
4275
- skipContentModel: z72.boolean().optional().describe("Skip importing content types and locales"),
4276
- skipLocales: z72.boolean().optional().describe("Skip importing locales"),
4277
- skipContentUpdates: z72.boolean().optional().describe("Do not update existing content"),
4278
- skipContentPublishing: z72.boolean().optional().describe("Create but do not publish content"),
4279
- uploadAssets: z72.boolean().optional().describe("Upload asset files (requires assetsDirectory)"),
4280
- skipAssetUpdates: z72.boolean().optional().describe("Do not update existing assets"),
4281
- assetsDirectory: z72.string().optional().describe("Path to directory containing exported asset files"),
4282
- timeout: z72.number().optional().describe("Time between retries during asset processing (ms)"),
4283
- retryLimit: z72.number().optional().describe("Max retries for asset processing"),
4284
- host: z72.string().optional().describe("Management API host"),
4285
- proxy: z72.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
4286
- rawProxy: z72.boolean().optional().describe("Pass proxy config directly to Axios"),
4287
- rateLimit: z72.number().optional().describe("Max requests per second to the API"),
4288
- headers: z72.record(z72.any()).optional().describe("Additional headers to attach to requests"),
4289
- errorLogFile: z72.string().optional().describe("Path to error log file"),
4290
- useVerboseRenderer: z72.boolean().optional().describe("Line-by-line progress output (good for CI)"),
4291
- config: z72.string().optional().describe("Path to config JSON file (merged with CLI args)")
4455
+ contentModelOnly: z73.boolean().optional().describe("Import only content types"),
4456
+ skipContentModel: z73.boolean().optional().describe("Skip importing content types and locales"),
4457
+ skipLocales: z73.boolean().optional().describe("Skip importing locales"),
4458
+ skipContentUpdates: z73.boolean().optional().describe("Do not update existing content"),
4459
+ skipContentPublishing: z73.boolean().optional().describe("Create but do not publish content"),
4460
+ uploadAssets: z73.boolean().optional().describe("Upload asset files (requires assetsDirectory)"),
4461
+ skipAssetUpdates: z73.boolean().optional().describe("Do not update existing assets"),
4462
+ assetsDirectory: z73.string().optional().describe("Path to directory containing exported asset files"),
4463
+ timeout: z73.number().optional().describe("Time between retries during asset processing (ms)"),
4464
+ retryLimit: z73.number().optional().describe("Max retries for asset processing"),
4465
+ host: z73.string().optional().describe("Management API host"),
4466
+ proxy: z73.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
4467
+ rawProxy: z73.boolean().optional().describe("Pass proxy config directly to Axios"),
4468
+ rateLimit: z73.number().optional().describe("Max requests per second to the API"),
4469
+ headers: z73.record(z73.any()).optional().describe("Additional headers to attach to requests"),
4470
+ errorLogFile: z73.string().optional().describe("Path to error log file"),
4471
+ useVerboseRenderer: z73.boolean().optional().describe("Line-by-line progress output (good for CI)"),
4472
+ config: z73.string().optional().describe("Path to config JSON file (merged with CLI args)")
4292
4473
  }).optional()
4293
4474
  });
4294
4475
  var paramCollectionConfig = {
@@ -4404,30 +4585,30 @@ var createParamCollectionTool = withErrorHandling(
4404
4585
  );
4405
4586
 
4406
4587
  // src/tools/jobs/space-to-space-migration/importSpace.ts
4407
- import { z as z73 } from "zod";
4588
+ import { z as z74 } from "zod";
4408
4589
  var ImportSpaceToolParams = BaseToolSchema.extend({
4409
- contentFile: z73.string().optional().describe("Path to JSON file containing the content to import"),
4410
- content: z73.record(z73.any()).optional().describe(
4590
+ contentFile: z74.string().optional().describe("Path to JSON file containing the content to import"),
4591
+ content: z74.record(z74.any()).optional().describe(
4411
4592
  "JS object containing import content (must match expected structure)"
4412
4593
  ),
4413
- contentModelOnly: z73.boolean().optional().default(false).describe("Import only content types"),
4414
- skipContentModel: z73.boolean().optional().default(false).describe("Skip importing content types and locales"),
4415
- skipLocales: z73.boolean().optional().default(false).describe("Skip importing locales"),
4416
- skipContentUpdates: z73.boolean().optional().default(false).describe("Do not update existing content"),
4417
- skipContentPublishing: z73.boolean().optional().default(false).describe("Create but do not publish content"),
4418
- uploadAssets: z73.boolean().optional().default(false).describe("Upload asset files (requires assetsDirectory)"),
4419
- skipAssetUpdates: z73.boolean().optional().default(false).describe("Do not update existing assets"),
4420
- assetsDirectory: z73.string().optional().describe("Path to directory containing exported asset files"),
4421
- timeout: z73.number().optional().default(3e3).describe("Time between retries during asset processing (ms)"),
4422
- retryLimit: z73.number().optional().default(10).describe("Max retries for asset processing"),
4423
- host: z73.string().optional().describe("Management API host"),
4424
- proxy: z73.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
4425
- rawProxy: z73.boolean().optional().describe("Pass proxy config directly to Axios"),
4426
- rateLimit: z73.number().optional().default(7).describe("Max requests per second to the API"),
4427
- headers: z73.record(z73.any()).optional().describe("Additional headers to attach to requests"),
4428
- errorLogFile: z73.string().optional().describe("Path to error log file"),
4429
- useVerboseRenderer: z73.boolean().optional().describe("Line-by-line progress output (good for CI)"),
4430
- config: z73.string().optional().describe("Path to config JSON file (merged with CLI args)")
4594
+ contentModelOnly: z74.boolean().optional().default(false).describe("Import only content types"),
4595
+ skipContentModel: z74.boolean().optional().default(false).describe("Skip importing content types and locales"),
4596
+ skipLocales: z74.boolean().optional().default(false).describe("Skip importing locales"),
4597
+ skipContentUpdates: z74.boolean().optional().default(false).describe("Do not update existing content"),
4598
+ skipContentPublishing: z74.boolean().optional().default(false).describe("Create but do not publish content"),
4599
+ uploadAssets: z74.boolean().optional().default(false).describe("Upload asset files (requires assetsDirectory)"),
4600
+ skipAssetUpdates: z74.boolean().optional().default(false).describe("Do not update existing assets"),
4601
+ assetsDirectory: z74.string().optional().describe("Path to directory containing exported asset files"),
4602
+ timeout: z74.number().optional().default(3e3).describe("Time between retries during asset processing (ms)"),
4603
+ retryLimit: z74.number().optional().default(10).describe("Max retries for asset processing"),
4604
+ host: z74.string().optional().describe("Management API host"),
4605
+ proxy: z74.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
4606
+ rawProxy: z74.boolean().optional().describe("Pass proxy config directly to Axios"),
4607
+ rateLimit: z74.number().optional().default(7).describe("Max requests per second to the API"),
4608
+ headers: z74.record(z74.any()).optional().describe("Additional headers to attach to requests"),
4609
+ errorLogFile: z74.string().optional().describe("Path to error log file"),
4610
+ useVerboseRenderer: z74.boolean().optional().describe("Line-by-line progress output (good for CI)"),
4611
+ config: z74.string().optional().describe("Path to config JSON file (merged with CLI args)")
4431
4612
  });
4432
4613
  function createImportSpaceTool(config) {
4433
4614
  async function tool2(args) {
@@ -4466,7 +4647,7 @@ function createImportSpaceTool(config) {
4466
4647
  }
4467
4648
 
4468
4649
  // src/tools/jobs/space-to-space-migration/migrationHandler.ts
4469
- import { z as z74 } from "zod";
4650
+ import { z as z75 } from "zod";
4470
4651
 
4471
4652
  // src/tools/jobs/space-to-space-migration/instructions.ts
4472
4653
  var S2S_MIGRATION_INSTRUCTIONS = `
@@ -4509,7 +4690,7 @@ The space to space migration workflow has been concluded and all related tools h
4509
4690
  The workflow is now complete. You can start a new migration workflow by calling space_to_space_migration_handler with enableWorkflow=true if needed.
4510
4691
  `;
4511
4692
  var SpaceToSpaceMigrationHandlerToolParams = BaseToolSchema.extend({
4512
- enableWorkflow: z74.boolean().describe(
4693
+ enableWorkflow: z75.boolean().describe(
4513
4694
  "Set to true to enable the workflow tools, false to disable them and conclude the workflow"
4514
4695
  )
4515
4696
  });