@contentful/mcp-tools 0.12.5 → 0.12.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -60,23 +60,34 @@ var BaseToolSchema = z.object({
60
60
  spaceId: z.string().describe("The ID of the Contentful space"),
61
61
  environmentId: z.string().describe("The ID of the Contentful environment")
62
62
  });
63
- function createToolClient(config, params) {
63
+ function buildUserAgentToolValue(config, options) {
64
+ const source = config.mcpSource ?? "local";
65
+ return `contentful-mcp${options?.exo ? "-exo" : ""}/${source}-${config.mcpVersion}`;
66
+ }
67
+ function createToolClient(config, params, options) {
68
+ const userAgentTool = buildUserAgentToolValue(config, options);
64
69
  const clientConfig = {
65
70
  accessToken: config.accessToken,
66
71
  host: config.host ?? "api.contentful.com",
67
72
  space: params.spaceId ?? config.spaceId,
68
73
  headers: {
69
- "X-Contentful-User-Agent-Tool": `contentful-mcp/${config.mcpVersion}`
74
+ "X-Contentful-User-Agent-Tool": userAgentTool,
75
+ "User-Agent": userAgentTool
70
76
  }
71
77
  };
72
78
  return createClient(clientConfig);
73
79
  }
80
+ function createExoToolClient(config, params) {
81
+ return createToolClient(config, params, { exo: true });
82
+ }
74
83
  function createClientConfig(config) {
84
+ const userAgentTool = buildUserAgentToolValue(config);
75
85
  const clientConfig = {
76
86
  accessToken: config.accessToken,
77
87
  host: config.host ?? "api.contentful.com",
78
88
  headers: {
79
- "X-Contentful-User-Agent-Tool": `contentful-mcp/${config.mcpVersion}`
89
+ "X-Contentful-User-Agent-Tool": userAgentTool,
90
+ "User-Agent": userAgentTool
80
91
  }
81
92
  };
82
93
  return clientConfig;
@@ -5231,55 +5242,169 @@ function createTaxonomyTools(config) {
5231
5242
  };
5232
5243
  }
5233
5244
 
5245
+ // src/tools/usage/getUsages.ts
5246
+ import { z as z78 } from "zod";
5247
+ import { createClient as createClient16 } from "contentful-management";
5248
+ var AGGREGATED_USAGE_METRIC_KEYS = [
5249
+ "api_call_cma",
5250
+ "api_call_cpa",
5251
+ "api_call_cda",
5252
+ "api_call_graphql",
5253
+ "asset_bandwidth",
5254
+ "functions_invocations",
5255
+ "ai_action_invocation",
5256
+ "ai_action_word_count",
5257
+ "ai_consumption_unit"
5258
+ ];
5259
+ var FilterValueSchema = z78.union([
5260
+ z78.string().min(1),
5261
+ z78.array(z78.string().min(1)).min(1).max(10)
5262
+ ]);
5263
+ var GetUsagesToolParams = z78.object({
5264
+ organizationId: z78.string().optional().describe(
5265
+ "Organization ID. If omitted, falls back to the ORGANIZATION_ID configured on the server."
5266
+ ),
5267
+ metricKey: z78.enum(AGGREGATED_USAGE_METRIC_KEYS).describe(
5268
+ 'Metric to aggregate. Availability depends on the products enabled for the organization. Allowed dimensions per metric (used by "group", "filter", and "order", all in the form sys.dimensions.<name>.sys.<suffix>): api_call_cma / api_call_cpa / api_call_cda / api_call_graphql \u2192 sys.dimensions.space.sys.id. asset_bandwidth \u2192 sys.dimensions.space.sys.id, sys.dimensions.asset.sys.id. functions_invocations \u2192 sys.dimensions.space.sys.id, sys.dimensions.app.sys.id, sys.dimensions.function.sys.id. ai_action_invocation / ai_action_word_count / ai_consumption_unit \u2192 sys.dimensions.space.sys.id, sys.dimensions.ai_action.sys.id, sys.dimensions.model.sys.provider, sys.dimensions.model.sys.id.'
5269
+ ),
5270
+ dateGte: z78.string().describe(
5271
+ "Start date (inclusive) in ISO-8601 format (YYYY-MM-DD or full date-time). Sent as query param date[gte]. Max lookback: 12 months from now."
5272
+ ),
5273
+ dateLte: z78.string().describe(
5274
+ "End date (inclusive) in ISO-8601 format (YYYY-MM-DD or full date-time). Sent as query param date[lte]."
5275
+ ),
5276
+ granularity: z78.enum(["P1D", "P1M"]).optional().describe(
5277
+ 'Bucket size as an ISO-8601 duration: "P1D" (daily, max 31-day range) or "P1M" (monthly, max 12 calendar months including current). Default P1D.'
5278
+ ),
5279
+ group: z78.string().optional().describe(
5280
+ 'Comma-separated dimension keys (in the form sys.dimensions.<name>.sys.<suffix>) to group results by. Values must come from the allowed dimensions for the chosen metricKey (see metricKey description), e.g. "sys.dimensions.space.sys.id" or "sys.dimensions.space.sys.id,sys.dimensions.function.sys.id".'
5281
+ ),
5282
+ filter: z78.record(z78.string(), FilterValueSchema).optional().describe(
5283
+ 'Filter by dimension values. Keys use the shape "sys.dimensions.<dimension>.sys.<attribute>", for example "sys.dimensions.space.sys.id" for the space_id dimension. Pass a string for a single-value filter or an array of up to 10 strings to filter by multiple values (uses the [in] operator). Available dimensions per metric are listed in the metricKey description.'
5284
+ ),
5285
+ limit: z78.number().int().positive().max(1e3).optional().describe("Maximum number of items to return (1\u20131000, default 1000)."),
5286
+ skip: z78.number().int().min(0).max(1e4).optional().describe("Number of items to skip for pagination (0\u201310000, default 0)."),
5287
+ order: z78.string().optional().describe(
5288
+ 'Column to sort by, in the form sys.dimensions.<name>.sys.<suffix>; prefix with "-" for descending (e.g. "-sys.dimensions.space.sys.id"). Allowed dimension columns match the metricKey (see metricKey description). The synthetic column "total_usage" is a bare token (e.g. "total_usage" or "-total_usage") and sums usage per group across the requested date range. When "group" is set, non-synthetic order columns must be a subset of grouped columns. Legacy underscore-form tokens (e.g. "space_id") return a 422.'
5289
+ )
5290
+ });
5291
+ function buildQuery(args) {
5292
+ const query = {};
5293
+ if (args.dateGte) query["date[gte]"] = args.dateGte;
5294
+ if (args.dateLte) query["date[lte]"] = args.dateLte;
5295
+ if (args.granularity) query["granularity"] = args.granularity;
5296
+ if (args.group) query["group"] = args.group;
5297
+ if (args.order) query["order"] = args.order;
5298
+ if (typeof args.limit === "number") query["limit"] = args.limit;
5299
+ if (typeof args.skip === "number") query["skip"] = args.skip;
5300
+ if (args.filter) {
5301
+ for (const [key, value] of Object.entries(args.filter)) {
5302
+ if (Array.isArray(value)) {
5303
+ query[`filter[${key}][in]`] = value.join(",");
5304
+ } else {
5305
+ query[`filter[${key}]`] = value;
5306
+ }
5307
+ }
5308
+ }
5309
+ return query;
5310
+ }
5311
+ function getUsagesTool(config) {
5312
+ async function tool2(args) {
5313
+ const organizationId = args.organizationId ?? config.organizationId;
5314
+ if (!organizationId) {
5315
+ throw new Error(
5316
+ "organizationId is required (either as a tool argument or via the ORGANIZATION_ID env var)."
5317
+ );
5318
+ }
5319
+ const client = createClient16(createClientConfig(config), { type: "plain" });
5320
+ const metricKey = args.metricKey;
5321
+ const collection = await client.raw.get(
5322
+ `/organizations/${organizationId}/usages/${metricKey}`,
5323
+ { params: buildQuery(args) }
5324
+ );
5325
+ const summarized = summarizeData(collection, {
5326
+ maxItems: 10,
5327
+ remainingMessage: "To see more usage buckets, please ask me to retrieve the next page using the skip parameter."
5328
+ });
5329
+ return createSuccessResponse("Usage retrieved successfully", {
5330
+ usage: summarized,
5331
+ total: collection.total,
5332
+ limit: collection.limit,
5333
+ skip: collection.skip,
5334
+ metricKey,
5335
+ organizationId
5336
+ });
5337
+ }
5338
+ return withErrorHandling(tool2, "Error retrieving usage");
5339
+ }
5340
+
5341
+ // src/tools/usage/register.ts
5342
+ function createUsageTools(config) {
5343
+ const getUsages = getUsagesTool(config);
5344
+ return {
5345
+ getUsages: {
5346
+ title: "get_usages",
5347
+ description: 'Get aggregated usage metrics for a Contentful organization, optionally scoped to one or more spaces (or other dimensions) via filter/group. Supports date-range windowing, ISO-8601 granularity (e.g. "P1D"), grouping by dimensions (e.g. group="sys.dimensions.space.sys.id"), and single-value / [in] filtering by dimensions (e.g. filter={"sys.dimensions.space.sys.id": "<space-id>"} or an array of up to 10 IDs). Use for questions like: "how much CMA traffic did this org make last month?", "which spaces used the most asset bandwidth this week?", "were there any AI action invocations for space X?".',
5348
+ inputParams: GetUsagesToolParams.shape,
5349
+ annotations: {
5350
+ readOnlyHint: true,
5351
+ destructiveHint: false,
5352
+ openWorldHint: false
5353
+ },
5354
+ tool: getUsages
5355
+ }
5356
+ };
5357
+ }
5358
+
5234
5359
  // src/tools/jobs/space-to-space-migration/exportSpace.ts
5235
- import { z as z79 } from "zod";
5360
+ import { z as z80 } from "zod";
5236
5361
 
5237
5362
  // src/types/querySchema.ts
5238
- import { z as z78 } from "zod";
5239
- var EntryQuerySchema = z78.object({
5240
- content_type: z78.string().optional().describe("Filter by content type"),
5241
- include: z78.number().optional().describe("Include this many levels of linked entries"),
5242
- select: z78.string().optional().describe("Comma-separated list of fields to return"),
5243
- links_to_entry: z78.string().optional().describe("Find entries that link to the specified entry ID"),
5244
- limit: z78.number().optional().describe("Maximum number of entries to return"),
5245
- skip: z78.number().optional().describe("Skip this many entries"),
5246
- order: z78.string().optional().describe("Order entries by this field")
5247
- });
5248
- var AssetQuerySchema = z78.object({
5249
- mimetype_group: z78.string().optional().describe("Filter by MIME type group"),
5250
- select: z78.string().optional().describe("Comma-separated list of fields to return"),
5251
- limit: z78.number().optional().describe("Maximum number of assets to return"),
5252
- skip: z78.number().optional().describe("Skip this many assets"),
5253
- order: z78.string().optional().describe("Order assets by this field")
5363
+ import { z as z79 } from "zod";
5364
+ var EntryQuerySchema = z79.object({
5365
+ content_type: z79.string().optional().describe("Filter by content type"),
5366
+ include: z79.number().optional().describe("Include this many levels of linked entries"),
5367
+ select: z79.string().optional().describe("Comma-separated list of fields to return"),
5368
+ links_to_entry: z79.string().optional().describe("Find entries that link to the specified entry ID"),
5369
+ limit: z79.number().optional().describe("Maximum number of entries to return"),
5370
+ skip: z79.number().optional().describe("Skip this many entries"),
5371
+ order: z79.string().optional().describe("Order entries by this field")
5372
+ });
5373
+ var AssetQuerySchema = z79.object({
5374
+ mimetype_group: z79.string().optional().describe("Filter by MIME type group"),
5375
+ select: z79.string().optional().describe("Comma-separated list of fields to return"),
5376
+ limit: z79.number().optional().describe("Maximum number of assets to return"),
5377
+ skip: z79.number().optional().describe("Skip this many assets"),
5378
+ order: z79.string().optional().describe("Order assets by this field")
5254
5379
  });
5255
5380
 
5256
5381
  // src/tools/jobs/space-to-space-migration/exportSpace.ts
5257
5382
  var ExportSpaceToolParams = BaseToolSchema.extend({
5258
- exportDir: z79.string().optional().describe(
5383
+ exportDir: z80.string().optional().describe(
5259
5384
  "Directory to save the exported space data (optional, defaults to current directory)"
5260
5385
  ),
5261
- saveFile: z79.boolean().optional().default(true).describe("Save the exported space data to a file"),
5262
- contentFile: z79.string().optional().describe("Custom filename for the exported space data (optional)"),
5263
- includeDrafts: z79.boolean().optional().default(false).describe("Include draft entries in the export"),
5264
- includeArchived: z79.boolean().optional().default(false).describe("Include archived entries in the export"),
5265
- skipContentModel: z79.boolean().optional().default(false).describe("Skip exporting content types"),
5266
- skipEditorInterfaces: z79.boolean().optional().default(false).describe("Skip exporting editor interfaces"),
5267
- skipContent: z79.boolean().optional().default(false).describe("Skip exporting entries and assets"),
5268
- skipRoles: z79.boolean().optional().default(false).describe("Skip exporting roles and permissions"),
5269
- skipTags: z79.boolean().optional().default(false).describe("Skip exporting tags"),
5270
- skipWebhooks: z79.boolean().optional().default(false).describe("Skip exporting webhooks"),
5271
- stripTags: z79.boolean().optional().default(false).describe("Untag assets and entries"),
5272
- contentOnly: z79.boolean().optional().default(false).describe("Only export assets and entries"),
5386
+ saveFile: z80.boolean().optional().default(true).describe("Save the exported space data to a file"),
5387
+ contentFile: z80.string().optional().describe("Custom filename for the exported space data (optional)"),
5388
+ includeDrafts: z80.boolean().optional().default(false).describe("Include draft entries in the export"),
5389
+ includeArchived: z80.boolean().optional().default(false).describe("Include archived entries in the export"),
5390
+ skipContentModel: z80.boolean().optional().default(false).describe("Skip exporting content types"),
5391
+ skipEditorInterfaces: z80.boolean().optional().default(false).describe("Skip exporting editor interfaces"),
5392
+ skipContent: z80.boolean().optional().default(false).describe("Skip exporting entries and assets"),
5393
+ skipRoles: z80.boolean().optional().default(false).describe("Skip exporting roles and permissions"),
5394
+ skipTags: z80.boolean().optional().default(false).describe("Skip exporting tags"),
5395
+ skipWebhooks: z80.boolean().optional().default(false).describe("Skip exporting webhooks"),
5396
+ stripTags: z80.boolean().optional().default(false).describe("Untag assets and entries"),
5397
+ contentOnly: z80.boolean().optional().default(false).describe("Only export assets and entries"),
5273
5398
  queryEntries: EntryQuerySchema.optional().describe(
5274
5399
  "Export only entries that match query parameters"
5275
5400
  ),
5276
5401
  queryAssets: AssetQuerySchema.optional().describe(
5277
5402
  "Export only assets that match query parameters"
5278
5403
  ),
5279
- downloadAssets: z79.boolean().optional().default(false).describe("Download actual asset files"),
5280
- maxAllowedLimit: z79.number().optional().default(1e3).describe("Maximum number of items per request"),
5281
- errorLogFile: z79.string().optional().describe("Path to error log output file"),
5282
- useVerboseRenderer: z79.boolean().optional().describe("Line-by-line logging, useful for CI")
5404
+ downloadAssets: z80.boolean().optional().default(false).describe("Download actual asset files"),
5405
+ maxAllowedLimit: z80.number().optional().default(1e3).describe("Maximum number of items per request"),
5406
+ errorLogFile: z80.string().optional().describe("Path to error log output file"),
5407
+ useVerboseRenderer: z80.boolean().optional().describe("Line-by-line logging, useful for CI")
5283
5408
  });
5284
5409
  function createExportSpaceTool(config) {
5285
5410
  async function tool2(args) {
@@ -5329,70 +5454,70 @@ function createExportSpaceTool(config) {
5329
5454
  }
5330
5455
 
5331
5456
  // src/tools/jobs/space-to-space-migration/paramCollection.ts
5332
- import { z as z80 } from "zod";
5457
+ import { z as z81 } from "zod";
5333
5458
  var ParamCollectionToolParams = BaseToolSchema.extend({
5334
- confirmation: z80.boolean().optional().describe(
5459
+ confirmation: z81.boolean().optional().describe(
5335
5460
  "User confirmation that they are ready to proceed with the workflow"
5336
5461
  ),
5337
- export: z80.object({
5338
- spaceId: z80.string().optional().describe("ID of the space with source data"),
5339
- environmentId: z80.string().optional().describe("ID of the environment in the source space"),
5340
- deliveryToken: z80.string().optional().describe("CDA token to export only published content (excludes tags)"),
5341
- exportDir: z80.string().optional().describe("Path to export JSON output"),
5342
- saveFile: z80.boolean().optional().describe("Save the export as a JSON file"),
5343
- contentFile: z80.string().optional().describe("Filename for exported data"),
5344
- includeDrafts: z80.boolean().optional().describe("Include drafts in exported entries"),
5345
- includeArchived: z80.boolean().optional().describe("Include archived entries"),
5346
- skipContentModel: z80.boolean().optional().describe("Skip exporting content models"),
5347
- skipEditorInterfaces: z80.boolean().optional().describe("Skip exporting editor interfaces"),
5348
- skipContent: z80.boolean().optional().describe("Skip exporting entries and assets"),
5349
- skipRoles: z80.boolean().optional().describe("Skip exporting roles and permissions"),
5350
- skipTags: z80.boolean().optional().describe("Skip exporting tags"),
5351
- skipWebhooks: z80.boolean().optional().describe("Skip exporting webhooks"),
5352
- stripTags: z80.boolean().optional().describe("Remove tags from entries and assets"),
5353
- contentOnly: z80.boolean().optional().describe("Export only entries and assets"),
5462
+ export: z81.object({
5463
+ spaceId: z81.string().optional().describe("ID of the space with source data"),
5464
+ environmentId: z81.string().optional().describe("ID of the environment in the source space"),
5465
+ deliveryToken: z81.string().optional().describe("CDA token to export only published content (excludes tags)"),
5466
+ exportDir: z81.string().optional().describe("Path to export JSON output"),
5467
+ saveFile: z81.boolean().optional().describe("Save the export as a JSON file"),
5468
+ contentFile: z81.string().optional().describe("Filename for exported data"),
5469
+ includeDrafts: z81.boolean().optional().describe("Include drafts in exported entries"),
5470
+ includeArchived: z81.boolean().optional().describe("Include archived entries"),
5471
+ skipContentModel: z81.boolean().optional().describe("Skip exporting content models"),
5472
+ skipEditorInterfaces: z81.boolean().optional().describe("Skip exporting editor interfaces"),
5473
+ skipContent: z81.boolean().optional().describe("Skip exporting entries and assets"),
5474
+ skipRoles: z81.boolean().optional().describe("Skip exporting roles and permissions"),
5475
+ skipTags: z81.boolean().optional().describe("Skip exporting tags"),
5476
+ skipWebhooks: z81.boolean().optional().describe("Skip exporting webhooks"),
5477
+ stripTags: z81.boolean().optional().describe("Remove tags from entries and assets"),
5478
+ contentOnly: z81.boolean().optional().describe("Export only entries and assets"),
5354
5479
  queryEntries: EntryQuerySchema.optional().describe(
5355
5480
  "Export only entries that match query parameters"
5356
5481
  ),
5357
5482
  queryAssets: AssetQuerySchema.optional().describe(
5358
5483
  "Export only assets that match query parameters"
5359
5484
  ),
5360
- downloadAssets: z80.boolean().optional().describe("Download asset files to disk"),
5361
- host: z80.string().optional().describe("Management API host"),
5362
- hostDelivery: z80.string().optional().describe("Delivery API host"),
5363
- proxy: z80.string().optional().describe("HTTP/HTTPS proxy config"),
5364
- rawProxy: z80.boolean().optional().describe("Pass raw proxy config directly to Axios"),
5365
- maxAllowedLimit: z80.number().optional().describe("Page size for requests"),
5366
- headers: z80.record(z80.any()).optional().describe("Additional headers to include in requests"),
5367
- errorLogFile: z80.string().optional().describe("Path to error log output file"),
5368
- useVerboseRenderer: z80.boolean().optional().describe("Line-by-line logging, useful for CI"),
5369
- config: z80.string().optional().describe("Path to a JSON config file with all options")
5485
+ downloadAssets: z81.boolean().optional().describe("Download asset files to disk"),
5486
+ host: z81.string().optional().describe("Management API host"),
5487
+ hostDelivery: z81.string().optional().describe("Delivery API host"),
5488
+ proxy: z81.string().optional().describe("HTTP/HTTPS proxy config"),
5489
+ rawProxy: z81.boolean().optional().describe("Pass raw proxy config directly to Axios"),
5490
+ maxAllowedLimit: z81.number().optional().describe("Page size for requests"),
5491
+ headers: z81.record(z81.any()).optional().describe("Additional headers to include in requests"),
5492
+ errorLogFile: z81.string().optional().describe("Path to error log output file"),
5493
+ useVerboseRenderer: z81.boolean().optional().describe("Line-by-line logging, useful for CI"),
5494
+ config: z81.string().optional().describe("Path to a JSON config file with all options")
5370
5495
  }).optional(),
5371
- import: z80.object({
5372
- spaceId: z80.string().optional().describe("ID of the space to import into"),
5373
- environmentId: z80.string().optional().describe("Target environment in destination space"),
5374
- contentFile: z80.string().optional().describe("Path to JSON file containing the content to import"),
5375
- content: z80.record(z80.any()).optional().describe(
5496
+ import: z81.object({
5497
+ spaceId: z81.string().optional().describe("ID of the space to import into"),
5498
+ environmentId: z81.string().optional().describe("Target environment in destination space"),
5499
+ contentFile: z81.string().optional().describe("Path to JSON file containing the content to import"),
5500
+ content: z81.record(z81.any()).optional().describe(
5376
5501
  "JS object containing import content (must match expected structure)"
5377
5502
  ),
5378
- contentModelOnly: z80.boolean().optional().describe("Import only content types"),
5379
- skipContentModel: z80.boolean().optional().describe("Skip importing content types and locales"),
5380
- skipLocales: z80.boolean().optional().describe("Skip importing locales"),
5381
- skipContentUpdates: z80.boolean().optional().describe("Do not update existing content"),
5382
- skipContentPublishing: z80.boolean().optional().describe("Create but do not publish content"),
5383
- uploadAssets: z80.boolean().optional().describe("Upload asset files (requires assetsDirectory)"),
5384
- skipAssetUpdates: z80.boolean().optional().describe("Do not update existing assets"),
5385
- assetsDirectory: z80.string().optional().describe("Path to directory containing exported asset files"),
5386
- timeout: z80.number().optional().describe("Time between retries during asset processing (ms)"),
5387
- retryLimit: z80.number().optional().describe("Max retries for asset processing"),
5388
- host: z80.string().optional().describe("Management API host"),
5389
- proxy: z80.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
5390
- rawProxy: z80.boolean().optional().describe("Pass proxy config directly to Axios"),
5391
- rateLimit: z80.number().optional().describe("Max requests per second to the API"),
5392
- headers: z80.record(z80.any()).optional().describe("Additional headers to attach to requests"),
5393
- errorLogFile: z80.string().optional().describe("Path to error log file"),
5394
- useVerboseRenderer: z80.boolean().optional().describe("Line-by-line progress output (good for CI)"),
5395
- config: z80.string().optional().describe("Path to config JSON file (merged with CLI args)")
5503
+ contentModelOnly: z81.boolean().optional().describe("Import only content types"),
5504
+ skipContentModel: z81.boolean().optional().describe("Skip importing content types and locales"),
5505
+ skipLocales: z81.boolean().optional().describe("Skip importing locales"),
5506
+ skipContentUpdates: z81.boolean().optional().describe("Do not update existing content"),
5507
+ skipContentPublishing: z81.boolean().optional().describe("Create but do not publish content"),
5508
+ uploadAssets: z81.boolean().optional().describe("Upload asset files (requires assetsDirectory)"),
5509
+ skipAssetUpdates: z81.boolean().optional().describe("Do not update existing assets"),
5510
+ assetsDirectory: z81.string().optional().describe("Path to directory containing exported asset files"),
5511
+ timeout: z81.number().optional().describe("Time between retries during asset processing (ms)"),
5512
+ retryLimit: z81.number().optional().describe("Max retries for asset processing"),
5513
+ host: z81.string().optional().describe("Management API host"),
5514
+ proxy: z81.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
5515
+ rawProxy: z81.boolean().optional().describe("Pass proxy config directly to Axios"),
5516
+ rateLimit: z81.number().optional().describe("Max requests per second to the API"),
5517
+ headers: z81.record(z81.any()).optional().describe("Additional headers to attach to requests"),
5518
+ errorLogFile: z81.string().optional().describe("Path to error log file"),
5519
+ useVerboseRenderer: z81.boolean().optional().describe("Line-by-line progress output (good for CI)"),
5520
+ config: z81.string().optional().describe("Path to config JSON file (merged with CLI args)")
5396
5521
  }).optional()
5397
5522
  });
5398
5523
  var paramCollectionConfig = {
@@ -5508,25 +5633,25 @@ var createParamCollectionTool = withErrorHandling(
5508
5633
  );
5509
5634
 
5510
5635
  // src/tools/jobs/space-to-space-migration/importSpace.ts
5511
- import { z as z81 } from "zod";
5636
+ import { z as z82 } from "zod";
5512
5637
  var ImportSpaceToolParams = BaseToolSchema.extend({
5513
- contentFile: z81.string().optional().describe("Path to JSON file containing the content to import"),
5514
- content: z81.record(z81.any()).optional().describe(
5638
+ contentFile: z82.string().optional().describe("Path to JSON file containing the content to import"),
5639
+ content: z82.record(z82.any()).optional().describe(
5515
5640
  "JS object containing import content (must match expected structure)"
5516
5641
  ),
5517
- contentModelOnly: z81.boolean().optional().default(false).describe("Import only content types"),
5518
- skipContentModel: z81.boolean().optional().default(false).describe("Skip importing content types and locales"),
5519
- skipLocales: z81.boolean().optional().default(false).describe("Skip importing locales"),
5520
- skipContentUpdates: z81.boolean().optional().default(false).describe("Do not update existing content"),
5521
- skipContentPublishing: z81.boolean().optional().default(false).describe("Create but do not publish content"),
5522
- uploadAssets: z81.boolean().optional().default(false).describe("Upload asset files (requires assetsDirectory)"),
5523
- skipAssetUpdates: z81.boolean().optional().default(false).describe("Do not update existing assets"),
5524
- assetsDirectory: z81.string().optional().describe("Path to directory containing exported asset files"),
5525
- timeout: z81.number().optional().default(3e3).describe("Time between retries during asset processing (ms)"),
5526
- retryLimit: z81.number().optional().default(10).describe("Max retries for asset processing"),
5527
- rateLimit: z81.number().optional().default(7).describe("Max requests per second to the API"),
5528
- errorLogFile: z81.string().optional().describe("Path to error log file"),
5529
- useVerboseRenderer: z81.boolean().optional().describe("Line-by-line progress output (good for CI)")
5642
+ contentModelOnly: z82.boolean().optional().default(false).describe("Import only content types"),
5643
+ skipContentModel: z82.boolean().optional().default(false).describe("Skip importing content types and locales"),
5644
+ skipLocales: z82.boolean().optional().default(false).describe("Skip importing locales"),
5645
+ skipContentUpdates: z82.boolean().optional().default(false).describe("Do not update existing content"),
5646
+ skipContentPublishing: z82.boolean().optional().default(false).describe("Create but do not publish content"),
5647
+ uploadAssets: z82.boolean().optional().default(false).describe("Upload asset files (requires assetsDirectory)"),
5648
+ skipAssetUpdates: z82.boolean().optional().default(false).describe("Do not update existing assets"),
5649
+ assetsDirectory: z82.string().optional().describe("Path to directory containing exported asset files"),
5650
+ timeout: z82.number().optional().default(3e3).describe("Time between retries during asset processing (ms)"),
5651
+ retryLimit: z82.number().optional().default(10).describe("Max retries for asset processing"),
5652
+ rateLimit: z82.number().optional().default(7).describe("Max requests per second to the API"),
5653
+ errorLogFile: z82.string().optional().describe("Path to error log file"),
5654
+ useVerboseRenderer: z82.boolean().optional().describe("Line-by-line progress output (good for CI)")
5530
5655
  });
5531
5656
  function createImportSpaceTool(config) {
5532
5657
  async function tool2(args) {
@@ -5571,7 +5696,7 @@ function createImportSpaceTool(config) {
5571
5696
  }
5572
5697
 
5573
5698
  // src/tools/jobs/space-to-space-migration/migrationHandler.ts
5574
- import { z as z82 } from "zod";
5699
+ import { z as z83 } from "zod";
5575
5700
 
5576
5701
  // src/tools/jobs/space-to-space-migration/instructions.ts
5577
5702
  var S2S_MIGRATION_INSTRUCTIONS = `
@@ -5614,7 +5739,7 @@ The space to space migration workflow has been concluded and all related tools h
5614
5739
  The workflow is now complete. You can start a new migration workflow by calling space_to_space_migration_handler with enableWorkflow=true if needed.
5615
5740
  `;
5616
5741
  var SpaceToSpaceMigrationHandlerToolParams = BaseToolSchema.extend({
5617
- enableWorkflow: z82.boolean().describe(
5742
+ enableWorkflow: z83.boolean().describe(
5618
5743
  "Set to true to enable the workflow tools, false to disable them and conclude the workflow"
5619
5744
  )
5620
5745
  });
@@ -5712,13 +5837,13 @@ function createJobTools(config) {
5712
5837
  }
5713
5838
 
5714
5839
  // src/tools/exo/components/getComponent.ts
5715
- import { z as z83 } from "zod";
5840
+ import { z as z84 } from "zod";
5716
5841
  var GetComponentToolParams = BaseToolSchema.extend({
5717
- componentId: z83.string().describe("The ID of the component to retrieve details for")
5842
+ componentId: z84.string().describe("The ID of the component to retrieve details for")
5718
5843
  });
5719
5844
  function getComponentTool(config) {
5720
5845
  async function tool2(args) {
5721
- const contentfulClient = createToolClient(config, args);
5846
+ const contentfulClient = createExoToolClient(config, args);
5722
5847
  const component = await contentfulClient.component.get({
5723
5848
  spaceId: args.spaceId,
5724
5849
  environmentId: args.environmentId,
@@ -5732,16 +5857,16 @@ function getComponentTool(config) {
5732
5857
  }
5733
5858
 
5734
5859
  // src/tools/exo/components/listComponents.ts
5735
- import { z as z84 } from "zod";
5860
+ import { z as z85 } from "zod";
5736
5861
  var ListComponentsToolParams = BaseToolSchema.extend({
5737
- limit: z84.number().optional().describe("Maximum number of components to return (max 10)"),
5738
- pageNext: z84.string().optional().describe("Cursor token to fetch the next page of results"),
5739
- pagePrev: z84.string().optional().describe("Cursor token to fetch the previous page of results"),
5740
- order: z84.string().optional().describe("Order components by this field (e.g. sys.createdAt)")
5862
+ limit: z85.number().optional().describe("Maximum number of components to return (max 10)"),
5863
+ pageNext: z85.string().optional().describe("Cursor token to fetch the next page of results"),
5864
+ pagePrev: z85.string().optional().describe("Cursor token to fetch the previous page of results"),
5865
+ order: z85.string().optional().describe("Order components by this field (e.g. sys.createdAt)")
5741
5866
  });
5742
5867
  function listComponentsTool(config) {
5743
5868
  async function tool2(args) {
5744
- const contentfulClient = createToolClient(config, args);
5869
+ const contentfulClient = createExoToolClient(config, args);
5745
5870
  const cursorParam = args.pageNext ? { pageNext: args.pageNext } : args.pagePrev ? { pagePrev: args.pagePrev } : {};
5746
5871
  const components = await contentfulClient.component.getMany({
5747
5872
  spaceId: args.spaceId,
@@ -5767,10 +5892,10 @@ function listComponentsTool(config) {
5767
5892
  }
5768
5893
 
5769
5894
  // src/tools/exo/components/createComponent.ts
5770
- import { z as z86 } from "zod";
5895
+ import { z as z87 } from "zod";
5771
5896
 
5772
5897
  // src/types/exoSchemas.ts
5773
- import { z as z85 } from "zod";
5898
+ import { z as z86 } from "zod";
5774
5899
  var URN_EXAMPLES = {
5775
5900
  "Contentful:Component": "crn:contentful:::experience:spaces/{spaceId}/environments/{envId}/components/{id}",
5776
5901
  "Contentful:ExperienceFragment": "crn:contentful:::experience:spaces/{spaceId}/environments/{envId}/experienceFragments/{id}",
@@ -5780,19 +5905,19 @@ var URN_EXAMPLES = {
5780
5905
  var resourceLinkSchema2 = (linkType) => {
5781
5906
  const example = URN_EXAMPLES[linkType];
5782
5907
  const urnDesc = example ? `URN of the linked resource (e.g. "${example}")` : "URN of the linked resource";
5783
- return z85.object({
5784
- sys: z85.object({
5785
- type: z85.literal("ResourceLink"),
5786
- linkType: z85.literal(linkType),
5787
- urn: z85.string().describe(urnDesc)
5908
+ return z86.object({
5909
+ sys: z86.object({
5910
+ type: z86.literal("ResourceLink"),
5911
+ linkType: z86.literal(linkType),
5912
+ urn: z86.string().describe(urnDesc)
5788
5913
  })
5789
5914
  });
5790
5915
  };
5791
- var linkSchema2 = (linkType) => z85.object({
5792
- sys: z85.object({
5793
- type: z85.literal("Link"),
5794
- linkType: z85.literal(linkType),
5795
- id: z85.string()
5916
+ var linkSchema2 = (linkType) => z86.object({
5917
+ sys: z86.object({
5918
+ type: z86.literal("Link"),
5919
+ linkType: z86.literal(linkType),
5920
+ id: z86.string()
5796
5921
  })
5797
5922
  });
5798
5923
  var ComponentResourceLinkSchema = resourceLinkSchema2(
@@ -5804,71 +5929,71 @@ var ExperienceFragmentResourceLinkSchema = resourceLinkSchema2(
5804
5929
  var ExperienceTemplateResourceLinkSchema = resourceLinkSchema2(
5805
5930
  "Contentful:ExperienceTemplate"
5806
5931
  );
5807
- var ViewportSchema = z85.object({
5808
- id: z85.string().describe("Viewport identifier"),
5809
- query: z85.string().describe("CSS media query string"),
5810
- displayName: z85.string().describe("Human-readable viewport name"),
5811
- previewSize: z85.string().describe('Preview size (e.g. "1024px")')
5812
- });
5813
- var DataTypeDefinitionSchema = z85.lazy(
5814
- () => z85.discriminatedUnion("type", [
5815
- z85.object({
5816
- type: z85.enum(["String", "Number", "Integer", "Boolean"]),
5817
- name: z85.string().optional(),
5818
- required: z85.boolean().optional()
5932
+ var ViewportSchema = z86.object({
5933
+ id: z86.string().describe("Viewport identifier"),
5934
+ query: z86.string().describe("CSS media query string"),
5935
+ displayName: z86.string().describe("Human-readable viewport name"),
5936
+ previewSize: z86.string().describe('Preview size (e.g. "1024px")')
5937
+ });
5938
+ var DataTypeDefinitionSchema = z86.lazy(
5939
+ () => z86.discriminatedUnion("type", [
5940
+ z86.object({
5941
+ type: z86.enum(["String", "Number", "Integer", "Boolean"]),
5942
+ name: z86.string().optional(),
5943
+ required: z86.boolean().optional()
5819
5944
  }),
5820
- z85.object({
5821
- type: z85.literal("RichText"),
5822
- name: z85.string().optional(),
5823
- required: z85.boolean().optional()
5945
+ z86.object({
5946
+ type: z86.literal("RichText"),
5947
+ name: z86.string().optional(),
5948
+ required: z86.boolean().optional()
5824
5949
  }),
5825
- z85.object({
5826
- type: z85.literal("Array"),
5827
- name: z85.string().optional(),
5828
- required: z85.boolean().optional(),
5950
+ z86.object({
5951
+ type: z86.literal("Array"),
5952
+ name: z86.string().optional(),
5953
+ required: z86.boolean().optional(),
5829
5954
  items: DataTypeDefinitionSchema
5830
5955
  }),
5831
- z85.object({
5832
- type: z85.literal("Record"),
5833
- name: z85.string().optional(),
5834
- required: z85.boolean().optional(),
5835
- fields: z85.record(z85.string(), DataTypeDefinitionSchema)
5956
+ z86.object({
5957
+ type: z86.literal("Record"),
5958
+ name: z86.string().optional(),
5959
+ required: z86.boolean().optional(),
5960
+ fields: z86.record(z86.string(), DataTypeDefinitionSchema)
5836
5961
  }),
5837
- z85.object({
5838
- type: z85.literal("TypeRef"),
5839
- name: z85.string().optional(),
5840
- required: z85.boolean().optional(),
5841
- ref: z85.object({
5842
- sys: z85.object({
5843
- type: z85.literal("ResourceLink"),
5844
- linkType: z85.string(),
5845
- urn: z85.string()
5962
+ z86.object({
5963
+ type: z86.literal("TypeRef"),
5964
+ name: z86.string().optional(),
5965
+ required: z86.boolean().optional(),
5966
+ ref: z86.object({
5967
+ sys: z86.object({
5968
+ type: z86.literal("ResourceLink"),
5969
+ linkType: z86.string(),
5970
+ urn: z86.string()
5846
5971
  })
5847
5972
  })
5848
5973
  }),
5849
- z85.object({
5850
- type: z85.literal("Literal"),
5851
- name: z85.string().optional(),
5852
- required: z85.boolean().optional(),
5853
- value: z85.custom().describe("JSON literal value"),
5974
+ z86.object({
5975
+ type: z86.literal("Literal"),
5976
+ name: z86.string().optional(),
5977
+ required: z86.boolean().optional(),
5978
+ value: z86.custom().describe("JSON literal value"),
5854
5979
  valueType: DataTypeDefinitionSchema
5855
5980
  }),
5856
- z85.object({
5857
- type: z85.literal("DiscriminatedUnion"),
5858
- name: z85.string().optional(),
5859
- required: z85.boolean().optional(),
5860
- discriminator: z85.string(),
5861
- members: z85.array(DataTypeDefinitionSchema)
5981
+ z86.object({
5982
+ type: z86.literal("DiscriminatedUnion"),
5983
+ name: z86.string().optional(),
5984
+ required: z86.boolean().optional(),
5985
+ discriminator: z86.string(),
5986
+ members: z86.array(DataTypeDefinitionSchema)
5862
5987
  })
5863
5988
  ])
5864
5989
  );
5865
- var ContentPropertySchema = z85.intersection(
5990
+ var ContentPropertySchema = z86.intersection(
5866
5991
  DataTypeDefinitionSchema,
5867
- z85.object({
5868
- id: z85.string().describe("Content property identifier"),
5869
- name: z85.string().describe("Human-readable name"),
5870
- required: z85.boolean().describe("Whether the property is required"),
5871
- defaultValue: z85.unknown().optional().describe("Default value")
5992
+ z86.object({
5993
+ id: z86.string().describe("Content property identifier"),
5994
+ name: z86.string().describe("Human-readable name"),
5995
+ required: z86.boolean().describe("Whether the property is required"),
5996
+ defaultValue: z86.unknown().optional().describe("Default value")
5872
5997
  })
5873
5998
  );
5874
5999
  var DTCG_DESIGN_PROPERTY_TYPES = [
@@ -5886,186 +6011,186 @@ var DTCG_DESIGN_PROPERTY_TYPES = [
5886
6011
  "DTCG.Gradient",
5887
6012
  "DTCG.Typography"
5888
6013
  ];
5889
- var DesignPropertyCommonFieldsSchema = z85.object({
5890
- id: z85.string().describe("Design property identifier"),
5891
- name: z85.string().describe("Human-readable name"),
5892
- description: z85.string().optional().describe("Optional description")
6014
+ var DesignPropertyCommonFieldsSchema = z86.object({
6015
+ id: z86.string().describe("Design property identifier"),
6016
+ name: z86.string().describe("Human-readable name"),
6017
+ description: z86.string().optional().describe("Optional description")
5893
6018
  });
5894
6019
  var StringDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend({
5895
- type: z85.literal("String"),
5896
- fallbackValue: z85.object({
5897
- type: z85.literal("ManualDesignValue"),
5898
- value: z85.string()
6020
+ type: z86.literal("String"),
6021
+ fallbackValue: z86.object({
6022
+ type: z86.literal("ManualDesignValue"),
6023
+ value: z86.string()
5899
6024
  }).optional().describe("Manual fallback value for this design property"),
5900
- validations: z85.array(
5901
- z85.object({
5902
- regexp: z85.object({
5903
- pattern: z85.string().describe("Regular expression pattern")
6025
+ validations: z86.array(
6026
+ z86.object({
6027
+ regexp: z86.object({
6028
+ pattern: z86.string().describe("Regular expression pattern")
5904
6029
  })
5905
6030
  })
5906
6031
  ).optional().describe("Regexp validations constraining allowed string values")
5907
6032
  });
5908
6033
  var BooleanDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend({
5909
- type: z85.literal("Boolean"),
5910
- fallbackValue: z85.object({
5911
- type: z85.literal("ManualDesignValue"),
5912
- value: z85.boolean()
6034
+ type: z86.literal("Boolean"),
6035
+ fallbackValue: z86.object({
6036
+ type: z86.literal("ManualDesignValue"),
6037
+ value: z86.boolean()
5913
6038
  }).optional().describe("Manual fallback value for this design property")
5914
6039
  });
5915
- var DesignTokenValueSchema = z85.object({
5916
- type: z85.literal("DesignToken"),
5917
- value: z85.string().min(1).describe("Design token reference (non-empty)")
6040
+ var DesignTokenValueSchema = z86.object({
6041
+ type: z86.literal("DesignToken"),
6042
+ value: z86.string().min(1).describe("Design token reference (non-empty)")
5918
6043
  });
5919
6044
  var TokenBackedDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend(
5920
6045
  {
5921
- type: z85.enum(DTCG_DESIGN_PROPERTY_TYPES),
6046
+ type: z86.enum(DTCG_DESIGN_PROPERTY_TYPES),
5922
6047
  fallbackValue: DesignTokenValueSchema.optional().describe(
5923
6048
  "Design-token-backed fallback value for this design property"
5924
6049
  ),
5925
- allowedResources: z85.array(
5926
- z85.object({
5927
- type: z85.literal("DesignToken"),
5928
- value: z85.string(),
5929
- name: z85.string().optional()
6050
+ allowedResources: z86.array(
6051
+ z86.object({
6052
+ type: z86.literal("DesignToken"),
6053
+ value: z86.string(),
6054
+ name: z86.string().optional()
5930
6055
  })
5931
6056
  ).optional().describe("Allowed design token resources")
5932
6057
  }
5933
6058
  );
5934
- var DesignPropertySchema = z85.union([
6059
+ var DesignPropertySchema = z86.union([
5935
6060
  StringDesignPropertySchema,
5936
6061
  BooleanDesignPropertySchema,
5937
6062
  TokenBackedDesignPropertySchema
5938
6063
  ]);
5939
- var ManualDesignValueSchema = z85.object({
5940
- type: z85.literal("ManualDesignValue"),
5941
- value: z85.union([z85.string(), z85.number(), z85.boolean()])
6064
+ var ManualDesignValueSchema = z86.object({
6065
+ type: z86.literal("ManualDesignValue"),
6066
+ value: z86.union([z86.string(), z86.number(), z86.boolean()])
5942
6067
  });
5943
- var DesignPropertyValueSchema = z85.union([
6068
+ var DesignPropertyValueSchema = z86.union([
5944
6069
  ManualDesignValueSchema,
5945
6070
  DesignTokenValueSchema
5946
6071
  ]);
5947
- var DesignPropertyPointerValueSchema = z85.custom(
6072
+ var DesignPropertyPointerValueSchema = z86.custom(
5948
6073
  (val) => typeof val === "string" && /^\$designProperties\//.test(val),
5949
6074
  { message: 'Must be a "$designProperties/..." pointer' }
5950
6075
  );
5951
- var DimensionedDesignPropertyValueSchema = z85.record(
5952
- z85.string(),
6076
+ var DimensionedDesignPropertyValueSchema = z86.record(
6077
+ z86.string(),
5953
6078
  DesignPropertyValueSchema
5954
6079
  );
5955
- var ComponentTreeDesignPropertyValueSchema = z85.union([
6080
+ var ComponentTreeDesignPropertyValueSchema = z86.union([
5956
6081
  DesignPropertyValueSchema,
5957
6082
  DesignPropertyPointerValueSchema,
5958
6083
  DimensionedDesignPropertyValueSchema
5959
6084
  ]);
5960
6085
  var COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE = "crn:contentful:::experience:spaces/$self/environments/$self";
5961
- var SlotDefinitionSchema = z85.object({
5962
- id: z85.string().describe("Slot identifier"),
5963
- name: z85.string().describe("Human-readable name"),
5964
- required: z85.boolean().describe("Whether the slot must be filled"),
5965
- validations: z85.array(
5966
- z85.object({
5967
- size: z85.object({
5968
- min: z85.number().optional(),
5969
- max: z85.number().optional()
6086
+ var SlotDefinitionSchema = z86.object({
6087
+ id: z86.string().describe("Slot identifier"),
6088
+ name: z86.string().describe("Human-readable name"),
6089
+ required: z86.boolean().describe("Whether the slot must be filled"),
6090
+ validations: z86.array(
6091
+ z86.object({
6092
+ size: z86.object({
6093
+ min: z86.number().optional(),
6094
+ max: z86.number().optional()
5970
6095
  }).optional()
5971
6096
  })
5972
6097
  ).describe("Slot cardinality validations"),
5973
- allowedResources: z85.array(
5974
- z85.object({
5975
- type: z85.literal("Contentful:Component"),
5976
- source: z85.literal(COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE),
5977
- allowedTypes: z85.array(z85.string()).describe("IDs of components allowed in this slot")
6098
+ allowedResources: z86.array(
6099
+ z86.object({
6100
+ type: z86.literal("Contentful:Component"),
6101
+ source: z86.literal(COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE),
6102
+ allowedTypes: z86.array(z86.string()).describe("IDs of components allowed in this slot")
5978
6103
  })
5979
6104
  ).optional().describe("Constrains which components may be placed in this slot")
5980
6105
  });
5981
- var ExperienceFragmentNodeSchema = z85.object({
5982
- id: z85.string().describe("Node identifier"),
5983
- name: z85.string().optional().describe("Optional display name"),
5984
- nodeType: z85.literal("ExperienceFragment").describe('Must be "ExperienceFragment"'),
6106
+ var ExperienceFragmentNodeSchema = z86.object({
6107
+ id: z86.string().describe("Node identifier"),
6108
+ name: z86.string().optional().describe("Optional display name"),
6109
+ nodeType: z86.literal("ExperienceFragment").describe('Must be "ExperienceFragment"'),
5985
6110
  experienceFragment: ExperienceFragmentResourceLinkSchema.describe(
5986
6111
  "Resource link to the referenced experience fragment"
5987
6112
  )
5988
6113
  });
5989
- var SlotNodeSchema = z85.object({
5990
- id: z85.string().describe("Node identifier"),
5991
- nodeType: z85.literal("Slot").describe('Must be "Slot"'),
5992
- slotId: z85.string().describe("ID of the slot definition to render")
6114
+ var SlotNodeSchema = z86.object({
6115
+ id: z86.string().describe("Node identifier"),
6116
+ nodeType: z86.literal("Slot").describe('Must be "Slot"'),
6117
+ slotId: z86.string().describe("ID of the slot definition to render")
5993
6118
  });
5994
- var TreeNodeSchema = z85.lazy(
5995
- () => z85.union([ComponentNodeSchema, ExperienceFragmentNodeSchema, SlotNodeSchema])
6119
+ var TreeNodeSchema = z86.lazy(
6120
+ () => z86.union([ComponentNodeSchema, ExperienceFragmentNodeSchema, SlotNodeSchema])
5996
6121
  );
5997
- var ComponentNodeSchema = z85.lazy(
5998
- () => z85.object({
5999
- id: z85.string().describe("Node identifier"),
6000
- name: z85.string().optional().describe("Optional display name"),
6001
- nodeType: z85.literal("Component").describe('Must be "Component"'),
6122
+ var ComponentNodeSchema = z86.lazy(
6123
+ () => z86.object({
6124
+ id: z86.string().describe("Node identifier"),
6125
+ name: z86.string().optional().describe("Optional display name"),
6126
+ nodeType: z86.literal("Component").describe('Must be "Component"'),
6002
6127
  component: ComponentResourceLinkSchema.describe(
6003
6128
  "Resource link to the component to render"
6004
6129
  ),
6005
- contentProperties: z85.union([
6006
- z85.record(z85.string(), z85.unknown()),
6007
- z85.string().describe('"$contentProperties/..." pointer')
6130
+ contentProperties: z86.union([
6131
+ z86.record(z86.string(), z86.unknown()),
6132
+ z86.string().describe('"$contentProperties/..." pointer')
6008
6133
  ]).describe(
6009
6134
  'Content property bindings \u2014 values or "$contentProperties/..." pointers'
6010
6135
  ),
6011
- designProperties: z85.record(z85.string(), ComponentTreeDesignPropertyValueSchema).describe(
6136
+ designProperties: z86.record(z86.string(), ComponentTreeDesignPropertyValueSchema).describe(
6012
6137
  'Design property values \u2014 ManualDesignValue, DesignTokenValue, or "$designProperties/..." pointers'
6013
6138
  ),
6014
- slots: z85.record(z85.string(), z85.array(TreeNodeSchema)).describe("Child tree nodes keyed by slot ID")
6139
+ slots: z86.record(z86.string(), z86.array(TreeNodeSchema)).describe("Child tree nodes keyed by slot ID")
6015
6140
  })
6016
6141
  );
6017
6142
  var TagLinkSchema = linkSchema2("Tag");
6018
6143
  var ConceptLinkSchema = linkSchema2("TaxonomyConcept");
6019
- var ExoMetadataSchema = z85.object({
6020
- tags: z85.array(TagLinkSchema).optional().describe("Tags attached to this entity"),
6021
- concepts: z85.array(ConceptLinkSchema).optional().describe("Taxonomy concepts attached to this entity")
6144
+ var ExoMetadataSchema = z86.object({
6145
+ tags: z86.array(TagLinkSchema).optional().describe("Tags attached to this entity"),
6146
+ concepts: z86.array(ConceptLinkSchema).optional().describe("Taxonomy concepts attached to this entity")
6022
6147
  });
6023
6148
  var ExperienceMetadataSchema = ExoMetadataSchema.extend({
6024
- name: z85.string().optional().describe("Variant label for this metadata entry")
6149
+ name: z86.string().optional().describe("Variant label for this metadata entry")
6025
6150
  });
6026
6151
  var DataAssemblyResourceLinkSchema = resourceLinkSchema2(
6027
6152
  "Contentful:DataAssembly"
6028
6153
  );
6029
- var ExperienceContentBindingsSchema = z85.object({
6154
+ var ExperienceContentBindingsSchema = z86.object({
6030
6155
  sys: DataAssemblyResourceLinkSchema.shape.sys,
6031
- parameters: z85.record(
6032
- z85.string(),
6033
- z85.object({
6034
- sys: z85.object({
6035
- type: z85.literal("ResourceLink"),
6036
- linkType: z85.string(),
6037
- urn: z85.string()
6156
+ parameters: z86.record(
6157
+ z86.string(),
6158
+ z86.object({
6159
+ sys: z86.object({
6160
+ type: z86.literal("ResourceLink"),
6161
+ linkType: z86.string(),
6162
+ urn: z86.string()
6038
6163
  })
6039
6164
  })
6040
6165
  ).describe("Parameter bindings keyed by parameter ID")
6041
6166
  });
6042
- var InlineExperienceFragmentNodeSchema = z85.lazy(
6043
- () => z85.object({
6044
- id: z85.string().describe("Node identifier"),
6045
- nodeType: z85.literal("InlineExperienceFragment").describe('Must be "InlineExperienceFragment"'),
6167
+ var InlineExperienceFragmentNodeSchema = z86.lazy(
6168
+ () => z86.object({
6169
+ id: z86.string().describe("Node identifier"),
6170
+ nodeType: z86.literal("InlineExperienceFragment").describe('Must be "InlineExperienceFragment"'),
6046
6171
  component: ComponentResourceLinkSchema.describe(
6047
6172
  "Resource link to the component this inline experience fragment renders"
6048
6173
  ),
6049
- designProperties: z85.record(z85.string(), DimensionedDesignPropertyValueSchema).describe("Design property values for this inline experience fragment"),
6174
+ designProperties: z86.record(z86.string(), DimensionedDesignPropertyValueSchema).describe("Design property values for this inline experience fragment"),
6050
6175
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
6051
6176
  "Optional content bindings linking this inline experience fragment to a data assembly"
6052
6177
  ),
6053
- slots: z85.record(z85.string(), z85.array(ExperienceSlotNodeSchema)).optional().describe("Child slot contents keyed by slot ID")
6178
+ slots: z86.record(z86.string(), z86.array(ExperienceSlotNodeSchema)).optional().describe("Child slot contents keyed by slot ID")
6054
6179
  })
6055
6180
  );
6056
- var ExperienceSlotNodeSchema = z85.lazy(
6057
- () => z85.union([ExperienceFragmentNodeSchema, InlineExperienceFragmentNodeSchema])
6181
+ var ExperienceSlotNodeSchema = z86.lazy(
6182
+ () => z86.union([ExperienceFragmentNodeSchema, InlineExperienceFragmentNodeSchema])
6058
6183
  );
6059
6184
 
6060
6185
  // src/tools/exo/components/createComponent.ts
6061
6186
  var CreateComponentToolParams = BaseToolSchema.extend({
6062
- name: z86.string().describe("The name of the component"),
6063
- description: z86.string().describe("Description of the component"),
6064
- viewports: z86.array(ViewportSchema).describe("Viewport definitions for the component (may be empty)"),
6065
- contentProperties: z86.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
6066
- designProperties: z86.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
6067
- componentTree: z86.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
6068
- slots: z86.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
6187
+ name: z87.string().describe("The name of the component"),
6188
+ description: z87.string().describe("Description of the component"),
6189
+ viewports: z87.array(ViewportSchema).describe("Viewport definitions for the component (may be empty)"),
6190
+ contentProperties: z87.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
6191
+ designProperties: z87.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
6192
+ componentTree: z87.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
6193
+ slots: z87.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
6069
6194
  metadata: ExoMetadataSchema.optional().describe(
6070
6195
  "Optional ExO metadata (tags, concepts)"
6071
6196
  )
@@ -6076,7 +6201,7 @@ function createComponentTool(config) {
6076
6201
  args.environmentId,
6077
6202
  config.protectedEnvironments
6078
6203
  );
6079
- const contentfulClient = createToolClient(config, args);
6204
+ const contentfulClient = createExoToolClient(config, args);
6080
6205
  const component = await contentfulClient.component.create(
6081
6206
  { spaceId: args.spaceId, environmentId: args.environmentId },
6082
6207
  {
@@ -6098,19 +6223,19 @@ function createComponentTool(config) {
6098
6223
  }
6099
6224
 
6100
6225
  // src/tools/exo/components/upsertComponent.ts
6101
- import { z as z87 } from "zod";
6226
+ import { z as z88 } from "zod";
6102
6227
  var UpsertComponentToolParams = BaseToolSchema.extend({
6103
- componentId: z87.string().describe("The ID of the component to update"),
6104
- version: z87.number().describe(
6228
+ componentId: z88.string().describe("The ID of the component to update"),
6229
+ version: z88.number().describe(
6105
6230
  "REQUIRED. The component's sys.version as returned by get_component. You must call get_component first to read the current state and version. The update is rejected if this does not match the current version, which means the component changed since you read it."
6106
6231
  ),
6107
- name: z87.string().optional().describe("The name of the component"),
6108
- description: z87.string().optional().describe("Description of the component"),
6109
- viewports: z87.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6110
- contentProperties: z87.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
6111
- designProperties: z87.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
6112
- componentTree: z87.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
6113
- slots: z87.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
6232
+ name: z88.string().optional().describe("The name of the component"),
6233
+ description: z88.string().optional().describe("Description of the component"),
6234
+ viewports: z88.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6235
+ contentProperties: z88.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
6236
+ designProperties: z88.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
6237
+ componentTree: z88.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
6238
+ slots: z88.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
6114
6239
  metadata: ExoMetadataSchema.optional().describe(
6115
6240
  "ExO metadata (tags, concepts); replaces existing if provided"
6116
6241
  )
@@ -6126,7 +6251,7 @@ function upsertComponentTool(config) {
6126
6251
  environmentId: args.environmentId,
6127
6252
  componentId: args.componentId
6128
6253
  };
6129
- const contentfulClient = createToolClient(config, args);
6254
+ const contentfulClient = createExoToolClient(config, args);
6130
6255
  const current = await contentfulClient.component.get(params);
6131
6256
  if (args.version !== current.sys.version) {
6132
6257
  throw new Error(
@@ -6157,13 +6282,13 @@ function upsertComponentTool(config) {
6157
6282
  }
6158
6283
 
6159
6284
  // src/tools/exo/components/deleteComponent.ts
6160
- import { z as z88 } from "zod";
6285
+ import { z as z89 } from "zod";
6161
6286
  var DeleteComponentToolParams = BaseToolSchema.extend({
6162
- componentId: z88.string().describe("The ID of the component to delete"),
6163
- confirm: z88.boolean().optional().describe(
6287
+ componentId: z89.string().describe("The ID of the component to delete"),
6288
+ confirm: z89.boolean().optional().describe(
6164
6289
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
6165
6290
  ),
6166
- confirmToken: z88.string().optional().describe(
6291
+ confirmToken: z89.string().optional().describe(
6167
6292
  "Token returned by the preview call; must be supplied with confirm: true."
6168
6293
  )
6169
6294
  });
@@ -6178,7 +6303,7 @@ function deleteComponentTool(config) {
6178
6303
  environmentId: args.environmentId,
6179
6304
  componentId: args.componentId
6180
6305
  };
6181
- const contentfulClient = createToolClient(config, args);
6306
+ const contentfulClient = createExoToolClient(config, args);
6182
6307
  const component = await contentfulClient.component.get(params);
6183
6308
  const expectedToken = buildConfirmToken(
6184
6309
  "component",
@@ -6205,10 +6330,10 @@ function deleteComponentTool(config) {
6205
6330
  }
6206
6331
 
6207
6332
  // src/tools/exo/components/publishComponent.ts
6208
- import { z as z89 } from "zod";
6333
+ import { z as z90 } from "zod";
6209
6334
  var PublishComponentToolParams = BaseToolSchema.extend({
6210
- componentId: z89.string().describe("The ID of the component to publish"),
6211
- version: z89.number().describe(
6335
+ componentId: z90.string().describe("The ID of the component to publish"),
6336
+ version: z90.number().describe(
6212
6337
  "REQUIRED. The component's sys.version as returned by get_component. You must call get_component first to read the current state and version. The publish is rejected if this does not match the current version, which means the component changed since you read it."
6213
6338
  )
6214
6339
  });
@@ -6223,7 +6348,7 @@ function publishComponentTool(config) {
6223
6348
  environmentId: args.environmentId,
6224
6349
  componentId: args.componentId
6225
6350
  };
6226
- const contentfulClient = createToolClient(config, args);
6351
+ const contentfulClient = createExoToolClient(config, args);
6227
6352
  const current = await contentfulClient.component.get(params);
6228
6353
  if (args.version !== current.sys.version) {
6229
6354
  throw new Error(
@@ -6242,10 +6367,10 @@ function publishComponentTool(config) {
6242
6367
  }
6243
6368
 
6244
6369
  // src/tools/exo/components/unpublishComponent.ts
6245
- import { z as z90 } from "zod";
6370
+ import { z as z91 } from "zod";
6246
6371
  var UnpublishComponentToolParams = BaseToolSchema.extend({
6247
- componentId: z90.string().describe("The ID of the component to unpublish"),
6248
- version: z90.number().describe(
6372
+ componentId: z91.string().describe("The ID of the component to unpublish"),
6373
+ version: z91.number().describe(
6249
6374
  "REQUIRED. The component's sys.version as returned by get_component. You must call get_component first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the component changed since you read it."
6250
6375
  )
6251
6376
  });
@@ -6260,7 +6385,7 @@ function unpublishComponentTool(config) {
6260
6385
  environmentId: args.environmentId,
6261
6386
  componentId: args.componentId
6262
6387
  };
6263
- const contentfulClient = createToolClient(config, args);
6388
+ const contentfulClient = createExoToolClient(config, args);
6264
6389
  const current = await contentfulClient.component.get(params);
6265
6390
  if (args.version !== current.sys.version) {
6266
6391
  throw new Error(
@@ -6374,13 +6499,13 @@ function createComponentTools(config) {
6374
6499
  }
6375
6500
 
6376
6501
  // src/tools/exo/experience-fragments/getExperienceFragment.ts
6377
- import { z as z91 } from "zod";
6502
+ import { z as z92 } from "zod";
6378
6503
  var GetExperienceFragmentToolParams = BaseToolSchema.extend({
6379
- experienceFragmentId: z91.string().describe("The ID of the experience fragment to retrieve details for")
6504
+ experienceFragmentId: z92.string().describe("The ID of the experience fragment to retrieve details for")
6380
6505
  });
6381
6506
  function getExperienceFragmentTool(config) {
6382
6507
  async function tool2(args) {
6383
- const contentfulClient = createToolClient(config, args);
6508
+ const contentfulClient = createExoToolClient(config, args);
6384
6509
  const experienceFragment = await contentfulClient.experienceFragment.get({
6385
6510
  spaceId: args.spaceId,
6386
6511
  environmentId: args.environmentId,
@@ -6394,16 +6519,16 @@ function getExperienceFragmentTool(config) {
6394
6519
  }
6395
6520
 
6396
6521
  // src/tools/exo/experience-fragments/listExperienceFragments.ts
6397
- import { z as z92 } from "zod";
6522
+ import { z as z93 } from "zod";
6398
6523
  var ListExperienceFragmentsToolParams = BaseToolSchema.extend({
6399
- limit: z92.number().optional().describe("Maximum number of experience fragments to return (max 10)"),
6400
- pageNext: z92.string().optional().describe("Cursor token to fetch the next page of results"),
6401
- pagePrev: z92.string().optional().describe("Cursor token to fetch the previous page of results"),
6402
- order: z92.string().optional().describe("Order experience fragments by this field (e.g. sys.createdAt)")
6524
+ limit: z93.number().optional().describe("Maximum number of experience fragments to return (max 10)"),
6525
+ pageNext: z93.string().optional().describe("Cursor token to fetch the next page of results"),
6526
+ pagePrev: z93.string().optional().describe("Cursor token to fetch the previous page of results"),
6527
+ order: z93.string().optional().describe("Order experience fragments by this field (e.g. sys.createdAt)")
6403
6528
  });
6404
6529
  function listExperienceFragmentsTool(config) {
6405
6530
  async function tool2(args) {
6406
- const contentfulClient = createToolClient(config, args);
6531
+ const contentfulClient = createExoToolClient(config, args);
6407
6532
  const experienceFragments = await contentfulClient.experienceFragment.getMany({
6408
6533
  spaceId: args.spaceId,
6409
6534
  environmentId: args.environmentId,
@@ -6429,21 +6554,21 @@ function listExperienceFragmentsTool(config) {
6429
6554
  }
6430
6555
 
6431
6556
  // src/tools/exo/experience-fragments/createExperienceFragment.ts
6432
- import { z as z93 } from "zod";
6557
+ import { z as z94 } from "zod";
6433
6558
  var CreateExperienceFragmentToolParams = BaseToolSchema.extend({
6434
- name: z93.string().describe("The name of the experience fragment"),
6435
- description: z93.string().describe("Description of the experience fragment"),
6559
+ name: z94.string().describe("The name of the experience fragment"),
6560
+ description: z94.string().describe("Description of the experience fragment"),
6436
6561
  component: ComponentResourceLinkSchema.describe(
6437
6562
  "Resource link to the component this experience fragment is based on"
6438
6563
  ),
6439
- viewports: z93.array(ViewportSchema).describe("Viewport definitions (may be empty)"),
6440
- designProperties: z93.record(z93.string(), DimensionedDesignPropertyValueSchema).describe(
6564
+ viewports: z94.array(ViewportSchema).describe("Viewport definitions (may be empty)"),
6565
+ designProperties: z94.record(z94.string(), DimensionedDesignPropertyValueSchema).describe(
6441
6566
  "Design property values keyed by property ID (may be empty object)"
6442
6567
  ),
6443
6568
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
6444
6569
  "Optional content bindings for the experience fragment"
6445
6570
  ),
6446
- slots: z93.record(z93.string(), z93.array(ExperienceSlotNodeSchema)).optional().describe("Optional slot node definitions keyed by slot ID"),
6571
+ slots: z94.record(z94.string(), z94.array(ExperienceSlotNodeSchema)).optional().describe("Optional slot node definitions keyed by slot ID"),
6447
6572
  metadata: ExperienceMetadataSchema.optional().describe(
6448
6573
  "Optional ExO metadata (tags, concepts)"
6449
6574
  )
@@ -6454,7 +6579,7 @@ function createExperienceFragmentTool(config) {
6454
6579
  args.environmentId,
6455
6580
  config.protectedEnvironments
6456
6581
  );
6457
- const contentfulClient = createToolClient(config, args);
6582
+ const contentfulClient = createExoToolClient(config, args);
6458
6583
  const experienceFragment = await contentfulClient.experienceFragment.create(
6459
6584
  { spaceId: args.spaceId, environmentId: args.environmentId },
6460
6585
  {
@@ -6476,20 +6601,20 @@ function createExperienceFragmentTool(config) {
6476
6601
  }
6477
6602
 
6478
6603
  // src/tools/exo/experience-fragments/updateExperienceFragment.ts
6479
- import { z as z94 } from "zod";
6604
+ import { z as z95 } from "zod";
6480
6605
  var UpdateExperienceFragmentToolParams = BaseToolSchema.extend({
6481
- experienceFragmentId: z94.string().describe("The ID of the experience fragment to update"),
6482
- version: z94.number().describe(
6606
+ experienceFragmentId: z95.string().describe("The ID of the experience fragment to update"),
6607
+ version: z95.number().describe(
6483
6608
  "REQUIRED. The experience fragment's sys.version as returned by get_experience_fragment. You must call get_experience_fragment first to read the current state and version. The update is rejected if this does not match the current version, which means the experience fragment changed since you read it."
6484
6609
  ),
6485
- name: z94.string().optional().describe("The name of the experience fragment"),
6486
- description: z94.string().optional().describe("Description of the experience fragment"),
6487
- viewports: z94.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6488
- designProperties: z94.record(z94.string(), DimensionedDesignPropertyValueSchema).optional().describe("Design property values; replaces existing if provided"),
6610
+ name: z95.string().optional().describe("The name of the experience fragment"),
6611
+ description: z95.string().optional().describe("Description of the experience fragment"),
6612
+ viewports: z95.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6613
+ designProperties: z95.record(z95.string(), DimensionedDesignPropertyValueSchema).optional().describe("Design property values; replaces existing if provided"),
6489
6614
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
6490
6615
  "Content bindings; replaces existing if provided"
6491
6616
  ),
6492
- slots: z94.record(z94.string(), z94.array(ExperienceSlotNodeSchema)).optional().describe("Slot node definitions; replaces existing if provided"),
6617
+ slots: z95.record(z95.string(), z95.array(ExperienceSlotNodeSchema)).optional().describe("Slot node definitions; replaces existing if provided"),
6493
6618
  metadata: ExperienceMetadataSchema.optional().describe(
6494
6619
  "ExO metadata (tags, concepts); replaces existing if provided"
6495
6620
  )
@@ -6505,7 +6630,7 @@ function updateExperienceFragmentTool(config) {
6505
6630
  environmentId: args.environmentId,
6506
6631
  experienceFragmentId: args.experienceFragmentId
6507
6632
  };
6508
- const contentfulClient = createToolClient(config, args);
6633
+ const contentfulClient = createExoToolClient(config, args);
6509
6634
  const current = await contentfulClient.experienceFragment.get(params);
6510
6635
  if (args.version !== current.sys.version) {
6511
6636
  throw new Error(
@@ -6537,13 +6662,13 @@ function updateExperienceFragmentTool(config) {
6537
6662
  }
6538
6663
 
6539
6664
  // src/tools/exo/experience-fragments/deleteExperienceFragment.ts
6540
- import { z as z95 } from "zod";
6665
+ import { z as z96 } from "zod";
6541
6666
  var DeleteExperienceFragmentToolParams = BaseToolSchema.extend({
6542
- experienceFragmentId: z95.string().describe("The ID of the experience fragment to delete"),
6543
- confirm: z95.boolean().optional().describe(
6667
+ experienceFragmentId: z96.string().describe("The ID of the experience fragment to delete"),
6668
+ confirm: z96.boolean().optional().describe(
6544
6669
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
6545
6670
  ),
6546
- confirmToken: z95.string().optional().describe(
6671
+ confirmToken: z96.string().optional().describe(
6547
6672
  "Token returned by the preview call; must be supplied with confirm: true."
6548
6673
  )
6549
6674
  });
@@ -6558,7 +6683,7 @@ function deleteExperienceFragmentTool(config) {
6558
6683
  environmentId: args.environmentId,
6559
6684
  experienceFragmentId: args.experienceFragmentId
6560
6685
  };
6561
- const contentfulClient = createToolClient(config, args);
6686
+ const contentfulClient = createExoToolClient(config, args);
6562
6687
  const experienceFragment = await contentfulClient.experienceFragment.get(params);
6563
6688
  const expectedToken = buildConfirmToken(
6564
6689
  "experienceFragment",
@@ -6585,10 +6710,10 @@ function deleteExperienceFragmentTool(config) {
6585
6710
  }
6586
6711
 
6587
6712
  // src/tools/exo/experience-fragments/publishExperienceFragment.ts
6588
- import { z as z96 } from "zod";
6713
+ import { z as z97 } from "zod";
6589
6714
  var PublishExperienceFragmentToolParams = BaseToolSchema.extend({
6590
- experienceFragmentId: z96.string().describe("The ID of the experience fragment to publish"),
6591
- version: z96.number().describe(
6715
+ experienceFragmentId: z97.string().describe("The ID of the experience fragment to publish"),
6716
+ version: z97.number().describe(
6592
6717
  "REQUIRED. The experience fragment's sys.version as returned by get_experience_fragment. You must call get_experience_fragment first to read the current state and version. The publish is rejected if this does not match the current version, which means the experience fragment changed since you read it."
6593
6718
  )
6594
6719
  });
@@ -6603,7 +6728,7 @@ function publishExperienceFragmentTool(config) {
6603
6728
  environmentId: args.environmentId,
6604
6729
  experienceFragmentId: args.experienceFragmentId
6605
6730
  };
6606
- const contentfulClient = createToolClient(config, args);
6731
+ const contentfulClient = createExoToolClient(config, args);
6607
6732
  const current = await contentfulClient.experienceFragment.get(params);
6608
6733
  if (args.version !== current.sys.version) {
6609
6734
  throw new Error(
@@ -6622,10 +6747,10 @@ function publishExperienceFragmentTool(config) {
6622
6747
  }
6623
6748
 
6624
6749
  // src/tools/exo/experience-fragments/unpublishExperienceFragment.ts
6625
- import { z as z97 } from "zod";
6750
+ import { z as z98 } from "zod";
6626
6751
  var UnpublishExperienceFragmentToolParams = BaseToolSchema.extend({
6627
- experienceFragmentId: z97.string().describe("The ID of the experience fragment to unpublish"),
6628
- version: z97.number().describe(
6752
+ experienceFragmentId: z98.string().describe("The ID of the experience fragment to unpublish"),
6753
+ version: z98.number().describe(
6629
6754
  "REQUIRED. The experience fragment's sys.version as returned by get_experience_fragment. You must call get_experience_fragment first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the experience fragment changed since you read it."
6630
6755
  )
6631
6756
  });
@@ -6640,7 +6765,7 @@ function unpublishExperienceFragmentTool(config) {
6640
6765
  environmentId: args.environmentId,
6641
6766
  experienceFragmentId: args.experienceFragmentId
6642
6767
  };
6643
- const contentfulClient = createToolClient(config, args);
6768
+ const contentfulClient = createExoToolClient(config, args);
6644
6769
  const current = await contentfulClient.experienceFragment.get(params);
6645
6770
  if (args.version !== current.sys.version) {
6646
6771
  throw new Error(
@@ -6757,13 +6882,13 @@ function createExperienceFragmentTools(config) {
6757
6882
  }
6758
6883
 
6759
6884
  // src/tools/exo/experience-templates/getExperienceTemplate.ts
6760
- import { z as z98 } from "zod";
6885
+ import { z as z99 } from "zod";
6761
6886
  var GetExperienceTemplateToolParams = BaseToolSchema.extend({
6762
- experienceTemplateId: z98.string().describe("The ID of the experience template to retrieve details for")
6887
+ experienceTemplateId: z99.string().describe("The ID of the experience template to retrieve details for")
6763
6888
  });
6764
6889
  function getExperienceTemplateTool(config) {
6765
6890
  async function tool2(args) {
6766
- const contentfulClient = createToolClient(config, args);
6891
+ const contentfulClient = createExoToolClient(config, args);
6767
6892
  const experienceTemplate = await contentfulClient.experienceTemplate.get({
6768
6893
  spaceId: args.spaceId,
6769
6894
  environmentId: args.environmentId,
@@ -6777,16 +6902,16 @@ function getExperienceTemplateTool(config) {
6777
6902
  }
6778
6903
 
6779
6904
  // src/tools/exo/experience-templates/listExperienceTemplates.ts
6780
- import { z as z99 } from "zod";
6905
+ import { z as z100 } from "zod";
6781
6906
  var ListExperienceTemplatesToolParams = BaseToolSchema.extend({
6782
- limit: z99.number().optional().describe("Maximum number of experience templates to return (max 10)"),
6783
- pageNext: z99.string().optional().describe("Cursor token to fetch the next page of results"),
6784
- pagePrev: z99.string().optional().describe("Cursor token to fetch the previous page of results"),
6785
- order: z99.string().optional().describe("Order experience templates by this field (e.g. sys.createdAt)")
6907
+ limit: z100.number().optional().describe("Maximum number of experience templates to return (max 10)"),
6908
+ pageNext: z100.string().optional().describe("Cursor token to fetch the next page of results"),
6909
+ pagePrev: z100.string().optional().describe("Cursor token to fetch the previous page of results"),
6910
+ order: z100.string().optional().describe("Order experience templates by this field (e.g. sys.createdAt)")
6786
6911
  });
6787
6912
  function listExperienceTemplatesTool(config) {
6788
6913
  async function tool2(args) {
6789
- const contentfulClient = createToolClient(config, args);
6914
+ const contentfulClient = createExoToolClient(config, args);
6790
6915
  const experienceTemplates = await contentfulClient.experienceTemplate.getMany({
6791
6916
  spaceId: args.spaceId,
6792
6917
  environmentId: args.environmentId,
@@ -6812,17 +6937,17 @@ function listExperienceTemplatesTool(config) {
6812
6937
  }
6813
6938
 
6814
6939
  // src/tools/exo/experience-templates/createExperienceTemplate.ts
6815
- import { z as z100 } from "zod";
6940
+ import { z as z101 } from "zod";
6816
6941
  var CreateExperienceTemplateToolParams = BaseToolSchema.extend({
6817
- name: z100.string().describe("The name of the experience template"),
6818
- description: z100.string().describe("Description of the experience template"),
6819
- viewports: z100.array(ViewportSchema).describe(
6942
+ name: z101.string().describe("The name of the experience template"),
6943
+ description: z101.string().describe("Description of the experience template"),
6944
+ viewports: z101.array(ViewportSchema).describe(
6820
6945
  "Viewport definitions for the experience template (may be empty)"
6821
6946
  ),
6822
- contentProperties: z100.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
6823
- designProperties: z100.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
6824
- componentTree: z100.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
6825
- slots: z100.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
6947
+ contentProperties: z101.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
6948
+ designProperties: z101.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
6949
+ componentTree: z101.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
6950
+ slots: z101.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
6826
6951
  metadata: ExoMetadataSchema.optional().describe(
6827
6952
  "Optional ExO metadata (tags, concepts)"
6828
6953
  )
@@ -6833,7 +6958,7 @@ function createExperienceTemplateTool(config) {
6833
6958
  args.environmentId,
6834
6959
  config.protectedEnvironments
6835
6960
  );
6836
- const contentfulClient = createToolClient(config, args);
6961
+ const contentfulClient = createExoToolClient(config, args);
6837
6962
  const experienceTemplate = await contentfulClient.experienceTemplate.create(
6838
6963
  { spaceId: args.spaceId, environmentId: args.environmentId },
6839
6964
  {
@@ -6855,19 +6980,19 @@ function createExperienceTemplateTool(config) {
6855
6980
  }
6856
6981
 
6857
6982
  // src/tools/exo/experience-templates/upsertExperienceTemplate.ts
6858
- import { z as z101 } from "zod";
6983
+ import { z as z102 } from "zod";
6859
6984
  var UpsertExperienceTemplateToolParams = BaseToolSchema.extend({
6860
- experienceTemplateId: z101.string().describe("The ID of the experience template to update"),
6861
- version: z101.number().describe(
6985
+ experienceTemplateId: z102.string().describe("The ID of the experience template to update"),
6986
+ version: z102.number().describe(
6862
6987
  "REQUIRED. The experience template's sys.version as returned by get_experience_template. You must call get_experience_template first to read the current state and version. The update is rejected if this does not match the current version, which means the experience template changed since you read it."
6863
6988
  ),
6864
- name: z101.string().optional().describe("The name of the experience template"),
6865
- description: z101.string().optional().describe("Description of the experience template"),
6866
- viewports: z101.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6867
- contentProperties: z101.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
6868
- designProperties: z101.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
6869
- componentTree: z101.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
6870
- slots: z101.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
6989
+ name: z102.string().optional().describe("The name of the experience template"),
6990
+ description: z102.string().optional().describe("Description of the experience template"),
6991
+ viewports: z102.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6992
+ contentProperties: z102.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
6993
+ designProperties: z102.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
6994
+ componentTree: z102.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
6995
+ slots: z102.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
6871
6996
  metadata: ExoMetadataSchema.optional().describe(
6872
6997
  "ExO metadata (tags, concepts); replaces existing if provided"
6873
6998
  )
@@ -6883,7 +7008,7 @@ function upsertExperienceTemplateTool(config) {
6883
7008
  environmentId: args.environmentId,
6884
7009
  experienceTemplateId: args.experienceTemplateId
6885
7010
  };
6886
- const contentfulClient = createToolClient(config, args);
7011
+ const contentfulClient = createExoToolClient(config, args);
6887
7012
  const current = await contentfulClient.experienceTemplate.get(params);
6888
7013
  if (args.version !== current.sys.version) {
6889
7014
  throw new Error(
@@ -6917,13 +7042,13 @@ function upsertExperienceTemplateTool(config) {
6917
7042
  }
6918
7043
 
6919
7044
  // src/tools/exo/experience-templates/deleteExperienceTemplate.ts
6920
- import { z as z102 } from "zod";
7045
+ import { z as z103 } from "zod";
6921
7046
  var DeleteExperienceTemplateToolParams = BaseToolSchema.extend({
6922
- experienceTemplateId: z102.string().describe("The ID of the experience template to delete"),
6923
- confirm: z102.boolean().optional().describe(
7047
+ experienceTemplateId: z103.string().describe("The ID of the experience template to delete"),
7048
+ confirm: z103.boolean().optional().describe(
6924
7049
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
6925
7050
  ),
6926
- confirmToken: z102.string().optional().describe(
7051
+ confirmToken: z103.string().optional().describe(
6927
7052
  "Token returned by the preview call; must be supplied with confirm: true."
6928
7053
  )
6929
7054
  });
@@ -6938,7 +7063,7 @@ function deleteExperienceTemplateTool(config) {
6938
7063
  environmentId: args.environmentId,
6939
7064
  experienceTemplateId: args.experienceTemplateId
6940
7065
  };
6941
- const contentfulClient = createToolClient(config, args);
7066
+ const contentfulClient = createExoToolClient(config, args);
6942
7067
  const experienceTemplate = await contentfulClient.experienceTemplate.get(params);
6943
7068
  const expectedToken = buildConfirmToken(
6944
7069
  "experienceTemplate",
@@ -6965,10 +7090,10 @@ function deleteExperienceTemplateTool(config) {
6965
7090
  }
6966
7091
 
6967
7092
  // src/tools/exo/experience-templates/publishExperienceTemplate.ts
6968
- import { z as z103 } from "zod";
7093
+ import { z as z104 } from "zod";
6969
7094
  var PublishExperienceTemplateToolParams = BaseToolSchema.extend({
6970
- experienceTemplateId: z103.string().describe("The ID of the experience template to publish"),
6971
- version: z103.number().describe(
7095
+ experienceTemplateId: z104.string().describe("The ID of the experience template to publish"),
7096
+ version: z104.number().describe(
6972
7097
  "REQUIRED. The experience template's sys.version as returned by get_experience_template. You must call get_experience_template first to read the current state and version. The publish is rejected if this does not match the current version, which means the experience template changed since you read it."
6973
7098
  )
6974
7099
  });
@@ -6983,7 +7108,7 @@ function publishExperienceTemplateTool(config) {
6983
7108
  environmentId: args.environmentId,
6984
7109
  experienceTemplateId: args.experienceTemplateId
6985
7110
  };
6986
- const contentfulClient = createToolClient(config, args);
7111
+ const contentfulClient = createExoToolClient(config, args);
6987
7112
  const current = await contentfulClient.experienceTemplate.get(params);
6988
7113
  if (args.version !== current.sys.version) {
6989
7114
  throw new Error(
@@ -7002,10 +7127,10 @@ function publishExperienceTemplateTool(config) {
7002
7127
  }
7003
7128
 
7004
7129
  // src/tools/exo/experience-templates/unpublishExperienceTemplate.ts
7005
- import { z as z104 } from "zod";
7130
+ import { z as z105 } from "zod";
7006
7131
  var UnpublishExperienceTemplateToolParams = BaseToolSchema.extend({
7007
- experienceTemplateId: z104.string().describe("The ID of the experience template to unpublish"),
7008
- version: z104.number().describe(
7132
+ experienceTemplateId: z105.string().describe("The ID of the experience template to unpublish"),
7133
+ version: z105.number().describe(
7009
7134
  "REQUIRED. The experience template's sys.version as returned by get_experience_template. You must call get_experience_template first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the experience template changed since you read it."
7010
7135
  )
7011
7136
  });
@@ -7020,7 +7145,7 @@ function unpublishExperienceTemplateTool(config) {
7020
7145
  environmentId: args.environmentId,
7021
7146
  experienceTemplateId: args.experienceTemplateId
7022
7147
  };
7023
- const contentfulClient = createToolClient(config, args);
7148
+ const contentfulClient = createExoToolClient(config, args);
7024
7149
  const current = await contentfulClient.experienceTemplate.get(params);
7025
7150
  if (args.version !== current.sys.version) {
7026
7151
  throw new Error(
@@ -7137,13 +7262,13 @@ function createExperienceTemplateTools(config) {
7137
7262
  }
7138
7263
 
7139
7264
  // src/tools/exo/experiences/getExperience.ts
7140
- import { z as z105 } from "zod";
7265
+ import { z as z106 } from "zod";
7141
7266
  var GetExperienceToolParams = BaseToolSchema.extend({
7142
- experienceId: z105.string().describe("The ID of the experience to retrieve")
7267
+ experienceId: z106.string().describe("The ID of the experience to retrieve")
7143
7268
  });
7144
7269
  function getExperienceTool(config) {
7145
7270
  async function tool2(args) {
7146
- const contentfulClient = createToolClient(config, args);
7271
+ const contentfulClient = createExoToolClient(config, args);
7147
7272
  const experience = await contentfulClient.experience.get({
7148
7273
  spaceId: args.spaceId,
7149
7274
  environmentId: args.environmentId,
@@ -7157,16 +7282,16 @@ function getExperienceTool(config) {
7157
7282
  }
7158
7283
 
7159
7284
  // src/tools/exo/experiences/listExperiences.ts
7160
- import { z as z106 } from "zod";
7285
+ import { z as z107 } from "zod";
7161
7286
  var ListExperiencesToolParams = BaseToolSchema.extend({
7162
- limit: z106.number().optional().describe("Maximum number of experiences to return (max 10)"),
7163
- pageNext: z106.string().optional().describe("Cursor token to fetch the next page of results"),
7164
- pagePrev: z106.string().optional().describe("Cursor token to fetch the previous page of results"),
7165
- order: z106.string().optional().describe("Order experiences by this field (e.g. sys.createdAt)")
7287
+ limit: z107.number().optional().describe("Maximum number of experiences to return (max 10)"),
7288
+ pageNext: z107.string().optional().describe("Cursor token to fetch the next page of results"),
7289
+ pagePrev: z107.string().optional().describe("Cursor token to fetch the previous page of results"),
7290
+ order: z107.string().optional().describe("Order experiences by this field (e.g. sys.createdAt)")
7166
7291
  });
7167
7292
  function listExperiencesTool(config) {
7168
7293
  async function tool2(args) {
7169
- const contentfulClient = createToolClient(config, args);
7294
+ const contentfulClient = createExoToolClient(config, args);
7170
7295
  const experiences = await contentfulClient.experience.getMany({
7171
7296
  spaceId: args.spaceId,
7172
7297
  environmentId: args.environmentId,
@@ -7192,21 +7317,21 @@ function listExperiencesTool(config) {
7192
7317
  }
7193
7318
 
7194
7319
  // src/tools/exo/experiences/createExperience.ts
7195
- import { z as z107 } from "zod";
7320
+ import { z as z108 } from "zod";
7196
7321
  var CreateExperienceToolParams = BaseToolSchema.extend({
7197
- name: z107.string().describe("The name of the experience"),
7198
- description: z107.string().describe("Description of the experience"),
7322
+ name: z108.string().describe("The name of the experience"),
7323
+ description: z108.string().describe("Description of the experience"),
7199
7324
  experienceTemplate: ExperienceTemplateResourceLinkSchema.describe(
7200
7325
  "Resource link to the ExperienceTemplate this experience is backed by"
7201
7326
  ),
7202
- viewports: z107.array(ViewportSchema).describe("Viewport definitions for the experience (may be empty)"),
7203
- designProperties: z107.record(z107.string(), DimensionedDesignPropertyValueSchema).describe(
7327
+ viewports: z108.array(ViewportSchema).describe("Viewport definitions for the experience (may be empty)"),
7328
+ designProperties: z108.record(z108.string(), DimensionedDesignPropertyValueSchema).describe(
7204
7329
  "Design property values keyed by property ID. Each value is a dimensioned map (viewport ID \u2192 design value). May be an empty object."
7205
7330
  ),
7206
7331
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
7207
7332
  "Optional content bindings linking this experience to a data assembly"
7208
7333
  ),
7209
- slots: z107.record(z107.string(), z107.array(ExperienceSlotNodeSchema)).optional().describe(
7334
+ slots: z108.record(z108.string(), z108.array(ExperienceSlotNodeSchema)).optional().describe(
7210
7335
  "Optional slot contents keyed by slot ID. Each value is an array of ExperienceFragmentNode or InlineExperienceFragmentNode."
7211
7336
  ),
7212
7337
  metadata: ExperienceMetadataSchema.optional().describe(
@@ -7219,7 +7344,7 @@ function createExperienceTool(config) {
7219
7344
  args.environmentId,
7220
7345
  config.protectedEnvironments
7221
7346
  );
7222
- const contentfulClient = createToolClient(config, args);
7347
+ const contentfulClient = createExoToolClient(config, args);
7223
7348
  const experience = await contentfulClient.experience.create(
7224
7349
  { spaceId: args.spaceId, environmentId: args.environmentId },
7225
7350
  {
@@ -7241,22 +7366,22 @@ function createExperienceTool(config) {
7241
7366
  }
7242
7367
 
7243
7368
  // src/tools/exo/experiences/upsertExperience.ts
7244
- import { z as z108 } from "zod";
7369
+ import { z as z109 } from "zod";
7245
7370
  var UpsertExperienceToolParams = BaseToolSchema.extend({
7246
- experienceId: z108.string().describe("The ID of the experience to update"),
7247
- version: z108.number().describe(
7371
+ experienceId: z109.string().describe("The ID of the experience to update"),
7372
+ version: z109.number().describe(
7248
7373
  "REQUIRED. The experience's sys.version as returned by get_experience. You must call get_experience first to read the current state and version. The update is rejected if this does not match the current version, which means the experience changed since you read it."
7249
7374
  ),
7250
- name: z108.string().optional().describe("The name of the experience"),
7251
- description: z108.string().optional().describe("Description of the experience"),
7252
- viewports: z108.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
7253
- designProperties: z108.record(z108.string(), DimensionedDesignPropertyValueSchema).optional().describe(
7375
+ name: z109.string().optional().describe("The name of the experience"),
7376
+ description: z109.string().optional().describe("Description of the experience"),
7377
+ viewports: z109.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
7378
+ designProperties: z109.record(z109.string(), DimensionedDesignPropertyValueSchema).optional().describe(
7254
7379
  "Design property values keyed by property ID; replaces existing if provided"
7255
7380
  ),
7256
7381
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
7257
7382
  "Content bindings linking this experience to a data assembly; replaces existing if provided"
7258
7383
  ),
7259
- slots: z108.record(z108.string(), z108.array(ExperienceSlotNodeSchema)).optional().describe("Slot contents keyed by slot ID; replaces existing if provided"),
7384
+ slots: z109.record(z109.string(), z109.array(ExperienceSlotNodeSchema)).optional().describe("Slot contents keyed by slot ID; replaces existing if provided"),
7260
7385
  metadata: ExperienceMetadataSchema.optional().describe(
7261
7386
  "ExO metadata (tags, concepts); replaces existing if provided"
7262
7387
  )
@@ -7272,7 +7397,7 @@ function upsertExperienceTool(config) {
7272
7397
  environmentId: args.environmentId,
7273
7398
  experienceId: args.experienceId
7274
7399
  };
7275
- const contentfulClient = createToolClient(config, args);
7400
+ const contentfulClient = createExoToolClient(config, args);
7276
7401
  const current = await contentfulClient.experience.get(params);
7277
7402
  if (args.version !== current.sys.version) {
7278
7403
  throw new Error(
@@ -7301,13 +7426,13 @@ function upsertExperienceTool(config) {
7301
7426
  }
7302
7427
 
7303
7428
  // src/tools/exo/experiences/deleteExperience.ts
7304
- import { z as z109 } from "zod";
7429
+ import { z as z110 } from "zod";
7305
7430
  var DeleteExperienceToolParams = BaseToolSchema.extend({
7306
- experienceId: z109.string().describe("The ID of the experience to delete"),
7307
- confirm: z109.boolean().optional().describe(
7431
+ experienceId: z110.string().describe("The ID of the experience to delete"),
7432
+ confirm: z110.boolean().optional().describe(
7308
7433
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
7309
7434
  ),
7310
- confirmToken: z109.string().optional().describe(
7435
+ confirmToken: z110.string().optional().describe(
7311
7436
  "Token returned by the preview call; must be supplied with confirm: true."
7312
7437
  )
7313
7438
  });
@@ -7322,7 +7447,7 @@ function deleteExperienceTool(config) {
7322
7447
  environmentId: args.environmentId,
7323
7448
  experienceId: args.experienceId
7324
7449
  };
7325
- const contentfulClient = createToolClient(config, args);
7450
+ const contentfulClient = createExoToolClient(config, args);
7326
7451
  const experience = await contentfulClient.experience.get(params);
7327
7452
  const expectedToken = buildConfirmToken(
7328
7453
  "experience",
@@ -7349,10 +7474,10 @@ function deleteExperienceTool(config) {
7349
7474
  }
7350
7475
 
7351
7476
  // src/tools/exo/experiences/publishExperience.ts
7352
- import { z as z110 } from "zod";
7477
+ import { z as z111 } from "zod";
7353
7478
  var PublishExperienceToolParams = BaseToolSchema.extend({
7354
- experienceId: z110.string().describe("The ID of the experience to publish"),
7355
- version: z110.number().describe(
7479
+ experienceId: z111.string().describe("The ID of the experience to publish"),
7480
+ version: z111.number().describe(
7356
7481
  "REQUIRED. The experience's sys.version as returned by get_experience. You must call get_experience first to read the current state and version. The publish is rejected if this does not match the current version, which means the experience changed since you read it."
7357
7482
  )
7358
7483
  });
@@ -7367,7 +7492,7 @@ function publishExperienceTool(config) {
7367
7492
  environmentId: args.environmentId,
7368
7493
  experienceId: args.experienceId
7369
7494
  };
7370
- const contentfulClient = createToolClient(config, args);
7495
+ const contentfulClient = createExoToolClient(config, args);
7371
7496
  const current = await contentfulClient.experience.get(params);
7372
7497
  if (args.version !== current.sys.version) {
7373
7498
  throw new Error(
@@ -7386,10 +7511,10 @@ function publishExperienceTool(config) {
7386
7511
  }
7387
7512
 
7388
7513
  // src/tools/exo/experiences/unpublishExperience.ts
7389
- import { z as z111 } from "zod";
7514
+ import { z as z112 } from "zod";
7390
7515
  var UnpublishExperienceToolParams = BaseToolSchema.extend({
7391
- experienceId: z111.string().describe("The ID of the experience to unpublish"),
7392
- version: z111.number().describe(
7516
+ experienceId: z112.string().describe("The ID of the experience to unpublish"),
7517
+ version: z112.number().describe(
7393
7518
  "REQUIRED. The experience's sys.version as returned by get_experience. You must call get_experience first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the experience changed since you read it."
7394
7519
  )
7395
7520
  });
@@ -7404,7 +7529,7 @@ function unpublishExperienceTool(config) {
7404
7529
  environmentId: args.environmentId,
7405
7530
  experienceId: args.experienceId
7406
7531
  };
7407
- const contentfulClient = createToolClient(config, args);
7532
+ const contentfulClient = createExoToolClient(config, args);
7408
7533
  const current = await contentfulClient.experience.get(params);
7409
7534
  if (args.version !== current.sys.version) {
7410
7535
  throw new Error(
@@ -7518,13 +7643,13 @@ function createExperienceTools(config) {
7518
7643
  }
7519
7644
 
7520
7645
  // src/tools/exo/data-assemblies/getDataAssembly.ts
7521
- import { z as z112 } from "zod";
7646
+ import { z as z113 } from "zod";
7522
7647
  var GetDataAssemblyToolParams = BaseToolSchema.extend({
7523
- dataAssemblyId: z112.string().describe("The ID of the data assembly to retrieve")
7648
+ dataAssemblyId: z113.string().describe("The ID of the data assembly to retrieve")
7524
7649
  });
7525
7650
  function getDataAssemblyTool(config) {
7526
7651
  async function tool2(args) {
7527
- const contentfulClient = createToolClient(config, args);
7652
+ const contentfulClient = createExoToolClient(config, args);
7528
7653
  const dataAssembly = await contentfulClient.dataAssembly.get({
7529
7654
  spaceId: args.spaceId,
7530
7655
  environmentId: args.environmentId,
@@ -7538,13 +7663,13 @@ function getDataAssemblyTool(config) {
7538
7663
  }
7539
7664
 
7540
7665
  // src/tools/exo/data-assemblies/getPublishedDataAssembly.ts
7541
- import { z as z113 } from "zod";
7666
+ import { z as z114 } from "zod";
7542
7667
  var GetPublishedDataAssemblyToolParams = BaseToolSchema.extend({
7543
- dataAssemblyId: z113.string().describe("The ID of the published data assembly to retrieve")
7668
+ dataAssemblyId: z114.string().describe("The ID of the published data assembly to retrieve")
7544
7669
  });
7545
7670
  function getPublishedDataAssemblyTool(config) {
7546
7671
  async function tool2(args) {
7547
- const contentfulClient = createToolClient(config, args);
7672
+ const contentfulClient = createExoToolClient(config, args);
7548
7673
  const dataAssembly = await contentfulClient.dataAssembly.getPublished({
7549
7674
  spaceId: args.spaceId,
7550
7675
  environmentId: args.environmentId,
@@ -7558,16 +7683,16 @@ function getPublishedDataAssemblyTool(config) {
7558
7683
  }
7559
7684
 
7560
7685
  // src/tools/exo/data-assemblies/listDataAssemblies.ts
7561
- import { z as z114 } from "zod";
7686
+ import { z as z115 } from "zod";
7562
7687
  var ListDataAssembliesToolParams = BaseToolSchema.extend({
7563
- limit: z114.number().optional().describe("Maximum number of data assemblies to return (max 10)"),
7564
- pageNext: z114.string().optional().describe("Cursor token to fetch the next page of results"),
7565
- pagePrev: z114.string().optional().describe("Cursor token to fetch the previous page of results"),
7566
- sysIdIn: z114.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
7688
+ limit: z115.number().optional().describe("Maximum number of data assemblies to return (max 10)"),
7689
+ pageNext: z115.string().optional().describe("Cursor token to fetch the next page of results"),
7690
+ pagePrev: z115.string().optional().describe("Cursor token to fetch the previous page of results"),
7691
+ sysIdIn: z115.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
7567
7692
  });
7568
7693
  function listDataAssembliesTool(config) {
7569
7694
  async function tool2(args) {
7570
- const contentfulClient = createToolClient(config, args);
7695
+ const contentfulClient = createExoToolClient(config, args);
7571
7696
  const dataAssemblies = await contentfulClient.dataAssembly.getMany({
7572
7697
  spaceId: args.spaceId,
7573
7698
  environmentId: args.environmentId,
@@ -7592,16 +7717,16 @@ function listDataAssembliesTool(config) {
7592
7717
  }
7593
7718
 
7594
7719
  // src/tools/exo/data-assemblies/listPublishedDataAssemblies.ts
7595
- import { z as z115 } from "zod";
7720
+ import { z as z116 } from "zod";
7596
7721
  var ListPublishedDataAssembliesToolParams = BaseToolSchema.extend({
7597
- limit: z115.number().optional().describe("Maximum number of published data assemblies to return (max 10)"),
7598
- pageNext: z115.string().optional().describe("Cursor token to fetch the next page of results"),
7599
- pagePrev: z115.string().optional().describe("Cursor token to fetch the previous page of results"),
7600
- sysIdIn: z115.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
7722
+ limit: z116.number().optional().describe("Maximum number of published data assemblies to return (max 10)"),
7723
+ pageNext: z116.string().optional().describe("Cursor token to fetch the next page of results"),
7724
+ pagePrev: z116.string().optional().describe("Cursor token to fetch the previous page of results"),
7725
+ sysIdIn: z116.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
7601
7726
  });
7602
7727
  function listPublishedDataAssembliesTool(config) {
7603
7728
  async function tool2(args) {
7604
- const contentfulClient = createToolClient(config, args);
7729
+ const contentfulClient = createExoToolClient(config, args);
7605
7730
  const dataAssemblies = await contentfulClient.dataAssembly.getManyPublished({
7606
7731
  spaceId: args.spaceId,
7607
7732
  environmentId: args.environmentId,
@@ -7626,35 +7751,35 @@ function listPublishedDataAssembliesTool(config) {
7626
7751
  }
7627
7752
 
7628
7753
  // src/tools/exo/data-assemblies/createDataAssembly.ts
7629
- import { z as z117 } from "zod";
7754
+ import { z as z118 } from "zod";
7630
7755
 
7631
7756
  // src/types/dataAssemblySchemas.ts
7632
- import { z as z116 } from "zod";
7633
- var PointerExpressionValueSchema = z116.lazy(
7634
- () => z116.union([
7635
- z116.string(),
7636
- z116.object({
7637
- $from: z116.union([
7638
- z116.string(),
7639
- z116.object({
7640
- source: z116.string(),
7757
+ import { z as z117 } from "zod";
7758
+ var PointerExpressionValueSchema = z117.lazy(
7759
+ () => z117.union([
7760
+ z117.string(),
7761
+ z117.object({
7762
+ $from: z117.union([
7763
+ z117.string(),
7764
+ z117.object({
7765
+ source: z117.string(),
7641
7766
  select: PointerExpressionValueSchema.optional()
7642
7767
  })
7643
7768
  ])
7644
7769
  }),
7645
- z116.object({ $literal: z116.custom() }),
7646
- z116.object({ $object: z116.record(z116.string(), PointerExpressionValueSchema) }),
7647
- z116.object({
7648
- $on: z116.object({
7649
- type: z116.record(z116.string(), PointerExpressionValueSchema),
7770
+ z117.object({ $literal: z117.custom() }),
7771
+ z117.object({ $object: z117.record(z117.string(), PointerExpressionValueSchema) }),
7772
+ z117.object({
7773
+ $on: z117.object({
7774
+ type: z117.record(z117.string(), PointerExpressionValueSchema),
7650
7775
  default: PointerExpressionValueSchema.optional()
7651
7776
  })
7652
7777
  }),
7653
- z116.record(z116.string(), PointerExpressionValueSchema)
7778
+ z117.record(z117.string(), PointerExpressionValueSchema)
7654
7779
  ])
7655
7780
  );
7656
- var CanonicalDataTypeArmSchema = z116.object({
7657
- type: z116.enum([
7781
+ var CanonicalDataTypeArmSchema = z117.object({
7782
+ type: z117.enum([
7658
7783
  "String",
7659
7784
  "Number",
7660
7785
  "Integer",
@@ -7666,72 +7791,72 @@ var CanonicalDataTypeArmSchema = z116.object({
7666
7791
  "Literal",
7667
7792
  "DiscriminatedUnion"
7668
7793
  ]),
7669
- id: z116.string().describe("Data type field identifier"),
7670
- name: z116.string().describe("Human-readable name"),
7671
- required: z116.boolean().optional()
7672
- }).catchall(z116.unknown());
7673
- var LegacyDataTypeArmSchema = z116.object({
7674
- id: z116.string().describe("Data type field identifier"),
7675
- name: z116.string().describe("Human-readable name"),
7676
- type: z116.string(),
7677
- required: z116.boolean().optional(),
7678
- source: z116.string().optional(),
7679
- ref: z116.unknown().optional()
7680
- });
7681
- var DataAssemblyDataTypeFieldSchema = z116.union([
7794
+ id: z117.string().describe("Data type field identifier"),
7795
+ name: z117.string().describe("Human-readable name"),
7796
+ required: z117.boolean().optional()
7797
+ }).catchall(z117.unknown());
7798
+ var LegacyDataTypeArmSchema = z117.object({
7799
+ id: z117.string().describe("Data type field identifier"),
7800
+ name: z117.string().describe("Human-readable name"),
7801
+ type: z117.string(),
7802
+ required: z117.boolean().optional(),
7803
+ source: z117.string().optional(),
7804
+ ref: z117.unknown().optional()
7805
+ });
7806
+ var DataAssemblyDataTypeFieldSchema = z117.union([
7682
7807
  CanonicalDataTypeArmSchema,
7683
7808
  LegacyDataTypeArmSchema
7684
7809
  ]);
7685
7810
  var SAME_SPACE_CONTENT_SOURCE = "crn:contentful:::content:spaces/$self/environments/$self";
7686
- var DataAssemblyResourceLinkParameterSchema = z116.object({
7687
- name: z116.string().optional(),
7688
- description: z116.string().optional(),
7689
- type: z116.literal("ResourceLink"),
7690
- linkType: z116.literal("Contentful:Entry"),
7691
- allowedResources: z116.array(
7692
- z116.object({
7693
- type: z116.literal("Contentful:Entry"),
7694
- source: z116.literal(SAME_SPACE_CONTENT_SOURCE),
7695
- allowedTypes: z116.array(z116.string())
7811
+ var DataAssemblyResourceLinkParameterSchema = z117.object({
7812
+ name: z117.string().optional(),
7813
+ description: z117.string().optional(),
7814
+ type: z117.literal("ResourceLink"),
7815
+ linkType: z117.literal("Contentful:Entry"),
7816
+ allowedResources: z117.array(
7817
+ z117.object({
7818
+ type: z117.literal("Contentful:Entry"),
7819
+ source: z117.literal(SAME_SPACE_CONTENT_SOURCE),
7820
+ allowedTypes: z117.array(z117.string())
7696
7821
  })
7697
7822
  )
7698
7823
  });
7699
- var DataAssemblyParameterConfigSchema = z116.record(
7700
- z116.string(),
7824
+ var DataAssemblyParameterConfigSchema = z117.record(
7825
+ z117.string(),
7701
7826
  DataAssemblyResourceLinkParameterSchema
7702
7827
  );
7703
- var DataAssemblyGraphQLResolverSchema = z116.object({
7704
- source: z116.literal("Contentful:GraphQL"),
7705
- query: z116.string().describe("GraphQL query string"),
7828
+ var DataAssemblyGraphQLResolverSchema = z117.object({
7829
+ source: z117.literal("Contentful:GraphQL"),
7830
+ query: z117.string().describe("GraphQL query string"),
7706
7831
  parameters: PointerExpressionValueSchema.optional()
7707
7832
  });
7708
- var DataAssemblyNestedResolverSchema = z116.object({
7709
- source: z116.literal("Contentful:DataAssembly"),
7710
- dataAssembly: z116.object({
7711
- sys: z116.object({
7712
- type: z116.literal("ResourceLink"),
7713
- linkType: z116.literal("Contentful:DataAssembly"),
7714
- urn: z116.string()
7833
+ var DataAssemblyNestedResolverSchema = z117.object({
7834
+ source: z117.literal("Contentful:DataAssembly"),
7835
+ dataAssembly: z117.object({
7836
+ sys: z117.object({
7837
+ type: z117.literal("ResourceLink"),
7838
+ linkType: z117.literal("Contentful:DataAssembly"),
7839
+ urn: z117.string()
7715
7840
  })
7716
7841
  }),
7717
7842
  parameters: PointerExpressionValueSchema.optional()
7718
7843
  });
7719
- var DataAssemblyResolverDefinitionSchema = z116.union([
7844
+ var DataAssemblyResolverDefinitionSchema = z117.union([
7720
7845
  DataAssemblyGraphQLResolverSchema,
7721
7846
  DataAssemblyNestedResolverSchema
7722
7847
  ]);
7723
- var DataAssemblyResolverConfigSchema = z116.record(
7724
- z116.string(),
7848
+ var DataAssemblyResolverConfigSchema = z117.record(
7849
+ z117.string(),
7725
7850
  DataAssemblyResolverDefinitionSchema
7726
7851
  );
7727
7852
  var DataAssemblyReturnMappingConfigSchema = PointerExpressionValueSchema;
7728
- var DataAssemblyMetadataSchema = z116.object({
7729
- tags: z116.array(
7730
- z116.object({
7731
- sys: z116.object({
7732
- type: z116.literal("Link"),
7733
- linkType: z116.literal("Tag"),
7734
- id: z116.string()
7853
+ var DataAssemblyMetadataSchema = z117.object({
7854
+ tags: z117.array(
7855
+ z117.object({
7856
+ sys: z117.object({
7857
+ type: z117.literal("Link"),
7858
+ linkType: z117.literal("Tag"),
7859
+ id: z117.string()
7735
7860
  })
7736
7861
  })
7737
7862
  )
@@ -7739,8 +7864,8 @@ var DataAssemblyMetadataSchema = z116.object({
7739
7864
 
7740
7865
  // src/tools/exo/data-assemblies/createDataAssembly.ts
7741
7866
  var CreateDataAssemblyToolParams = BaseToolSchema.extend({
7742
- name: z117.string().describe("The name of the data assembly"),
7743
- description: z117.string().describe("Description of the data assembly"),
7867
+ name: z118.string().describe("The name of the data assembly"),
7868
+ description: z118.string().describe("Description of the data assembly"),
7744
7869
  parameters: DataAssemblyParameterConfigSchema.describe(
7745
7870
  "Parameter definitions keyed by parameter name (may be empty object)"
7746
7871
  ),
@@ -7750,8 +7875,8 @@ var CreateDataAssemblyToolParams = BaseToolSchema.extend({
7750
7875
  return: DataAssemblyReturnMappingConfigSchema.describe(
7751
7876
  "Return mapping configuration specifying how to map resolved data"
7752
7877
  ),
7753
- dataType: z117.array(DataAssemblyDataTypeFieldSchema).describe("Data type field definitions for this data assembly (may be empty array)"),
7754
- variant: z117.string().optional().describe("Optional variant identifier for this data assembly"),
7878
+ dataType: z118.array(DataAssemblyDataTypeFieldSchema).describe("Data type field definitions for this data assembly (may be empty array)"),
7879
+ variant: z118.string().optional().describe("Optional variant identifier for this data assembly"),
7755
7880
  metadata: DataAssemblyMetadataSchema.optional().describe("Optional metadata (tags)")
7756
7881
  });
7757
7882
  function createDataAssemblyTool(config) {
@@ -7760,7 +7885,7 @@ function createDataAssemblyTool(config) {
7760
7885
  args.environmentId,
7761
7886
  config.protectedEnvironments
7762
7887
  );
7763
- const contentfulClient = createToolClient(config, args);
7888
+ const contentfulClient = createExoToolClient(config, args);
7764
7889
  const dataAssembly = await contentfulClient.dataAssembly.create(
7765
7890
  { spaceId: args.spaceId, environmentId: args.environmentId },
7766
7891
  {
@@ -7785,14 +7910,14 @@ function createDataAssemblyTool(config) {
7785
7910
  }
7786
7911
 
7787
7912
  // src/tools/exo/data-assemblies/updateDataAssembly.ts
7788
- import { z as z118 } from "zod";
7913
+ import { z as z119 } from "zod";
7789
7914
  var UpdateDataAssemblyToolParams = BaseToolSchema.extend({
7790
- dataAssemblyId: z118.string().describe("The ID of the data assembly to update"),
7791
- version: z118.number().describe(
7915
+ dataAssemblyId: z119.string().describe("The ID of the data assembly to update"),
7916
+ version: z119.number().describe(
7792
7917
  "REQUIRED. The data assembly's sys.version as returned by get_data_assembly. You must call get_data_assembly first to read the current state and version. The update is rejected if this does not match the current version, which means the data assembly changed since you read it."
7793
7918
  ),
7794
- name: z118.string().optional().describe("The name of the data assembly"),
7795
- description: z118.string().optional().describe("Description of the data assembly"),
7919
+ name: z119.string().optional().describe("The name of the data assembly"),
7920
+ description: z119.string().optional().describe("Description of the data assembly"),
7796
7921
  parameters: DataAssemblyParameterConfigSchema.optional().describe(
7797
7922
  "Parameter definitions; replaces existing if provided"
7798
7923
  ),
@@ -7802,8 +7927,8 @@ var UpdateDataAssemblyToolParams = BaseToolSchema.extend({
7802
7927
  return: DataAssemblyReturnMappingConfigSchema.optional().describe(
7803
7928
  "Return mapping configuration; replaces existing if provided"
7804
7929
  ),
7805
- dataType: z118.array(DataAssemblyDataTypeFieldSchema).optional().describe("Data type field definitions; replaces existing if provided"),
7806
- variant: z118.string().optional().describe("Optional variant identifier; replaces existing if provided"),
7930
+ dataType: z119.array(DataAssemblyDataTypeFieldSchema).optional().describe("Data type field definitions; replaces existing if provided"),
7931
+ variant: z119.string().optional().describe("Optional variant identifier; replaces existing if provided"),
7807
7932
  metadata: DataAssemblyMetadataSchema.optional().describe(
7808
7933
  "Metadata (tags); replaces existing if provided"
7809
7934
  )
@@ -7819,7 +7944,7 @@ function updateDataAssemblyTool(config) {
7819
7944
  environmentId: args.environmentId,
7820
7945
  dataAssemblyId: args.dataAssemblyId
7821
7946
  };
7822
- const contentfulClient = createToolClient(config, args);
7947
+ const contentfulClient = createExoToolClient(config, args);
7823
7948
  const current = await contentfulClient.dataAssembly.get(params);
7824
7949
  if (args.version !== current.sys.version) {
7825
7950
  throw new Error(
@@ -7849,13 +7974,13 @@ function updateDataAssemblyTool(config) {
7849
7974
  }
7850
7975
 
7851
7976
  // src/tools/exo/data-assemblies/deleteDataAssembly.ts
7852
- import { z as z119 } from "zod";
7977
+ import { z as z120 } from "zod";
7853
7978
  var DeleteDataAssemblyToolParams = BaseToolSchema.extend({
7854
- dataAssemblyId: z119.string().describe("The ID of the data assembly to delete"),
7855
- confirm: z119.boolean().optional().describe(
7979
+ dataAssemblyId: z120.string().describe("The ID of the data assembly to delete"),
7980
+ confirm: z120.boolean().optional().describe(
7856
7981
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
7857
7982
  ),
7858
- confirmToken: z119.string().optional().describe(
7983
+ confirmToken: z120.string().optional().describe(
7859
7984
  "Token returned by the preview call; must be supplied with confirm: true."
7860
7985
  )
7861
7986
  });
@@ -7870,7 +7995,7 @@ function deleteDataAssemblyTool(config) {
7870
7995
  environmentId: args.environmentId,
7871
7996
  dataAssemblyId: args.dataAssemblyId
7872
7997
  };
7873
- const contentfulClient = createToolClient(config, args);
7998
+ const contentfulClient = createExoToolClient(config, args);
7874
7999
  const dataAssembly = await contentfulClient.dataAssembly.get(params);
7875
8000
  const expectedToken = buildConfirmToken(
7876
8001
  "dataAssembly",
@@ -7897,10 +8022,10 @@ function deleteDataAssemblyTool(config) {
7897
8022
  }
7898
8023
 
7899
8024
  // src/tools/exo/data-assemblies/publishDataAssembly.ts
7900
- import { z as z120 } from "zod";
8025
+ import { z as z121 } from "zod";
7901
8026
  var PublishDataAssemblyToolParams = BaseToolSchema.extend({
7902
- dataAssemblyId: z120.string().describe("The ID of the data assembly to publish"),
7903
- version: z120.number().describe(
8027
+ dataAssemblyId: z121.string().describe("The ID of the data assembly to publish"),
8028
+ version: z121.number().describe(
7904
8029
  "REQUIRED. The data assembly's sys.version as returned by get_data_assembly. You must call get_data_assembly first to read the current state and version. The publish is rejected if this does not match the current version, which means the data assembly changed since you read it."
7905
8030
  )
7906
8031
  });
@@ -7915,7 +8040,7 @@ function publishDataAssemblyTool(config) {
7915
8040
  environmentId: args.environmentId,
7916
8041
  dataAssemblyId: args.dataAssemblyId
7917
8042
  };
7918
- const contentfulClient = createToolClient(config, args);
8043
+ const contentfulClient = createExoToolClient(config, args);
7919
8044
  const current = await contentfulClient.dataAssembly.get(params);
7920
8045
  if (args.version !== current.sys.version) {
7921
8046
  throw new Error(
@@ -7934,10 +8059,10 @@ function publishDataAssemblyTool(config) {
7934
8059
  }
7935
8060
 
7936
8061
  // src/tools/exo/data-assemblies/unpublishDataAssembly.ts
7937
- import { z as z121 } from "zod";
8062
+ import { z as z122 } from "zod";
7938
8063
  var UnpublishDataAssemblyToolParams = BaseToolSchema.extend({
7939
- dataAssemblyId: z121.string().describe("The ID of the data assembly to unpublish"),
7940
- version: z121.number().describe(
8064
+ dataAssemblyId: z122.string().describe("The ID of the data assembly to unpublish"),
8065
+ version: z122.number().describe(
7941
8066
  "REQUIRED. The data assembly's sys.version as returned by get_data_assembly. You must call get_data_assembly first to read the current state and version. The unpublish is rejected if this does not match the current version, which means the data assembly changed since you read it."
7942
8067
  )
7943
8068
  });
@@ -7952,7 +8077,7 @@ function unpublishDataAssemblyTool(config) {
7952
8077
  environmentId: args.environmentId,
7953
8078
  dataAssemblyId: args.dataAssemblyId
7954
8079
  };
7955
- const contentfulClient = createToolClient(config, args);
8080
+ const contentfulClient = createExoToolClient(config, args);
7956
8081
  const current = await contentfulClient.dataAssembly.get(params);
7957
8082
  if (args.version !== current.sys.version) {
7958
8083
  throw new Error(
@@ -8197,6 +8322,12 @@ var ContentfulMcpTools = class {
8197
8322
  getTaxonomyTools() {
8198
8323
  return createTaxonomyTools(this.config);
8199
8324
  }
8325
+ /**
8326
+ * Get usage tools
8327
+ */
8328
+ getUsageTools() {
8329
+ return createUsageTools(this.config);
8330
+ }
8200
8331
  /**
8201
8332
  * Get ExO experience fragment tools
8202
8333
  */
@@ -8218,10 +8349,10 @@ var ContentfulMcpTools = class {
8218
8349
  };
8219
8350
 
8220
8351
  // src/utils/entitlements.ts
8221
- import { createClient as createClient16 } from "contentful-management";
8352
+ import { createClient as createClient17 } from "contentful-management";
8222
8353
  var EXO_M1_FEATURE = "exoM1";
8223
8354
  function createPlainClient(config) {
8224
- return createClient16(createClientConfig(config), { type: "plain" });
8355
+ return createClient17(createClientConfig(config), { type: "plain" });
8225
8356
  }
8226
8357
  async function orgHasExoM1(client, organizationId) {
8227
8358
  try {