@contentful/mcp-tools 0.12.7 → 0.12.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +291 -34
  2. package/dist/index.js +1679 -1060
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34,12 +34,52 @@ function createSuccessResponse(message, data) {
34
34
  ]
35
35
  };
36
36
  }
37
+ function isRecord(value) {
38
+ return typeof value === "object" && value !== null && !Array.isArray(value);
39
+ }
40
+ function formatErrorMessage(error) {
41
+ const message = error instanceof Error ? error.message : String(error);
42
+ if (!/^\s*[[{]/.test(message)) return message;
43
+ let data;
44
+ try {
45
+ data = JSON.parse(message);
46
+ } catch {
47
+ return "Request failed.";
48
+ }
49
+ if (!isRecord(data)) return "Request failed.";
50
+ const diagnostics = {};
51
+ if (error instanceof Error && error.name !== "Error" && /^[A-Za-z]\w*$/.test(error.name)) {
52
+ diagnostics["name"] = error.name;
53
+ }
54
+ if (typeof data["status"] === "number" && Number.isInteger(data["status"]) && data["status"] >= 100 && data["status"] <= 599) {
55
+ diagnostics["status"] = data["status"];
56
+ }
57
+ for (const key of ["statusText", "message", "requestId"]) {
58
+ if (typeof data[key] === "string" && !/^\s*[[{]/.test(data[key])) {
59
+ diagnostics[key] = data[key];
60
+ }
61
+ }
62
+ if (isRecord(data["details"]) && Array.isArray(data["details"]["errors"])) {
63
+ const errors = data["details"]["errors"].filter(isRecord).map((item) => {
64
+ const diagnostic = {};
65
+ if (typeof item["name"] === "string") diagnostic["name"] = item["name"];
66
+ if (Array.isArray(item["path"]) && item["path"].every(
67
+ (part) => typeof part === "string" || typeof part === "number"
68
+ )) {
69
+ diagnostic["path"] = item["path"];
70
+ }
71
+ return diagnostic;
72
+ }).filter((item) => Object.keys(item).length > 0);
73
+ if (errors.length > 0) diagnostics["details"] = { errors };
74
+ }
75
+ return Object.keys(diagnostics).length > 0 ? JSON.stringify(diagnostics, null, " ") : "Request failed.";
76
+ }
37
77
  function withErrorHandling(handler, errorPrefix = "Error") {
38
78
  return async (params, extra) => {
39
79
  try {
40
80
  return await handler(params, extra);
41
81
  } catch (error) {
42
- const errorMessage = error instanceof Error ? error.message : String(error);
82
+ const errorMessage = formatErrorMessage(error);
43
83
  return {
44
84
  isError: true,
45
85
  content: [
@@ -351,7 +391,8 @@ var RESOURCE_DISPLAY_NAME = {
351
391
  experience: "experience",
352
392
  experienceFragment: "experience fragment",
353
393
  experienceTemplate: "experience template",
354
- dataAssembly: "data assembly"
394
+ dataAssembly: "data assembly",
395
+ designToken: "design token"
355
396
  };
356
397
  function buildConfirmationPreview(resource, id, details, confirmToken) {
357
398
  const displayName = RESOURCE_DISPLAY_NAME[resource];
@@ -563,7 +604,7 @@ function publishAiActionTool(config) {
563
604
  });
564
605
  } catch (error) {
565
606
  return createSuccessResponse("AI action publish failed", {
566
- status: error,
607
+ status: formatErrorMessage(error),
567
608
  aiActionId: args.aiActionId
568
609
  });
569
610
  }
@@ -595,7 +636,7 @@ function unpublishAiActionTool(config) {
595
636
  });
596
637
  } catch (error) {
597
638
  return createSuccessResponse("AI action unpublish failed", {
598
- status: error,
639
+ status: formatErrorMessage(error),
599
640
  aiActionId: args.aiActionId
600
641
  });
601
642
  }
@@ -1285,7 +1326,7 @@ function publishAssetTool(config) {
1285
1326
  });
1286
1327
  } catch (error) {
1287
1328
  return createSuccessResponse("Asset publish failed", {
1288
- status: error,
1329
+ status: formatErrorMessage(error),
1289
1330
  assetId: assetIds[0]
1290
1331
  });
1291
1332
  }
@@ -1365,7 +1406,7 @@ function unpublishAssetTool(config) {
1365
1406
  });
1366
1407
  } catch (error) {
1367
1408
  return createSuccessResponse("Asset unpublish failed", {
1368
- status: error,
1409
+ status: formatErrorMessage(error),
1369
1410
  assetId: assetIds[0]
1370
1411
  });
1371
1412
  }
@@ -1437,7 +1478,7 @@ function archiveAssetTool(config) {
1437
1478
  await contentfulClient.asset.archive(params);
1438
1479
  successfullyArchived.push(assetId);
1439
1480
  } catch (error) {
1440
- const errorMessage = successfullyArchived.length > 0 ? `Failed to archive asset '${assetId}' after successfully archiving ${successfullyArchived.length} asset(s): [${successfullyArchived.join(", ")}]. Original error: ${error instanceof Error ? error.message : String(error)}` : `Failed to archive asset '${assetId}': ${error instanceof Error ? error.message : String(error)}`;
1481
+ const errorMessage = successfullyArchived.length > 0 ? `Failed to archive asset '${assetId}' after successfully archiving ${successfullyArchived.length} asset(s): [${successfullyArchived.join(", ")}]. Original error: ${formatErrorMessage(error)}` : `Failed to archive asset '${assetId}': ${formatErrorMessage(error)}`;
1441
1482
  throw new Error(errorMessage);
1442
1483
  }
1443
1484
  }
@@ -1503,7 +1544,7 @@ function unarchiveAssetTool(config) {
1503
1544
  await contentfulClient.asset.unarchive(params);
1504
1545
  successfullyUnarchived.push(assetId);
1505
1546
  } catch (error) {
1506
- const errorMessage = successfullyUnarchived.length > 0 ? `Failed to unarchive asset '${assetId}' after successfully unarchiving ${successfullyUnarchived.length} asset(s): [${successfullyUnarchived.join(", ")}]. Original error: ${error instanceof Error ? error.message : String(error)}` : `Failed to unarchive asset '${assetId}': ${error instanceof Error ? error.message : String(error)}`;
1547
+ const errorMessage = successfullyUnarchived.length > 0 ? `Failed to unarchive asset '${assetId}' after successfully unarchiving ${successfullyUnarchived.length} asset(s): [${successfullyUnarchived.join(", ")}]. Original error: ${formatErrorMessage(error)}` : `Failed to unarchive asset '${assetId}': ${formatErrorMessage(error)}`;
1507
1548
  throw new Error(errorMessage);
1508
1549
  }
1509
1550
  }
@@ -1645,10 +1686,341 @@ function createAssetTools(config) {
1645
1686
  };
1646
1687
  }
1647
1688
 
1648
- // src/tools/content-types/getContentType.ts
1689
+ // src/tools/content-previews/listContentPreviews.ts
1649
1690
  import { z as z23 } from "zod";
1691
+ import { createClient as createClient2 } from "contentful-management";
1692
+
1693
+ // src/tools/content-previews/types.ts
1694
+ function configurationContentTypeId(configuration) {
1695
+ if (configuration.entityType && configuration.entityType !== "ContentType") {
1696
+ return void 0;
1697
+ }
1698
+ return configuration.entityId ?? configuration.contentType ?? void 0;
1699
+ }
1700
+ function findEnabledConfiguration(previewEnvironment, contentTypeId) {
1701
+ return previewEnvironment.configurations.find(
1702
+ (configuration) => configuration.enabled && configurationContentTypeId(configuration) === contentTypeId
1703
+ );
1704
+ }
1705
+
1706
+ // src/tools/content-previews/client.ts
1707
+ function previewEnvironmentsPath(spaceId) {
1708
+ return `/spaces/${spaceId}/preview_environments`;
1709
+ }
1710
+
1711
+ // src/tools/content-previews/listContentPreviews.ts
1712
+ var ListContentPreviewsToolParams = z23.object({
1713
+ spaceId: z23.string().describe("The ID of the Contentful space"),
1714
+ contentTypeId: z23.string().optional().describe(
1715
+ "Only return previews that have an enabled configuration for this content type"
1716
+ ),
1717
+ limit: z23.number().optional().describe("Maximum number of content previews to return (default 100)"),
1718
+ skip: z23.number().optional().describe("Skip this many content previews for pagination")
1719
+ });
1720
+ function listContentPreviewsTool(config) {
1721
+ async function tool2(args) {
1722
+ const contentfulClient = createClient2(createClientConfig(config));
1723
+ const previews = await contentfulClient.raw.get(previewEnvironmentsPath(args.spaceId), {
1724
+ params: {
1725
+ limit: args.limit ?? 100,
1726
+ ...args.skip ? { skip: args.skip } : {}
1727
+ }
1728
+ });
1729
+ const summarized = previews.items.map((preview) => ({
1730
+ id: preview.sys.id,
1731
+ name: preview.name,
1732
+ description: preview.description ?? null,
1733
+ configurations: preview.configurations.filter(
1734
+ (configuration) => !args.contentTypeId || configuration.enabled && configurationContentTypeId(configuration) === args.contentTypeId
1735
+ ).map((configuration) => ({
1736
+ contentTypeId: configurationContentTypeId(configuration) ?? null,
1737
+ entityType: configuration.entityType ?? "ContentType",
1738
+ urlTemplate: configuration.url,
1739
+ enabled: configuration.enabled
1740
+ }))
1741
+ })).filter(
1742
+ (preview) => !args.contentTypeId || preview.configurations.length > 0
1743
+ );
1744
+ return createSuccessResponse("Content previews retrieved successfully", {
1745
+ contentPreviews: summarized,
1746
+ total: previews.total
1747
+ });
1748
+ }
1749
+ return withErrorHandling(tool2, "Error listing content previews");
1750
+ }
1751
+
1752
+ // src/tools/content-previews/getEntryPreviewUrl.ts
1753
+ import { z as z24 } from "zod";
1754
+
1755
+ // src/tools/content-previews/previewUrl.ts
1756
+ import { cloneDeep, get } from "lodash-es";
1757
+ var LOCALE_TOKEN = /{\s*locale\s*}/g;
1758
+ var TOKEN = /{(\s*([\S]+?)\s*)}/g;
1759
+ var PLACEHOLDER = /\{.*?\}/g;
1760
+ var LINKED_BY = /linkedBy/g;
1761
+ var NESTED_REFERENCE = /^entry\.fields\.\w+\.[a-zA-Z-]+\.(fields|sys)/;
1762
+ var NESTED_REFERENCE_PREFIX = /^entry\.fields\.\w+\.[a-zA-Z-]+\./;
1763
+ var SECOND_REFERENCE_HOP = /fields\.[a-zA-Z]+\.fields/;
1764
+ function addLocale(path, locale) {
1765
+ const fieldsIndex = path.indexOf("fields");
1766
+ if (fieldsIndex === -1) {
1767
+ return path;
1768
+ }
1769
+ const separatorIndex = path.indexOf(".", fieldsIndex + "fields".length + 1);
1770
+ if (separatorIndex === -1) {
1771
+ return path;
1772
+ }
1773
+ return `${path.slice(0, separatorIndex + 1)}${locale}.${path.slice(separatorIndex + 1)}`;
1774
+ }
1775
+ function countIncomingLinkHops(template) {
1776
+ const placeholders = template.match(PLACEHOLDER) ?? [];
1777
+ if (placeholders.length === 0) {
1778
+ return 0;
1779
+ }
1780
+ return Math.max(
1781
+ ...placeholders.map(
1782
+ (placeholder) => (placeholder.match(LINKED_BY) ?? []).length
1783
+ )
1784
+ );
1785
+ }
1786
+ function isEntryLink(value) {
1787
+ const sys = value?.sys;
1788
+ return sys?.type === "Link" && sys?.linkType === "Entry";
1789
+ }
1790
+ function asTokenValue(value) {
1791
+ if (typeof value === "string") {
1792
+ return value;
1793
+ }
1794
+ if (typeof value === "number" || typeof value === "boolean") {
1795
+ return String(value);
1796
+ }
1797
+ return void 0;
1798
+ }
1799
+ function unwrapValue(value, defaultLocaleCode) {
1800
+ if (value !== null && typeof value === "object") {
1801
+ return asTokenValue(value[defaultLocaleCode]);
1802
+ }
1803
+ return asTokenValue(value);
1804
+ }
1805
+ async function readContextPath(path, context, getEntry) {
1806
+ if (getEntry && NESTED_REFERENCE.test(path)) {
1807
+ const prefix = NESTED_REFERENCE_PREFIX.exec(path)?.[0];
1808
+ const referencePath = prefix?.slice(0, -1);
1809
+ if (referencePath) {
1810
+ const nestedPath = path.slice(referencePath.length + 1);
1811
+ if (SECOND_REFERENCE_HOP.test(nestedPath)) {
1812
+ return void 0;
1813
+ }
1814
+ const link = get(context, referencePath);
1815
+ if (isEntryLink(link)) {
1816
+ const nestedEntry = await getEntry(link.sys.id);
1817
+ return nestedEntry ? get(nestedEntry, nestedPath) : void 0;
1818
+ }
1819
+ }
1820
+ }
1821
+ return get(context, path);
1822
+ }
1823
+ async function attachIncomingLinks(entry, template, getIncomingLink) {
1824
+ const hops = countIncomingLinkHops(template);
1825
+ if (hops === 0 || !getIncomingLink) {
1826
+ return;
1827
+ }
1828
+ const seen = /* @__PURE__ */ new Map();
1829
+ let current = entry;
1830
+ for (let hop = 0; hop < hops; hop += 1) {
1831
+ const entryId = current.sys.id;
1832
+ if (!seen.has(entryId)) {
1833
+ seen.set(entryId, await getIncomingLink(entryId));
1834
+ }
1835
+ const linkedBy = seen.get(entryId);
1836
+ if (!linkedBy) {
1837
+ return;
1838
+ }
1839
+ current.linkedBy = cloneDeep(linkedBy);
1840
+ current = current.linkedBy;
1841
+ }
1842
+ }
1843
+ async function resolvePreviewUrl(options) {
1844
+ const {
1845
+ template,
1846
+ environmentId,
1847
+ defaultLocaleCode,
1848
+ currentLocaleCode,
1849
+ getEntry,
1850
+ getIncomingLink
1851
+ } = options;
1852
+ const entry = cloneDeep(options.entry);
1853
+ await attachIncomingLinks(entry, template, getIncomingLink);
1854
+ const context = {
1855
+ entry,
1856
+ env_id: environmentId,
1857
+ entry_id: entry.sys.id,
1858
+ entry_field: entry.fields
1859
+ };
1860
+ let url = template.replace(
1861
+ LOCALE_TOKEN,
1862
+ currentLocaleCode ?? defaultLocaleCode
1863
+ );
1864
+ const unresolvedTokens = [];
1865
+ for (const [token, rawPath] of [...url.matchAll(TOKEN)]) {
1866
+ const path = rawPath?.trim() || token;
1867
+ const raw = await readContextPath(
1868
+ addLocale(path, defaultLocaleCode),
1869
+ context,
1870
+ getEntry
1871
+ );
1872
+ const value = unwrapValue(raw, defaultLocaleCode);
1873
+ if (value === void 0) {
1874
+ if (!unresolvedTokens.includes(path)) {
1875
+ unresolvedTokens.push(path);
1876
+ }
1877
+ continue;
1878
+ }
1879
+ url = url.replace(token, () => value);
1880
+ }
1881
+ return { url, unresolvedTokens };
1882
+ }
1883
+
1884
+ // src/tools/content-previews/getEntryPreviewUrl.ts
1885
+ var GetEntryPreviewUrlToolParams = BaseToolSchema.extend({
1886
+ entryId: z24.string().describe("The ID of the entry to build a preview URL for"),
1887
+ previewId: z24.string().optional().describe(
1888
+ "ID of the content preview to use. Defaults to the first preview with an enabled configuration for the entry content type. Use list_content_previews to see the options."
1889
+ ),
1890
+ locale: z24.string().optional().describe(
1891
+ "Locale code substituted into the {locale} token. Defaults to the space default locale."
1892
+ )
1893
+ });
1894
+ function toEntryContext(entry) {
1895
+ return {
1896
+ sys: entry.sys,
1897
+ fields: entry.fields
1898
+ };
1899
+ }
1900
+ function getEntryPreviewUrlTool(config) {
1901
+ async function tool2(args) {
1902
+ const scope = {
1903
+ spaceId: args.spaceId,
1904
+ environmentId: args.environmentId
1905
+ };
1906
+ const contentfulClient = createToolClient(config, args);
1907
+ const entry = await contentfulClient.entry.get({
1908
+ ...scope,
1909
+ entryId: args.entryId
1910
+ });
1911
+ const contentTypeId = entry.sys.contentType?.sys.id;
1912
+ if (!contentTypeId) {
1913
+ throw new Error(
1914
+ `Entry "${args.entryId}" has no content type, so no preview configuration can be matched.`
1915
+ );
1916
+ }
1917
+ const previews = await contentfulClient.raw.get(previewEnvironmentsPath(args.spaceId), { params: { limit: 100 } });
1918
+ const candidates = previews.items.flatMap((preview2) => {
1919
+ const configuration2 = findEnabledConfiguration(preview2, contentTypeId);
1920
+ return configuration2 ? [{ preview: preview2, configuration: configuration2 }] : [];
1921
+ });
1922
+ if (candidates.length === 0) {
1923
+ throw new Error(
1924
+ `No content preview with an enabled configuration for content type "${contentTypeId}" exists in space "${args.spaceId}". Add one under Settings \u2192 Content Preview, or call list_content_previews to see what is configured.`
1925
+ );
1926
+ }
1927
+ const selected = args.previewId ? candidates.find(
1928
+ (candidate) => candidate.preview.sys.id === args.previewId
1929
+ ) : candidates[0];
1930
+ if (!selected) {
1931
+ throw new Error(
1932
+ `Content preview "${args.previewId}" has no enabled configuration for content type "${contentTypeId}". Available previews for this content type: ${candidates.map(({ preview: preview2 }) => `${preview2.name} (${preview2.sys.id})`).join(", ")}.`
1933
+ );
1934
+ }
1935
+ const { preview, configuration } = selected;
1936
+ const locales = await contentfulClient.locale.getMany({
1937
+ ...scope,
1938
+ query: { limit: 100 }
1939
+ });
1940
+ const defaultLocaleCode = locales.items.find((locale) => locale.default)?.code ?? locales.items[0]?.code;
1941
+ if (!defaultLocaleCode) {
1942
+ throw new Error(
1943
+ `No locales found for ${args.spaceId}/${args.environmentId}, so localized preview tokens cannot be resolved.`
1944
+ );
1945
+ }
1946
+ const { url, unresolvedTokens } = await resolvePreviewUrl({
1947
+ template: configuration.url,
1948
+ entry: toEntryContext(entry),
1949
+ environmentId: args.environmentId,
1950
+ defaultLocaleCode,
1951
+ currentLocaleCode: args.locale,
1952
+ getEntry: async (entryId) => {
1953
+ try {
1954
+ return toEntryContext(
1955
+ await contentfulClient.entry.get({ ...scope, entryId })
1956
+ );
1957
+ } catch {
1958
+ return void 0;
1959
+ }
1960
+ },
1961
+ getIncomingLink: async (entryId) => {
1962
+ try {
1963
+ const linking = await contentfulClient.entry.getMany({
1964
+ ...scope,
1965
+ query: { links_to_entry: entryId, limit: 1 }
1966
+ });
1967
+ const first = linking.items[0];
1968
+ return first ? toEntryContext(first) : void 0;
1969
+ } catch {
1970
+ return void 0;
1971
+ }
1972
+ }
1973
+ });
1974
+ return createSuccessResponse("Entry preview URL resolved successfully", {
1975
+ previewUrl: url,
1976
+ previewId: preview.sys.id,
1977
+ previewName: preview.name,
1978
+ contentTypeId,
1979
+ urlTemplate: configuration.url,
1980
+ locale: args.locale ?? defaultLocaleCode,
1981
+ ...unresolvedTokens.length > 0 ? {
1982
+ unresolvedTokens,
1983
+ warning: "The URL still contains the tokens listed above because no value could be resolved for them. Verify the link before sharing it."
1984
+ } : {}
1985
+ });
1986
+ }
1987
+ return withErrorHandling(tool2, "Error resolving entry preview URL");
1988
+ }
1989
+
1990
+ // src/tools/content-previews/register.ts
1991
+ function createContentPreviewTools(config) {
1992
+ const listContentPreviews = listContentPreviewsTool(config);
1993
+ const getEntryPreviewUrl = getEntryPreviewUrlTool(config);
1994
+ return {
1995
+ listContentPreviews: {
1996
+ title: "list_content_previews",
1997
+ description: "List the content previews (Settings \u2192 Content Preview) configured for a space, including the URL template for each content type. URL templates can contain secret tokens, so treat the output as sensitive.",
1998
+ inputParams: ListContentPreviewsToolParams.shape,
1999
+ annotations: {
2000
+ readOnlyHint: true,
2001
+ destructiveHint: false,
2002
+ openWorldHint: false
2003
+ },
2004
+ tool: listContentPreviews
2005
+ },
2006
+ getEntryPreviewUrl: {
2007
+ title: "get_entry_preview_url",
2008
+ description: "Resolve the draft-preview URL for an entry by substituting the entry's data into the content preview URL template configured for its content type. Returns the same link an editor would get from the Content Preview dropdown in the entry editor, plus any tokens that could not be resolved.",
2009
+ inputParams: GetEntryPreviewUrlToolParams.shape,
2010
+ annotations: {
2011
+ readOnlyHint: true,
2012
+ destructiveHint: false,
2013
+ openWorldHint: false
2014
+ },
2015
+ tool: getEntryPreviewUrl
2016
+ }
2017
+ };
2018
+ }
2019
+
2020
+ // src/tools/content-types/getContentType.ts
2021
+ import { z as z25 } from "zod";
1650
2022
  var GetContentTypeToolParams = BaseToolSchema.extend({
1651
- contentTypeId: z23.string().describe("The ID of the content type to retrieve details for")
2023
+ contentTypeId: z25.string().describe("The ID of the content type to retrieve details for")
1652
2024
  });
1653
2025
  function getContentTypeTool(config) {
1654
2026
  async function tool2(args) {
@@ -1669,13 +2041,13 @@ function getContentTypeTool(config) {
1669
2041
  }
1670
2042
 
1671
2043
  // src/tools/content-types/listContentTypes.ts
1672
- import { z as z24 } from "zod";
2044
+ import { z as z26 } from "zod";
1673
2045
  var ListContentTypesToolParams = BaseToolSchema.extend({
1674
- limit: z24.number().optional().describe("Maximum number of content types to return (max 10)"),
1675
- skip: z24.number().optional().describe("Skip this many content types for pagination"),
1676
- select: z24.string().optional().describe("Comma-separated list of fields to return"),
1677
- include: z24.number().optional().describe("Include this many levels of linked entries"),
1678
- order: z24.string().optional().describe("Order content types by this field")
2046
+ limit: z26.number().optional().describe("Maximum number of content types to return (max 10)"),
2047
+ skip: z26.number().optional().describe("Skip this many content types for pagination"),
2048
+ select: z26.string().optional().describe("Comma-separated list of fields to return"),
2049
+ include: z26.number().optional().describe("Include this many levels of linked entries"),
2050
+ order: z26.string().optional().describe("Order content types by this field")
1679
2051
  });
1680
2052
  function listContentTypesTool(config) {
1681
2053
  async function tool2(args) {
@@ -1720,74 +2092,74 @@ function listContentTypesTool(config) {
1720
2092
  }
1721
2093
 
1722
2094
  // src/tools/content-types/createContentType.ts
1723
- import { z as z27 } from "zod";
2095
+ import { z as z29 } from "zod";
1724
2096
 
1725
2097
  // src/types/fieldSchema.ts
1726
- import { z as z26 } from "zod";
2098
+ import { z as z28 } from "zod";
1727
2099
 
1728
2100
  // src/types/contentTypeFieldValidationSchema.ts
1729
- import { z as z25 } from "zod";
2101
+ import { z as z27 } from "zod";
1730
2102
  import { INLINES, BLOCKS } from "@contentful/rich-text-types";
1731
- var NumRange = z25.object({
1732
- min: z25.number().optional(),
1733
- max: z25.number().optional()
2103
+ var NumRange = z27.object({
2104
+ min: z27.number().optional(),
2105
+ max: z27.number().optional()
1734
2106
  });
1735
- var DateRange = z25.object({
1736
- min: z25.string().optional(),
1737
- max: z25.string().optional()
2107
+ var DateRange = z27.object({
2108
+ min: z27.string().optional(),
2109
+ max: z27.string().optional()
1738
2110
  });
1739
- var RegExpSchema = z25.object({
1740
- pattern: z25.string(),
1741
- flags: z25.string()
2111
+ var RegExpSchema = z27.object({
2112
+ pattern: z27.string(),
2113
+ flags: z27.string()
1742
2114
  });
1743
- var AssetImageDimensions = z25.object({
2115
+ var AssetImageDimensions = z27.object({
1744
2116
  width: NumRange.optional(),
1745
2117
  height: NumRange.optional()
1746
2118
  });
1747
- var ExternalResource = z25.object({
1748
- type: z25.string()
2119
+ var ExternalResource = z27.object({
2120
+ type: z27.string()
1749
2121
  });
1750
- var ContentfulEntryResource = z25.object({
1751
- type: z25.literal("Contentful:Entry"),
1752
- source: z25.string(),
1753
- contentTypes: z25.array(z25.string())
2122
+ var ContentfulEntryResource = z27.object({
2123
+ type: z27.literal("Contentful:Entry"),
2124
+ source: z27.string(),
2125
+ contentTypes: z27.array(z27.string())
1754
2126
  });
1755
- var ContentTypeAllowedResources = z25.union([
2127
+ var ContentTypeAllowedResources = z27.union([
1756
2128
  ContentfulEntryResource,
1757
2129
  ExternalResource
1758
2130
  ]);
1759
- var NodesValidation = z25.record(
1760
- z25.array(
1761
- z25.object({
2131
+ var NodesValidation = z27.record(
2132
+ z27.array(
2133
+ z27.object({
1762
2134
  // subset of ContentTypeFieldValidation used for node validations
1763
2135
  size: NumRange.optional(),
1764
- linkContentType: z25.array(z25.string()).optional(),
1765
- message: z25.string().nullable().optional()
2136
+ linkContentType: z27.array(z27.string()).optional(),
2137
+ message: z27.string().nullable().optional()
1766
2138
  })
1767
2139
  ).or(
1768
- z25.object({
1769
- validations: z25.array(
1770
- z25.object({
2140
+ z27.object({
2141
+ validations: z27.array(
2142
+ z27.object({
1771
2143
  size: NumRange.optional(),
1772
- message: z25.string().nullable().optional()
2144
+ message: z27.string().nullable().optional()
1773
2145
  })
1774
2146
  ),
1775
- allowedResources: z25.array(ContentTypeAllowedResources)
2147
+ allowedResources: z27.array(ContentTypeAllowedResources)
1776
2148
  })
1777
2149
  )
1778
2150
  );
1779
- var ContentTypeFieldValidationSchema = z25.object({
1780
- linkContentType: z25.array(z25.string()).optional(),
1781
- in: z25.array(z25.union([z25.string(), z25.number()])).optional(),
1782
- linkMimetypeGroup: z25.array(z25.string()).optional(),
1783
- enabledNodeTypes: z25.array(z25.union([z25.nativeEnum(BLOCKS), z25.nativeEnum(INLINES)])).optional(),
1784
- enabledMarks: z25.array(z25.string()).optional(),
1785
- unique: z25.boolean().optional(),
2151
+ var ContentTypeFieldValidationSchema = z27.object({
2152
+ linkContentType: z27.array(z27.string()).optional(),
2153
+ in: z27.array(z27.union([z27.string(), z27.number()])).optional(),
2154
+ linkMimetypeGroup: z27.array(z27.string()).optional(),
2155
+ enabledNodeTypes: z27.array(z27.union([z27.nativeEnum(BLOCKS), z27.nativeEnum(INLINES)])).optional(),
2156
+ enabledMarks: z27.array(z27.string()).optional(),
2157
+ unique: z27.boolean().optional(),
1786
2158
  size: NumRange.optional(),
1787
2159
  range: NumRange.optional(),
1788
2160
  dateRange: DateRange.optional(),
1789
2161
  regexp: RegExpSchema.optional(),
1790
- message: z25.string().nullable().optional(),
2162
+ message: z27.string().nullable().optional(),
1791
2163
  prohibitRegexp: RegExpSchema.optional(),
1792
2164
  assetImageDimensions: AssetImageDimensions.optional(),
1793
2165
  assetFileSize: NumRange.optional(),
@@ -1795,36 +2167,36 @@ var ContentTypeFieldValidationSchema = z25.object({
1795
2167
  });
1796
2168
 
1797
2169
  // src/types/fieldSchema.ts
1798
- var FieldSchema = z26.object({
1799
- id: z26.string().describe("The field ID"),
1800
- name: z26.string().describe("The field name"),
1801
- type: z26.string().describe(
2170
+ var FieldSchema = z28.object({
2171
+ id: z28.string().describe("The field ID"),
2172
+ name: z28.string().describe("The field name"),
2173
+ type: z28.string().describe(
1802
2174
  'The field type (e.g., "Symbol", "Text", "Integer", "Boolean", "Date", "Location", "Link", "Array", "Object")'
1803
2175
  ),
1804
- required: z26.boolean().describe("Whether the field is required"),
1805
- localized: z26.boolean().describe("Whether the field is localized"),
1806
- disabled: z26.boolean().optional().describe("Whether the field is disabled"),
1807
- omitted: z26.boolean().optional().describe("Whether the field is omitted from the API response"),
1808
- validations: z26.array(ContentTypeFieldValidationSchema).optional().describe("Field validations"),
1809
- settings: z26.record(z26.any()).optional().describe("Field-specific settings"),
1810
- defaultValue: z26.any().optional().describe("Default value for the field"),
1811
- linkType: z26.string().optional().describe('Link type for Link fields (e.g., "Entry", "Asset")'),
1812
- items: z26.object({
1813
- type: z26.string(),
1814
- linkType: z26.string().optional(),
1815
- validations: z26.array(ContentTypeFieldValidationSchema).optional()
2176
+ required: z28.boolean().describe("Whether the field is required"),
2177
+ localized: z28.boolean().describe("Whether the field is localized"),
2178
+ disabled: z28.boolean().optional().describe("Whether the field is disabled"),
2179
+ omitted: z28.boolean().optional().describe("Whether the field is omitted from the API response"),
2180
+ validations: z28.array(ContentTypeFieldValidationSchema).optional().describe("Field validations"),
2181
+ settings: z28.record(z28.any()).optional().describe("Field-specific settings"),
2182
+ defaultValue: z28.any().optional().describe("Default value for the field"),
2183
+ linkType: z28.string().optional().describe('Link type for Link fields (e.g., "Entry", "Asset")'),
2184
+ items: z28.object({
2185
+ type: z28.string(),
2186
+ linkType: z28.string().optional(),
2187
+ validations: z28.array(ContentTypeFieldValidationSchema).optional()
1816
2188
  }).optional().describe("Items configuration for Array fields")
1817
2189
  });
1818
2190
 
1819
2191
  // src/tools/content-types/createContentType.ts
1820
2192
  var CreateContentTypeToolParams = BaseToolSchema.extend({
1821
- name: z27.string().describe("The name of the content type"),
1822
- displayField: z27.string().describe("The field ID to use as the display field"),
1823
- description: z27.string().optional().describe("Description of the content type"),
1824
- contentTypeId: z27.string().optional().describe(
2193
+ name: z29.string().describe("The name of the content type"),
2194
+ displayField: z29.string().describe("The field ID to use as the display field"),
2195
+ description: z29.string().optional().describe("Description of the content type"),
2196
+ contentTypeId: z29.string().optional().describe(
1825
2197
  "Optional ID for the content type. If provided, will use createWithId method"
1826
2198
  ),
1827
- fields: z27.array(FieldSchema).describe("Array of field definitions for the content type"),
2199
+ fields: z29.array(FieldSchema).describe("Array of field definitions for the content type"),
1828
2200
  metadata: ContentTypeMetadataSchema
1829
2201
  });
1830
2202
  function createContentTypeTool(config) {
@@ -1857,13 +2229,13 @@ function createContentTypeTool(config) {
1857
2229
  }
1858
2230
 
1859
2231
  // src/tools/content-types/updateContentType.ts
1860
- import { z as z28 } from "zod";
2232
+ import { z as z30 } from "zod";
1861
2233
  var UpdateContentTypeToolParams = BaseToolSchema.extend({
1862
- contentTypeId: z28.string().describe("The ID of the content type to update"),
1863
- name: z28.string().optional().describe("The name of the content type"),
1864
- displayField: z28.string().optional().describe("The field ID to use as the display field"),
1865
- description: z28.string().optional().describe("Description of the content type"),
1866
- fields: z28.array(FieldSchema).optional().describe(
2234
+ contentTypeId: z30.string().describe("The ID of the content type to update"),
2235
+ name: z30.string().optional().describe("The name of the content type"),
2236
+ displayField: z30.string().optional().describe("The field ID to use as the display field"),
2237
+ description: z30.string().optional().describe("Description of the content type"),
2238
+ fields: z30.array(FieldSchema).optional().describe(
1867
2239
  "Array of field definitions for the content type. Will be merged with existing fields."
1868
2240
  ),
1869
2241
  metadata: ContentTypeMetadataSchema
@@ -1922,13 +2294,13 @@ function updateContentTypeTool(config) {
1922
2294
  }
1923
2295
 
1924
2296
  // src/tools/content-types/deleteContentType.ts
1925
- import { z as z29 } from "zod";
2297
+ import { z as z31 } from "zod";
1926
2298
  var DeleteContentTypeToolParams = BaseToolSchema.extend({
1927
- contentTypeId: z29.string().describe("The ID of the content type to delete"),
1928
- confirm: z29.boolean().optional().describe(
2299
+ contentTypeId: z31.string().describe("The ID of the content type to delete"),
2300
+ confirm: z31.boolean().optional().describe(
1929
2301
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
1930
2302
  ),
1931
- confirmToken: z29.string().optional().describe(
2303
+ confirmToken: z31.string().optional().describe(
1932
2304
  "Token returned by the preview call; must be supplied with confirm: true."
1933
2305
  )
1934
2306
  });
@@ -1970,9 +2342,9 @@ function deleteContentTypeTool(config) {
1970
2342
  }
1971
2343
 
1972
2344
  // src/tools/content-types/publishContentType.ts
1973
- import { z as z30 } from "zod";
2345
+ import { z as z32 } from "zod";
1974
2346
  var PublishContentTypeToolParams = BaseToolSchema.extend({
1975
- contentTypeId: z30.string().describe("The ID of the content type to publish")
2347
+ contentTypeId: z32.string().describe("The ID of the content type to publish")
1976
2348
  });
1977
2349
  function publishContentTypeTool(config) {
1978
2350
  async function tool2(args) {
@@ -1999,9 +2371,9 @@ function publishContentTypeTool(config) {
1999
2371
  }
2000
2372
 
2001
2373
  // src/tools/content-types/unpublishContentType.ts
2002
- import { z as z31 } from "zod";
2374
+ import { z as z33 } from "zod";
2003
2375
  var UnpublishContentTypeToolParams = BaseToolSchema.extend({
2004
- contentTypeId: z31.string().describe("The ID of the content type to unpublish")
2376
+ contentTypeId: z33.string().describe("The ID of the content type to unpublish")
2005
2377
  });
2006
2378
  function unpublishContentTypeTool(config) {
2007
2379
  async function tool2(args) {
@@ -2024,11 +2396,11 @@ function unpublishContentTypeTool(config) {
2024
2396
  }
2025
2397
 
2026
2398
  // src/tools/content-types/omitContentTypeField.ts
2027
- import { z as z32 } from "zod";
2399
+ import { z as z34 } from "zod";
2028
2400
  var OmitContentTypeFieldToolParams = BaseToolSchema.extend({
2029
- contentTypeId: z32.string().describe("The ID of the content type containing the field"),
2030
- fieldId: z32.string().describe("The ID of the field to omit"),
2031
- omitted: z32.boolean().default(true).describe(
2401
+ contentTypeId: z34.string().describe("The ID of the content type containing the field"),
2402
+ fieldId: z34.string().describe("The ID of the field to omit"),
2403
+ omitted: z34.boolean().default(true).describe(
2032
2404
  "Whether the field should be omitted. Defaults to true. Set to false to un-omit a field."
2033
2405
  )
2034
2406
  });
@@ -2063,10 +2435,10 @@ function omitContentTypeFieldTool(config) {
2063
2435
  }
2064
2436
 
2065
2437
  // src/tools/content-types/deleteContentTypeField.ts
2066
- import { z as z33 } from "zod";
2438
+ import { z as z35 } from "zod";
2067
2439
  var DeleteContentTypeFieldToolParams = BaseToolSchema.extend({
2068
- contentTypeId: z33.string().describe("The ID of the content type containing the field"),
2069
- fieldId: z33.string().describe("The ID of the field to delete")
2440
+ contentTypeId: z35.string().describe("The ID of the content type containing the field"),
2441
+ fieldId: z35.string().describe("The ID of the field to delete")
2070
2442
  });
2071
2443
  function deleteContentTypeFieldTool(config) {
2072
2444
  async function tool2(args) {
@@ -2109,14 +2481,14 @@ function deleteContentTypeFieldTool(config) {
2109
2481
  }
2110
2482
 
2111
2483
  // src/tools/content-types/disableContentTypeField.ts
2112
- import { z as z34 } from "zod";
2484
+ import { z as z36 } from "zod";
2113
2485
  var DisableContentTypeFieldToolParams = BaseToolSchema.extend({
2114
- contentTypeId: z34.string().describe("The ID of the content type containing the field"),
2115
- fieldId: z34.string().describe("The ID of the field to update"),
2116
- disabled: z34.boolean().optional().describe(
2486
+ contentTypeId: z36.string().describe("The ID of the content type containing the field"),
2487
+ fieldId: z36.string().describe("The ID of the field to update"),
2488
+ disabled: z36.boolean().optional().describe(
2117
2489
  "Set to true to disable the field in the editor UI (editors cannot edit it), false to re-enable. Takes effect once the content type is published."
2118
2490
  ),
2119
- omitted: z34.boolean().optional().describe(
2491
+ omitted: z36.boolean().optional().describe(
2120
2492
  "Set to true to omit the field from API responses, false to include it again. Takes effect once the content type is published. Prefer omit_content_type_field when only changing the omitted flag."
2121
2493
  )
2122
2494
  });
@@ -2298,7 +2670,7 @@ function createContentTypeTools(config) {
2298
2670
  }
2299
2671
 
2300
2672
  // src/tools/context/getInitialContextTool.ts
2301
- import { z as z35 } from "zod";
2673
+ import { z as z37 } from "zod";
2302
2674
  import { outdent } from "outdent";
2303
2675
 
2304
2676
  // src/tools/context/store.ts
@@ -2343,7 +2715,7 @@ var EXO_DISPOSITION = `# Tool disposition: Experience Orchestration by default
2343
2715
  Experience Orchestration (ExO) tools are enabled. Use ExO primitives \u2014 Components, Experiences, Experience Templates, Experience Fragments, and Data Assemblies \u2014 for all content modeling and authoring. Do not create classic content types or entries unless the user explicitly instructs you to. If you are unsure how to model something with ExO, inspect the tool schemas and proceed with ExO.`;
2344
2716
 
2345
2717
  // src/tools/context/getInitialContextTool.ts
2346
- var GetInitialContextToolParams = z35.object({});
2718
+ var GetInitialContextToolParams = z37.object({});
2347
2719
  function getInitialContextTool(config) {
2348
2720
  async function tool2(_params) {
2349
2721
  const today = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
@@ -2443,9 +2815,9 @@ function listEditorInterfacesTool(config) {
2443
2815
  }
2444
2816
 
2445
2817
  // src/tools/editor-interfaces/getEditorInterface.ts
2446
- import { z as z36 } from "zod";
2818
+ import { z as z38 } from "zod";
2447
2819
  var GetEditorInterfaceToolParams = BaseToolSchema.extend({
2448
- contentTypeId: z36.string().describe(
2820
+ contentTypeId: z38.string().describe(
2449
2821
  "The ID of the content type to retrieve the editor interface for"
2450
2822
  )
2451
2823
  });
@@ -2466,42 +2838,42 @@ function getEditorInterfaceTool(config) {
2466
2838
  }
2467
2839
 
2468
2840
  // src/tools/editor-interfaces/updateEditorInterface.ts
2469
- import { z as z37 } from "zod";
2470
- var ControlSchema = z37.object({
2471
- fieldId: z37.string().describe("The field ID this control applies to"),
2472
- widgetId: z37.string().describe("The widget ID to use for this field"),
2473
- widgetNamespace: z37.enum(["builtin", "extension", "app", "editor-builtin"]).optional().describe(
2841
+ import { z as z39 } from "zod";
2842
+ var ControlSchema = z39.object({
2843
+ fieldId: z39.string().describe("The field ID this control applies to"),
2844
+ widgetId: z39.string().describe("The widget ID to use for this field"),
2845
+ widgetNamespace: z39.enum(["builtin", "extension", "app", "editor-builtin"]).optional().describe(
2474
2846
  "The namespace of the widget (builtin, extension, app, or editor-builtin)"
2475
2847
  ),
2476
- settings: z37.record(z37.any()).optional().describe("Settings object for the widget")
2848
+ settings: z39.record(z39.any()).optional().describe("Settings object for the widget")
2477
2849
  });
2478
- var SidebarItemSchema = z37.object({
2479
- widgetId: z37.string().describe("The widget ID for the sidebar item"),
2480
- widgetNamespace: z37.enum(["sidebar-builtin", "extension", "app"]).describe("The namespace of the sidebar widget"),
2481
- settings: z37.record(z37.any()).optional().describe("Settings object for the sidebar widget"),
2482
- disabled: z37.boolean().optional().describe("Whether the sidebar item is disabled")
2850
+ var SidebarItemSchema = z39.object({
2851
+ widgetId: z39.string().describe("The widget ID for the sidebar item"),
2852
+ widgetNamespace: z39.enum(["sidebar-builtin", "extension", "app"]).describe("The namespace of the sidebar widget"),
2853
+ settings: z39.record(z39.any()).optional().describe("Settings object for the sidebar widget"),
2854
+ disabled: z39.boolean().optional().describe("Whether the sidebar item is disabled")
2483
2855
  });
2484
- var EditorLayoutItemSchema = z37.object({
2485
- fieldId: z37.string().describe("The field ID"),
2486
- settings: z37.record(z37.any()).optional().describe("Layout settings for the field")
2856
+ var EditorLayoutItemSchema = z39.object({
2857
+ fieldId: z39.string().describe("The field ID"),
2858
+ settings: z39.record(z39.any()).optional().describe("Layout settings for the field")
2487
2859
  });
2488
- var EditorLayoutSchema = z37.object({
2489
- items: z37.array(EditorLayoutItemSchema).optional().describe("Array of editor layout items")
2860
+ var EditorLayoutSchema = z39.object({
2861
+ items: z39.array(EditorLayoutItemSchema).optional().describe("Array of editor layout items")
2490
2862
  });
2491
- var GroupControlSchema = z37.object({
2492
- groupId: z37.string().describe("The group ID"),
2493
- widgetId: z37.string().describe("The widget ID for the group control"),
2494
- widgetNamespace: z37.enum(["builtin", "extension", "app"]).optional().describe("The namespace of the group control widget"),
2495
- settings: z37.record(z37.any()).optional().describe("Settings object for the group control")
2863
+ var GroupControlSchema = z39.object({
2864
+ groupId: z39.string().describe("The group ID"),
2865
+ widgetId: z39.string().describe("The widget ID for the group control"),
2866
+ widgetNamespace: z39.enum(["builtin", "extension", "app"]).optional().describe("The namespace of the group control widget"),
2867
+ settings: z39.record(z39.any()).optional().describe("Settings object for the group control")
2496
2868
  });
2497
2869
  var UpdateEditorInterfaceToolParams = BaseToolSchema.extend({
2498
- contentTypeId: z37.string().describe("The ID of the content type to update the editor interface for"),
2499
- controls: z37.array(ControlSchema).optional().describe(
2870
+ contentTypeId: z39.string().describe("The ID of the content type to update the editor interface for"),
2871
+ controls: z39.array(ControlSchema).optional().describe(
2500
2872
  "Array of control definitions for fields in the content type. Each control defines which widget to use for a field."
2501
2873
  ),
2502
- sidebar: z37.array(SidebarItemSchema).optional().describe("Array of sidebar widget configurations"),
2503
- editorLayout: z37.array(EditorLayoutSchema).optional().describe("Editor layout configuration for organizing fields"),
2504
- groupControls: z37.array(GroupControlSchema).optional().describe("Array of group control definitions for field groups")
2874
+ sidebar: z39.array(SidebarItemSchema).optional().describe("Array of sidebar widget configurations"),
2875
+ editorLayout: z39.array(EditorLayoutSchema).optional().describe("Editor layout configuration for organizing fields"),
2876
+ groupControls: z39.array(GroupControlSchema).optional().describe("Array of group control definitions for field groups")
2505
2877
  });
2506
2878
  function updateEditorInterfaceTool(config) {
2507
2879
  async function tool2(args) {
@@ -2586,7 +2958,7 @@ function createEditorInterfaceTools(config) {
2586
2958
  }
2587
2959
 
2588
2960
  // src/tools/entries/searchEntries.ts
2589
- import { z as z38 } from "zod";
2961
+ import { z as z40 } from "zod";
2590
2962
 
2591
2963
  // src/utils/limits.ts
2592
2964
  function searchLimit(userLimit) {
@@ -2609,38 +2981,38 @@ function normalizeArrayFilters(query) {
2609
2981
 
2610
2982
  // src/tools/entries/searchEntries.ts
2611
2983
  var SearchEntriesToolParams = BaseToolSchema.extend({
2612
- query: z38.object({
2984
+ query: z40.object({
2613
2985
  // Core parameters (maintain backward compatibility)
2614
- content_type: z38.string().optional().describe("Filter by content type"),
2615
- include: z38.number().optional().describe("Include this many levels of linked entries"),
2616
- select: z38.string().optional().describe("Comma-separated list of fields to return"),
2617
- links_to_entry: z38.string().optional().describe("Find entries that link to the specified entry ID"),
2618
- limit: z38.number().optional().describe(
2986
+ content_type: z40.string().optional().describe("Filter by content type"),
2987
+ include: z40.number().optional().describe("Include this many levels of linked entries"),
2988
+ select: z40.string().optional().describe("Comma-separated list of fields to return"),
2989
+ links_to_entry: z40.string().optional().describe("Find entries that link to the specified entry ID"),
2990
+ limit: z40.number().optional().describe(
2619
2991
  "Maximum number of entries to return (default: 10, max: 100)"
2620
2992
  ),
2621
- skip: z38.number().optional().describe("Skip this many entries for pagination"),
2622
- order: z38.string().optional().describe("Order entries by this field"),
2993
+ skip: z40.number().optional().describe("Skip this many entries for pagination"),
2994
+ order: z40.string().optional().describe("Order entries by this field"),
2623
2995
  // Full-text search
2624
- query: z38.string().optional().describe("Full-text search across all fields"),
2996
+ query: z40.string().optional().describe("Full-text search across all fields"),
2625
2997
  // Common field-based searches (examples - any field is supported via catchall)
2626
- "fields.title": z38.string().optional().describe("Search by title field"),
2627
- "fields.slug": z38.string().optional().describe("Search by slug field"),
2628
- "fields.internalName": z38.string().optional().describe("Search by internal name field"),
2629
- "fields.text": z38.string().optional().describe("Search by text field (useful for testimonials)"),
2630
- "fields.title[match]": z38.string().optional().describe("Pattern match on title field"),
2631
- "fields.slug[match]": z38.string().optional().describe("Pattern match on slug field"),
2632
- "fields.title[exists]": z38.boolean().optional().describe("Check if title field exists"),
2633
- "fields.slug[exists]": z38.boolean().optional().describe("Check if slug field exists"),
2998
+ "fields.title": z40.string().optional().describe("Search by title field"),
2999
+ "fields.slug": z40.string().optional().describe("Search by slug field"),
3000
+ "fields.internalName": z40.string().optional().describe("Search by internal name field"),
3001
+ "fields.text": z40.string().optional().describe("Search by text field (useful for testimonials)"),
3002
+ "fields.title[match]": z40.string().optional().describe("Pattern match on title field"),
3003
+ "fields.slug[match]": z40.string().optional().describe("Pattern match on slug field"),
3004
+ "fields.title[exists]": z40.boolean().optional().describe("Check if title field exists"),
3005
+ "fields.slug[exists]": z40.boolean().optional().describe("Check if slug field exists"),
2634
3006
  // System field searches
2635
- "sys.id[in]": z38.array(z38.string()).optional().describe("Search by multiple entry IDs"),
2636
- "sys.contentType.sys.id": z38.string().optional().describe("Filter by content type ID"),
2637
- "sys.createdAt[gte]": z38.string().optional().describe("Created after date (ISO format)"),
2638
- "sys.createdAt[lte]": z38.string().optional().describe("Created before date (ISO format)"),
2639
- "sys.updatedAt[gte]": z38.string().optional().describe("Updated after date (ISO format)"),
2640
- "sys.updatedAt[lte]": z38.string().optional().describe("Updated before date (ISO format)"),
3007
+ "sys.id[in]": z40.array(z40.string()).optional().describe("Search by multiple entry IDs"),
3008
+ "sys.contentType.sys.id": z40.string().optional().describe("Filter by content type ID"),
3009
+ "sys.createdAt[gte]": z40.string().optional().describe("Created after date (ISO format)"),
3010
+ "sys.createdAt[lte]": z40.string().optional().describe("Created before date (ISO format)"),
3011
+ "sys.updatedAt[gte]": z40.string().optional().describe("Updated after date (ISO format)"),
3012
+ "sys.updatedAt[lte]": z40.string().optional().describe("Updated before date (ISO format)"),
2641
3013
  // Metadata searches
2642
- "metadata.tags.sys.id[in]": z38.array(z38.string()).optional().describe("Filter by tag IDs")
2643
- }).catchall(z38.any()).describe(
3014
+ "metadata.tags.sys.id[in]": z40.array(z40.string()).optional().describe("Filter by tag IDs")
3015
+ }).catchall(z40.any()).describe(
2644
3016
  "Flexible search parameters supporting ANY Contentful API query parameter. Use fields.* for field searches, sys.* for system fields, and any other Contentful API parameter."
2645
3017
  )
2646
3018
  });
@@ -2671,12 +3043,12 @@ function searchEntriesTool(config) {
2671
3043
  }
2672
3044
 
2673
3045
  // src/tools/entries/semanticSearch.ts
2674
- import { z as z39 } from "zod";
3046
+ import { z as z41 } from "zod";
2675
3047
  var SemanticSearchToolParams = BaseToolSchema.extend({
2676
- query: z39.string().describe(
3048
+ query: z41.string().describe(
2677
3049
  "Natural-language description of what you are looking for. Phrases that resemble the content of the entries you want match best \u2014 avoid questions or JSON."
2678
3050
  ),
2679
- contentTypeIds: z39.array(z39.string()).min(1).optional().describe("Restrict the search to entries of these content type IDs")
3051
+ contentTypeIds: z41.array(z41.string()).min(1).optional().describe("Restrict the search to entries of these content type IDs")
2680
3052
  });
2681
3053
  function semanticSearchTool(config) {
2682
3054
  async function tool2(args) {
@@ -2707,110 +3079,110 @@ function semanticSearchTool(config) {
2707
3079
  }
2708
3080
 
2709
3081
  // src/tools/entries/createEntry.ts
2710
- import { z as z42 } from "zod";
3082
+ import { z as z44 } from "zod";
2711
3083
 
2712
3084
  // src/types/entryFieldSchema.ts
2713
- import { z as z41 } from "zod";
3085
+ import { z as z43 } from "zod";
2714
3086
 
2715
3087
  // src/types/richTextSchema.ts
2716
3088
  import { BLOCKS as BLOCKS2, INLINES as INLINES2, MARKS } from "@contentful/rich-text-types";
2717
- import { z as z40 } from "zod";
2718
- var emptyNodeDataSchema = z40.object({});
2719
- var entryLinkTargetSchema = z40.object({
2720
- sys: z40.object({
2721
- id: z40.string(),
2722
- type: z40.literal("Link"),
2723
- linkType: z40.literal("Entry")
3089
+ import { z as z42 } from "zod";
3090
+ var emptyNodeDataSchema = z42.object({});
3091
+ var entryLinkTargetSchema = z42.object({
3092
+ sys: z42.object({
3093
+ id: z42.string(),
3094
+ type: z42.literal("Link"),
3095
+ linkType: z42.literal("Entry")
2724
3096
  })
2725
3097
  });
2726
- var assetLinkTargetSchema = z40.object({
2727
- sys: z40.object({
2728
- id: z40.string(),
2729
- type: z40.literal("Link"),
2730
- linkType: z40.literal("Asset")
3098
+ var assetLinkTargetSchema = z42.object({
3099
+ sys: z42.object({
3100
+ id: z42.string(),
3101
+ type: z42.literal("Link"),
3102
+ linkType: z42.literal("Asset")
2731
3103
  })
2732
3104
  });
2733
- var resourceLinkTargetSchema = z40.object({
2734
- sys: z40.object({
2735
- type: z40.literal("ResourceLink"),
2736
- linkType: z40.string(),
2737
- urn: z40.string()
3105
+ var resourceLinkTargetSchema = z42.object({
3106
+ sys: z42.object({
3107
+ type: z42.literal("ResourceLink"),
3108
+ linkType: z42.string(),
3109
+ urn: z42.string()
2738
3110
  })
2739
3111
  });
2740
- var richTextMarkSchema = z40.object({
2741
- type: z40.nativeEnum(MARKS)
3112
+ var richTextMarkSchema = z42.object({
3113
+ type: z42.nativeEnum(MARKS)
2742
3114
  });
2743
- var richTextTextNodeSchema = z40.object({
2744
- nodeType: z40.literal("text"),
2745
- value: z40.string(),
2746
- marks: z40.array(richTextMarkSchema),
3115
+ var richTextTextNodeSchema = z42.object({
3116
+ nodeType: z42.literal("text"),
3117
+ value: z42.string(),
3118
+ marks: z42.array(richTextMarkSchema),
2747
3119
  data: emptyNodeDataSchema
2748
3120
  });
2749
- var embeddedEntryBlockNodeSchema = z40.object({
2750
- nodeType: z40.literal(BLOCKS2.EMBEDDED_ENTRY),
2751
- data: z40.object({
3121
+ var embeddedEntryBlockNodeSchema = z42.object({
3122
+ nodeType: z42.literal(BLOCKS2.EMBEDDED_ENTRY),
3123
+ data: z42.object({
2752
3124
  target: entryLinkTargetSchema
2753
3125
  }),
2754
- content: z40.array(z40.never())
3126
+ content: z42.array(z42.never())
2755
3127
  });
2756
- var embeddedEntryInlineNodeSchema = z40.object({
2757
- nodeType: z40.literal(INLINES2.EMBEDDED_ENTRY),
2758
- data: z40.object({
3128
+ var embeddedEntryInlineNodeSchema = z42.object({
3129
+ nodeType: z42.literal(INLINES2.EMBEDDED_ENTRY),
3130
+ data: z42.object({
2759
3131
  target: entryLinkTargetSchema
2760
3132
  }),
2761
- content: z40.array(z40.never())
3133
+ content: z42.array(z42.never())
2762
3134
  });
2763
- var embeddedAssetBlockNodeSchema = z40.object({
2764
- nodeType: z40.literal(BLOCKS2.EMBEDDED_ASSET),
2765
- data: z40.object({
3135
+ var embeddedAssetBlockNodeSchema = z42.object({
3136
+ nodeType: z42.literal(BLOCKS2.EMBEDDED_ASSET),
3137
+ data: z42.object({
2766
3138
  target: assetLinkTargetSchema
2767
3139
  }),
2768
- content: z40.array(z40.never())
3140
+ content: z42.array(z42.never())
2769
3141
  });
2770
- var hyperlinkInlineNodeSchema = z40.object({
2771
- nodeType: z40.literal(INLINES2.HYPERLINK),
2772
- data: z40.object({
2773
- uri: z40.string().url()
3142
+ var hyperlinkInlineNodeSchema = z42.object({
3143
+ nodeType: z42.literal(INLINES2.HYPERLINK),
3144
+ data: z42.object({
3145
+ uri: z42.string().url()
2774
3146
  }),
2775
- content: z40.array(richTextTextNodeSchema)
3147
+ content: z42.array(richTextTextNodeSchema)
2776
3148
  });
2777
- var entryHyperlinkInlineNodeSchema = z40.object({
2778
- nodeType: z40.literal(INLINES2.ENTRY_HYPERLINK),
2779
- data: z40.object({
3149
+ var entryHyperlinkInlineNodeSchema = z42.object({
3150
+ nodeType: z42.literal(INLINES2.ENTRY_HYPERLINK),
3151
+ data: z42.object({
2780
3152
  target: entryLinkTargetSchema
2781
3153
  }),
2782
- content: z40.array(richTextTextNodeSchema)
3154
+ content: z42.array(richTextTextNodeSchema)
2783
3155
  });
2784
- var assetHyperlinkInlineNodeSchema = z40.object({
2785
- nodeType: z40.literal(INLINES2.ASSET_HYPERLINK),
2786
- data: z40.object({
3156
+ var assetHyperlinkInlineNodeSchema = z42.object({
3157
+ nodeType: z42.literal(INLINES2.ASSET_HYPERLINK),
3158
+ data: z42.object({
2787
3159
  target: assetLinkTargetSchema
2788
3160
  }),
2789
- content: z40.array(richTextTextNodeSchema)
3161
+ content: z42.array(richTextTextNodeSchema)
2790
3162
  });
2791
- var embeddedResourceBlockNodeSchema = z40.object({
2792
- nodeType: z40.literal(BLOCKS2.EMBEDDED_RESOURCE),
2793
- data: z40.object({
3163
+ var embeddedResourceBlockNodeSchema = z42.object({
3164
+ nodeType: z42.literal(BLOCKS2.EMBEDDED_RESOURCE),
3165
+ data: z42.object({
2794
3166
  target: resourceLinkTargetSchema
2795
3167
  }),
2796
- content: z40.array(z40.never())
3168
+ content: z42.array(z42.never())
2797
3169
  });
2798
- var embeddedResourceInlineNodeSchema = z40.object({
2799
- nodeType: z40.literal(INLINES2.EMBEDDED_RESOURCE),
2800
- data: z40.object({
3170
+ var embeddedResourceInlineNodeSchema = z42.object({
3171
+ nodeType: z42.literal(INLINES2.EMBEDDED_RESOURCE),
3172
+ data: z42.object({
2801
3173
  target: resourceLinkTargetSchema
2802
3174
  }),
2803
- content: z40.array(z40.never())
3175
+ content: z42.array(z42.never())
2804
3176
  });
2805
- var resourceHyperlinkInlineNodeSchema = z40.object({
2806
- nodeType: z40.literal(INLINES2.RESOURCE_HYPERLINK),
2807
- data: z40.object({
3177
+ var resourceHyperlinkInlineNodeSchema = z42.object({
3178
+ nodeType: z42.literal(INLINES2.RESOURCE_HYPERLINK),
3179
+ data: z42.object({
2808
3180
  target: resourceLinkTargetSchema
2809
3181
  }),
2810
- content: z40.array(richTextTextNodeSchema)
3182
+ content: z42.array(richTextTextNodeSchema)
2811
3183
  });
2812
- var richTextInlineNodeSchema = z40.lazy(
2813
- () => z40.union([
3184
+ var richTextInlineNodeSchema = z42.lazy(
3185
+ () => z42.union([
2814
3186
  richTextTextNodeSchema,
2815
3187
  embeddedEntryInlineNodeSchema,
2816
3188
  hyperlinkInlineNodeSchema,
@@ -2820,17 +3192,17 @@ var richTextInlineNodeSchema = z40.lazy(
2820
3192
  resourceHyperlinkInlineNodeSchema
2821
3193
  ])
2822
3194
  );
2823
- var paragraphNodeSchema = z40.lazy(
2824
- () => z40.object({
2825
- nodeType: z40.literal(BLOCKS2.PARAGRAPH),
3195
+ var paragraphNodeSchema = z42.lazy(
3196
+ () => z42.object({
3197
+ nodeType: z42.literal(BLOCKS2.PARAGRAPH),
2826
3198
  data: emptyNodeDataSchema,
2827
- content: z40.array(richTextInlineNodeSchema)
3199
+ content: z42.array(richTextInlineNodeSchema)
2828
3200
  })
2829
3201
  );
2830
- var headingNodeSchema = (headingNodeType) => z40.object({
2831
- nodeType: z40.literal(headingNodeType),
3202
+ var headingNodeSchema = (headingNodeType) => z42.object({
3203
+ nodeType: z42.literal(headingNodeType),
2832
3204
  data: emptyNodeDataSchema,
2833
- content: z40.array(richTextInlineNodeSchema)
3205
+ content: z42.array(richTextInlineNodeSchema)
2834
3206
  });
2835
3207
  var heading1NodeSchema = headingNodeSchema(BLOCKS2.HEADING_1);
2836
3208
  var heading2NodeSchema = headingNodeSchema(BLOCKS2.HEADING_2);
@@ -2838,56 +3210,56 @@ var heading3NodeSchema = headingNodeSchema(BLOCKS2.HEADING_3);
2838
3210
  var heading4NodeSchema = headingNodeSchema(BLOCKS2.HEADING_4);
2839
3211
  var heading5NodeSchema = headingNodeSchema(BLOCKS2.HEADING_5);
2840
3212
  var heading6NodeSchema = headingNodeSchema(BLOCKS2.HEADING_6);
2841
- var hrNodeSchema = z40.object({
2842
- nodeType: z40.literal(BLOCKS2.HR),
3213
+ var hrNodeSchema = z42.object({
3214
+ nodeType: z42.literal(BLOCKS2.HR),
2843
3215
  data: emptyNodeDataSchema,
2844
- content: z40.array(z40.never())
3216
+ content: z42.array(z42.never())
2845
3217
  });
2846
- var quoteNodeSchema = z40.object({
2847
- nodeType: z40.literal(BLOCKS2.QUOTE),
3218
+ var quoteNodeSchema = z42.object({
3219
+ nodeType: z42.literal(BLOCKS2.QUOTE),
2848
3220
  data: emptyNodeDataSchema,
2849
- content: z40.array(paragraphNodeSchema)
3221
+ content: z42.array(paragraphNodeSchema)
2850
3222
  });
2851
- var tableHeaderCellNodeSchema = z40.object({
2852
- nodeType: z40.literal(BLOCKS2.TABLE_HEADER_CELL),
3223
+ var tableHeaderCellNodeSchema = z42.object({
3224
+ nodeType: z42.literal(BLOCKS2.TABLE_HEADER_CELL),
2853
3225
  data: emptyNodeDataSchema,
2854
- content: z40.array(paragraphNodeSchema)
3226
+ content: z42.array(paragraphNodeSchema)
2855
3227
  });
2856
- var tableCellNodeSchema = z40.object({
2857
- nodeType: z40.literal(BLOCKS2.TABLE_CELL),
3228
+ var tableCellNodeSchema = z42.object({
3229
+ nodeType: z42.literal(BLOCKS2.TABLE_CELL),
2858
3230
  data: emptyNodeDataSchema,
2859
- content: z40.array(paragraphNodeSchema)
3231
+ content: z42.array(paragraphNodeSchema)
2860
3232
  });
2861
- var tableRowNodeSchema = z40.object({
2862
- nodeType: z40.literal(BLOCKS2.TABLE_ROW),
3233
+ var tableRowNodeSchema = z42.object({
3234
+ nodeType: z42.literal(BLOCKS2.TABLE_ROW),
2863
3235
  data: emptyNodeDataSchema,
2864
- content: z40.array(z40.union([tableHeaderCellNodeSchema, tableCellNodeSchema]))
3236
+ content: z42.array(z42.union([tableHeaderCellNodeSchema, tableCellNodeSchema]))
2865
3237
  });
2866
- var tableNodeSchema = z40.object({
2867
- nodeType: z40.literal(BLOCKS2.TABLE),
3238
+ var tableNodeSchema = z42.object({
3239
+ nodeType: z42.literal(BLOCKS2.TABLE),
2868
3240
  data: emptyNodeDataSchema,
2869
- content: z40.array(tableRowNodeSchema)
3241
+ content: z42.array(tableRowNodeSchema)
2870
3242
  });
2871
- var orderedListNodeSchema = z40.lazy(
2872
- () => z40.object({
2873
- nodeType: z40.literal(BLOCKS2.OL_LIST),
3243
+ var orderedListNodeSchema = z42.lazy(
3244
+ () => z42.object({
3245
+ nodeType: z42.literal(BLOCKS2.OL_LIST),
2874
3246
  data: emptyNodeDataSchema,
2875
- content: z40.array(listItemNodeSchema)
3247
+ content: z42.array(listItemNodeSchema)
2876
3248
  })
2877
3249
  );
2878
- var unorderedListNodeSchema = z40.lazy(
2879
- () => z40.object({
2880
- nodeType: z40.literal(BLOCKS2.UL_LIST),
3250
+ var unorderedListNodeSchema = z42.lazy(
3251
+ () => z42.object({
3252
+ nodeType: z42.literal(BLOCKS2.UL_LIST),
2881
3253
  data: emptyNodeDataSchema,
2882
- content: z40.array(listItemNodeSchema)
3254
+ content: z42.array(listItemNodeSchema)
2883
3255
  })
2884
3256
  );
2885
- var listItemNodeSchema = z40.lazy(
2886
- () => z40.object({
2887
- nodeType: z40.literal(BLOCKS2.LIST_ITEM),
3257
+ var listItemNodeSchema = z42.lazy(
3258
+ () => z42.object({
3259
+ nodeType: z42.literal(BLOCKS2.LIST_ITEM),
2888
3260
  data: emptyNodeDataSchema,
2889
- content: z40.array(
2890
- z40.union([
3261
+ content: z42.array(
3262
+ z42.union([
2891
3263
  paragraphNodeSchema,
2892
3264
  orderedListNodeSchema,
2893
3265
  unorderedListNodeSchema
@@ -2895,8 +3267,8 @@ var listItemNodeSchema = z40.lazy(
2895
3267
  )
2896
3268
  })
2897
3269
  );
2898
- var topLevelBlockNodeSchema = z40.lazy(
2899
- () => z40.union([
3270
+ var topLevelBlockNodeSchema = z42.lazy(
3271
+ () => z42.union([
2900
3272
  paragraphNodeSchema,
2901
3273
  heading1NodeSchema,
2902
3274
  heading2NodeSchema,
@@ -2914,56 +3286,56 @@ var topLevelBlockNodeSchema = z40.lazy(
2914
3286
  tableNodeSchema
2915
3287
  ])
2916
3288
  );
2917
- var richTextDocumentSchema = z40.object({
2918
- nodeType: z40.literal(BLOCKS2.DOCUMENT),
3289
+ var richTextDocumentSchema = z42.object({
3290
+ nodeType: z42.literal(BLOCKS2.DOCUMENT),
2919
3291
  data: emptyNodeDataSchema,
2920
- content: z40.array(topLevelBlockNodeSchema)
3292
+ content: z42.array(topLevelBlockNodeSchema)
2921
3293
  }).describe("Contentful Rich Text document");
2922
3294
 
2923
3295
  // src/types/entryFieldSchema.ts
2924
- var linkSchema = z41.object({
2925
- sys: z41.object({
2926
- type: z41.literal("Link"),
2927
- linkType: z41.enum(["Entry", "Asset"]),
2928
- id: z41.string()
3296
+ var linkSchema = z43.object({
3297
+ sys: z43.object({
3298
+ type: z43.literal("Link"),
3299
+ linkType: z43.enum(["Entry", "Asset"]),
3300
+ id: z43.string()
2929
3301
  })
2930
3302
  });
2931
- var resourceLinkSchema = z41.object({
2932
- sys: z41.object({
2933
- type: z41.literal("ResourceLink"),
2934
- linkType: z41.string(),
2935
- urn: z41.string()
3303
+ var resourceLinkSchema = z43.object({
3304
+ sys: z43.object({
3305
+ type: z43.literal("ResourceLink"),
3306
+ linkType: z43.string(),
3307
+ urn: z43.string()
2936
3308
  })
2937
3309
  });
2938
- var locationSchema = z41.object({
2939
- lat: z41.number(),
2940
- lon: z41.number()
3310
+ var locationSchema = z43.object({
3311
+ lat: z43.number(),
3312
+ lon: z43.number()
2941
3313
  });
2942
- var jsonPrimitive = z41.union([z41.string(), z41.number(), z41.boolean(), z41.null()]);
2943
- var jsonValueSchema = z41.lazy(
2944
- () => z41.union([jsonPrimitive, z41.array(jsonValueSchema), z41.record(jsonValueSchema)]).describe("Freeform JSON value (not for Rich Text)")
3314
+ var jsonPrimitive = z43.union([z43.string(), z43.number(), z43.boolean(), z43.null()]);
3315
+ var jsonValueSchema = z43.lazy(
3316
+ () => z43.union([jsonPrimitive, z43.array(jsonValueSchema), z43.record(jsonValueSchema)]).describe("Freeform JSON value (not for Rich Text)")
2945
3317
  );
2946
- var fieldValueSchema = z41.union([
2947
- z41.string().describe("Symbol, Text, or Date field"),
2948
- z41.number().describe("Integer or Number field"),
2949
- z41.boolean().describe("Boolean field"),
3318
+ var fieldValueSchema = z43.union([
3319
+ z43.string().describe("Symbol, Text, or Date field"),
3320
+ z43.number().describe("Integer or Number field"),
3321
+ z43.boolean().describe("Boolean field"),
2950
3322
  richTextDocumentSchema,
2951
3323
  linkSchema.describe("Link field (Entry or Asset reference)"),
2952
3324
  resourceLinkSchema.describe("ResourceLink field"),
2953
3325
  locationSchema.describe("Location field"),
2954
- z41.array(z41.string()).describe("Array field of Symbols"),
2955
- z41.array(linkSchema).describe("Array field of Links"),
2956
- z41.array(resourceLinkSchema).describe("Array field of ResourceLinks"),
3326
+ z43.array(z43.string()).describe("Array field of Symbols"),
3327
+ z43.array(linkSchema).describe("Array field of Links"),
3328
+ z43.array(resourceLinkSchema).describe("Array field of ResourceLinks"),
2957
3329
  jsonValueSchema
2958
3330
  ]);
2959
- var localizedFieldSchema = z41.record(fieldValueSchema);
2960
- var entryFieldsSchema = z41.record(localizedFieldSchema).describe(
3331
+ var localizedFieldSchema = z43.record(fieldValueSchema);
3332
+ var entryFieldsSchema = z43.record(localizedFieldSchema).describe(
2961
3333
  "Field values to update. Keys are field IDs, values are locale-keyed objects. Will be merged with existing fields."
2962
3334
  );
2963
3335
 
2964
3336
  // src/tools/entries/createEntry.ts
2965
3337
  var CreateEntryToolParams = BaseToolSchema.extend({
2966
- contentTypeId: z42.string().describe("The ID of the content type to create an entry for"),
3338
+ contentTypeId: z44.string().describe("The ID of the content type to create an entry for"),
2967
3339
  fields: entryFieldsSchema.describe(
2968
3340
  "The field values for the new entry. Keys should be field IDs and values should be the field content."
2969
3341
  ),
@@ -2996,13 +3368,13 @@ function createEntryTool(config) {
2996
3368
  }
2997
3369
 
2998
3370
  // src/tools/entries/deleteEntry.ts
2999
- import { z as z43 } from "zod";
3371
+ import { z as z45 } from "zod";
3000
3372
  var DeleteEntryToolParams = BaseToolSchema.extend({
3001
- entryId: z43.string().describe("The ID of the entry to delete"),
3002
- confirm: z43.boolean().optional().describe(
3373
+ entryId: z45.string().describe("The ID of the entry to delete"),
3374
+ confirm: z45.boolean().optional().describe(
3003
3375
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
3004
3376
  ),
3005
- confirmToken: z43.string().optional().describe(
3377
+ confirmToken: z45.string().optional().describe(
3006
3378
  "Token returned by the preview call; must be supplied with confirm: true."
3007
3379
  )
3008
3380
  });
@@ -3042,10 +3414,10 @@ function deleteEntryTool(config) {
3042
3414
  }
3043
3415
 
3044
3416
  // src/tools/entries/updateEntry.ts
3045
- import { z as z44 } from "zod";
3417
+ import { z as z46 } from "zod";
3046
3418
  var UpdateEntryToolParams = BaseToolSchema.extend({
3047
- entryId: z44.string().describe("The ID of the entry to update"),
3048
- version: z44.number().describe(
3419
+ entryId: z46.string().describe("The ID of the entry to update"),
3420
+ version: z46.number().describe(
3049
3421
  "REQUIRED. The entry's sys.version as returned by get_entry. You must call get_entry first to read the current state and version. The update is rejected if this does not match the entry's current version, which means the entry changed since you read it."
3050
3422
  ),
3051
3423
  fields: entryFieldsSchema.describe(
@@ -3099,9 +3471,9 @@ function updateEntryTool(config) {
3099
3471
  }
3100
3472
 
3101
3473
  // src/tools/entries/getEntry.ts
3102
- import { z as z45 } from "zod";
3474
+ import { z as z47 } from "zod";
3103
3475
  var GetEntryToolParams = BaseToolSchema.extend({
3104
- entryId: z45.string().describe("The ID of the entry to retrieve")
3476
+ entryId: z47.string().describe("The ID of the entry to retrieve")
3105
3477
  });
3106
3478
  function getEntryTool(config) {
3107
3479
  async function tool2(args) {
@@ -3118,10 +3490,10 @@ function getEntryTool(config) {
3118
3490
  }
3119
3491
 
3120
3492
  // src/tools/entries/resolveEntryReferences.ts
3121
- import { z as z46 } from "zod";
3493
+ import { z as z48 } from "zod";
3122
3494
  var ResolveEntryReferencesToolParams = BaseToolSchema.extend({
3123
- entryId: z46.string().describe("The ID of the entry whose references should be resolved"),
3124
- include: z46.number().int().min(1).max(10).optional().default(2).describe(
3495
+ entryId: z48.string().describe("The ID of the entry whose references should be resolved"),
3496
+ include: z48.number().int().min(1).max(10).optional().default(2).describe(
3125
3497
  "How many levels of linked entries to walk (1-10, default: 2). The CMA caps this at 10."
3126
3498
  )
3127
3499
  });
@@ -3144,10 +3516,10 @@ function resolveEntryReferencesTool(config) {
3144
3516
  }
3145
3517
 
3146
3518
  // src/tools/entries/getEntrySnapshot.ts
3147
- import { z as z47 } from "zod";
3519
+ import { z as z49 } from "zod";
3148
3520
  var GetEntrySnapshotToolParams = BaseToolSchema.extend({
3149
- entryId: z47.string().describe("The ID of the entry to retrieve snapshots for"),
3150
- snapshotId: z47.string().optional().describe(
3521
+ entryId: z49.string().describe("The ID of the entry to retrieve snapshots for"),
3522
+ snapshotId: z49.string().optional().describe(
3151
3523
  "Optional snapshot ID. When provided, returns the full content of that single snapshot. When omitted, lists all available snapshots for the entry."
3152
3524
  )
3153
3525
  });
@@ -3178,12 +3550,12 @@ function getEntrySnapshotTool(config) {
3178
3550
  }
3179
3551
 
3180
3552
  // src/tools/entries/publishEntry.ts
3181
- import { z as z48 } from "zod";
3553
+ import { z as z50 } from "zod";
3182
3554
  var PublishEntryToolParams = BaseToolSchema.extend({
3183
- entryId: z48.array(z48.string()).min(1).max(100).describe(
3555
+ entryId: z50.array(z50.string()).min(1).max(100).describe(
3184
3556
  "Array of entry IDs to publish. Single-element array for one entry, or up to MAX_BULK_SIZE per call (default 10, max 100 \u2014 configurable via MAX_BULK_SIZE env var)."
3185
3557
  ),
3186
- dryRun: z48.boolean().optional().describe(
3558
+ dryRun: z50.boolean().optional().describe(
3187
3559
  "When true, returns a preview of the operation without executing it. Still subject to MAX_BULK_SIZE \u2014 use this to confirm intent for within-limit calls."
3188
3560
  )
3189
3561
  });
@@ -3251,12 +3623,12 @@ function publishEntryTool(config) {
3251
3623
  }
3252
3624
 
3253
3625
  // src/tools/entries/unpublishEntry.ts
3254
- import { z as z49 } from "zod";
3626
+ import { z as z51 } from "zod";
3255
3627
  var UnpublishEntryToolParams = BaseToolSchema.extend({
3256
- entryId: z49.array(z49.string()).min(1).max(100).describe(
3628
+ entryId: z51.array(z51.string()).min(1).max(100).describe(
3257
3629
  "Array of entry IDs to unpublish. Single-element array for one entry, or up to MAX_BULK_SIZE per call (default 10, max 100 \u2014 configurable via MAX_BULK_SIZE env var)."
3258
3630
  ),
3259
- dryRun: z49.boolean().optional().describe(
3631
+ dryRun: z51.boolean().optional().describe(
3260
3632
  "When true, returns a preview of the operation without executing it. Still subject to MAX_BULK_SIZE \u2014 use this to confirm intent for within-limit calls."
3261
3633
  )
3262
3634
  });
@@ -3324,12 +3696,12 @@ function unpublishEntryTool(config) {
3324
3696
  }
3325
3697
 
3326
3698
  // src/tools/entries/archiveEntry.ts
3327
- import { z as z50 } from "zod";
3699
+ import { z as z52 } from "zod";
3328
3700
  var ArchiveEntryToolParams = BaseToolSchema.extend({
3329
- entryId: z50.array(z50.string()).min(1).max(100).describe(
3701
+ entryId: z52.array(z52.string()).min(1).max(100).describe(
3330
3702
  "Array of entry IDs to archive. Single-element array for one entry, or up to MAX_BULK_SIZE per call (default 10, max 100 \u2014 configurable via MAX_BULK_SIZE env var)."
3331
3703
  ),
3332
- dryRun: z50.boolean().optional().describe(
3704
+ dryRun: z52.boolean().optional().describe(
3333
3705
  "When true, returns a preview of the operation without executing it. Still subject to MAX_BULK_SIZE \u2014 use this to confirm intent for within-limit calls."
3334
3706
  )
3335
3707
  });
@@ -3368,7 +3740,7 @@ function archiveEntryTool(config) {
3368
3740
  await contentfulClient.entry.archive(params);
3369
3741
  successfullyArchived.push(entryId);
3370
3742
  } catch (error) {
3371
- const errorMessage = successfullyArchived.length > 0 ? `Failed to archive entry '${entryId}' after successfully archiving ${successfullyArchived.length} entry(s): [${successfullyArchived.join(", ")}]. Original error: ${error instanceof Error ? error.message : String(error)}` : `Failed to archive entry '${entryId}': ${error instanceof Error ? error.message : String(error)}`;
3743
+ const errorMessage = successfullyArchived.length > 0 ? `Failed to archive entry '${entryId}' after successfully archiving ${successfullyArchived.length} entry(s): [${successfullyArchived.join(", ")}]. Original error: ${formatErrorMessage(error)}` : `Failed to archive entry '${entryId}': ${formatErrorMessage(error)}`;
3372
3744
  throw new Error(errorMessage);
3373
3745
  }
3374
3746
  }
@@ -3390,12 +3762,12 @@ function archiveEntryTool(config) {
3390
3762
  }
3391
3763
 
3392
3764
  // src/tools/entries/unarchiveEntry.ts
3393
- import { z as z51 } from "zod";
3765
+ import { z as z53 } from "zod";
3394
3766
  var UnarchiveEntryToolParams = BaseToolSchema.extend({
3395
- entryId: z51.array(z51.string()).min(1).max(100).describe(
3767
+ entryId: z53.array(z53.string()).min(1).max(100).describe(
3396
3768
  "Array of entry IDs to unarchive. Single-element array for one entry, or up to MAX_BULK_SIZE per call (default 10, max 100 \u2014 configurable via MAX_BULK_SIZE env var)."
3397
3769
  ),
3398
- dryRun: z51.boolean().optional().describe(
3770
+ dryRun: z53.boolean().optional().describe(
3399
3771
  "When true, returns a preview of the operation without executing it. Still subject to MAX_BULK_SIZE \u2014 use this to confirm intent for within-limit calls."
3400
3772
  )
3401
3773
  });
@@ -3434,7 +3806,7 @@ function unarchiveEntryTool(config) {
3434
3806
  await contentfulClient.entry.unarchive(params);
3435
3807
  successfullyUnarchived.push(entryId);
3436
3808
  } catch (error) {
3437
- const errorMessage = successfullyUnarchived.length > 0 ? `Failed to unarchive entry '${entryId}' after successfully unarchiving ${successfullyUnarchived.length} entry(s): [${successfullyUnarchived.join(", ")}]. Original error: ${error instanceof Error ? error.message : String(error)}` : `Failed to unarchive entry '${entryId}': ${error instanceof Error ? error.message : String(error)}`;
3809
+ const errorMessage = successfullyUnarchived.length > 0 ? `Failed to unarchive entry '${entryId}' after successfully unarchiving ${successfullyUnarchived.length} entry(s): [${successfullyUnarchived.join(", ")}]. Original error: ${formatErrorMessage(error)}` : `Failed to unarchive entry '${entryId}': ${formatErrorMessage(error)}`;
3438
3810
  throw new Error(errorMessage);
3439
3811
  }
3440
3812
  }
@@ -3456,17 +3828,17 @@ function unarchiveEntryTool(config) {
3456
3828
  }
3457
3829
 
3458
3830
  // src/tools/entries/appendEntryField.ts
3459
- import { z as z52 } from "zod";
3831
+ import { z as z54 } from "zod";
3460
3832
  var AppendEntryFieldToolParams = BaseToolSchema.extend({
3461
- entryId: z52.string().describe("The ID of the entry to modify"),
3462
- fieldId: z52.string().describe("The ID of the array field to append to"),
3463
- locale: z52.string().describe(
3833
+ entryId: z54.string().describe("The ID of the entry to modify"),
3834
+ fieldId: z54.string().describe("The ID of the array field to append to"),
3835
+ locale: z54.string().describe(
3464
3836
  'The locale key to target (e.g. "en-US"). Fields are locale-keyed; you must supply the exact locale string.'
3465
3837
  ),
3466
- values: z52.array(z52.unknown()).min(1).describe(
3838
+ values: z54.array(z54.unknown()).min(1).describe(
3467
3839
  'One or more items to append. Each item must match the element shape of the target array field: a plain string for Array of Symbols, { sys: { type: "Link", linkType: "Entry"|"Asset", id: "..." } } for Array of Links, or { sys: { type: "ResourceLink", linkType: "...", urn: "..." } } for Array of ResourceLinks.'
3468
3840
  ),
3469
- version: z52.number().optional().describe(
3841
+ version: z54.number().optional().describe(
3470
3842
  "Optional. The entry's sys.version as returned by get_entry. If provided, the append is rejected when the entry has changed since you read it (same conflict check as update_entry). If omitted, the append targets the current server state without a version check \u2014 safe for additive operations."
3471
3843
  )
3472
3844
  });
@@ -3720,11 +4092,11 @@ function createEntryTools(config) {
3720
4092
  }
3721
4093
 
3722
4094
  // src/tools/environments/createEnvironment.ts
3723
- import { z as z53 } from "zod";
4095
+ import { z as z55 } from "zod";
3724
4096
  var CreateEnvironmentToolParams = BaseToolSchema.extend({
3725
- environmentId: z53.string().describe("The ID of the environment to create"),
3726
- name: z53.string().describe("The name of the environment to create"),
3727
- sourceEnvironmentId: z53.string().describe(
4097
+ environmentId: z55.string().describe("The ID of the environment to create"),
4098
+ name: z55.string().describe("The name of the environment to create"),
4099
+ sourceEnvironmentId: z55.string().describe(
3728
4100
  "The ID of the source environment to clone from (defaults to master)"
3729
4101
  ).optional()
3730
4102
  });
@@ -3755,15 +4127,15 @@ function createEnvironmentTool(config) {
3755
4127
  }
3756
4128
 
3757
4129
  // src/tools/environments/listEnvironments.ts
3758
- import { z as z54 } from "zod";
4130
+ import { z as z56 } from "zod";
3759
4131
  var ListEnvironmentsToolParams = BaseToolSchema.extend({
3760
- environmentId: z54.string().optional().describe(
4132
+ environmentId: z56.string().optional().describe(
3761
4133
  "The ID of the Contentful environment (not required for listing)"
3762
4134
  ),
3763
- limit: z54.number().optional().describe("Maximum number of environments to return (max 10)"),
3764
- skip: z54.number().optional().describe("Skip this many environments for pagination"),
3765
- select: z54.string().optional().describe("Comma-separated list of fields to return"),
3766
- order: z54.string().optional().describe("Order environments by this field")
4135
+ limit: z56.number().optional().describe("Maximum number of environments to return (max 10)"),
4136
+ skip: z56.number().optional().describe("Skip this many environments for pagination"),
4137
+ select: z56.string().optional().describe("Comma-separated list of fields to return"),
4138
+ order: z56.string().optional().describe("Order environments by this field")
3767
4139
  });
3768
4140
  function listEnvironmentsTool(config) {
3769
4141
  async function tool2(args) {
@@ -3809,13 +4181,13 @@ function listEnvironmentsTool(config) {
3809
4181
  }
3810
4182
 
3811
4183
  // src/tools/environments/deleteEnvironment.ts
3812
- import { z as z55 } from "zod";
4184
+ import { z as z57 } from "zod";
3813
4185
  var DeleteEnvironmentToolParams = BaseToolSchema.extend({
3814
- environmentId: z55.string().describe("The ID of the environment to delete"),
3815
- confirm: z55.boolean().optional().describe(
4186
+ environmentId: z57.string().describe("The ID of the environment to delete"),
4187
+ confirm: z57.boolean().optional().describe(
3816
4188
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
3817
4189
  ),
3818
- confirmToken: z55.string().optional().describe(
4190
+ confirmToken: z57.string().optional().describe(
3819
4191
  "Token returned by the preview call; must be supplied with confirm: true."
3820
4192
  )
3821
4193
  });
@@ -3900,9 +4272,9 @@ function createEnvironmentTools(config) {
3900
4272
  }
3901
4273
 
3902
4274
  // src/tools/locales/getLocale.ts
3903
- import { z as z56 } from "zod";
4275
+ import { z as z58 } from "zod";
3904
4276
  var GetLocaleToolParams = BaseToolSchema.extend({
3905
- localeId: z56.string().describe("The ID of the locale to retrieve")
4277
+ localeId: z58.string().describe("The ID of the locale to retrieve")
3906
4278
  });
3907
4279
  function getLocaleTool(config) {
3908
4280
  async function tool2(args) {
@@ -3919,21 +4291,21 @@ function getLocaleTool(config) {
3919
4291
  }
3920
4292
 
3921
4293
  // src/tools/locales/createLocale.ts
3922
- import { z as z57 } from "zod";
4294
+ import { z as z59 } from "zod";
3923
4295
  var CreateLocaleToolParams = BaseToolSchema.extend({
3924
- name: z57.string().describe("The name of the locale"),
3925
- code: z57.string().describe('The locale code (e.g., "en-US")'),
3926
- fallbackCode: z57.string().nullable().describe(
4296
+ name: z59.string().describe("The name of the locale"),
4297
+ code: z59.string().describe('The locale code (e.g., "en-US")'),
4298
+ fallbackCode: z59.string().nullable().describe(
3927
4299
  "The locale code to fallback to when there is no content for the current locale"
3928
4300
  ),
3929
- contentDeliveryApi: z57.boolean().optional().default(true).describe(
4301
+ contentDeliveryApi: z59.boolean().optional().default(true).describe(
3930
4302
  "If the content under this locale should be available on the CDA (for public reading)"
3931
4303
  ),
3932
- contentManagementApi: z57.boolean().optional().default(true).describe(
4304
+ contentManagementApi: z59.boolean().optional().default(true).describe(
3933
4305
  "If the content under this locale should be available on the CMA (for editing)"
3934
4306
  ),
3935
- default: z57.boolean().optional().default(false).describe("If this is the default locale"),
3936
- optional: z57.boolean().optional().default(false).describe("If the locale needs to be filled in on entries or not")
4307
+ default: z59.boolean().optional().default(false).describe("If this is the default locale"),
4308
+ optional: z59.boolean().optional().default(false).describe("If the locale needs to be filled in on entries or not")
3937
4309
  });
3938
4310
  function createLocaleTool(config) {
3939
4311
  async function tool2(args) {
@@ -3960,13 +4332,13 @@ function createLocaleTool(config) {
3960
4332
  }
3961
4333
 
3962
4334
  // src/tools/locales/listLocales.ts
3963
- import { z as z58 } from "zod";
4335
+ import { z as z60 } from "zod";
3964
4336
  var ListLocaleToolParams = BaseToolSchema.extend({
3965
- limit: z58.number().optional().describe("Maximum number of locales to return"),
3966
- skip: z58.number().optional().describe("Skip this many locales for pagination"),
3967
- select: z58.string().optional().describe("Comma-separated list of fields to return"),
3968
- include: z58.number().optional().describe("Include this many levels of linked entries"),
3969
- order: z58.string().optional().describe("Order locales by this field")
4337
+ limit: z60.number().optional().describe("Maximum number of locales to return"),
4338
+ skip: z60.number().optional().describe("Skip this many locales for pagination"),
4339
+ select: z60.string().optional().describe("Comma-separated list of fields to return"),
4340
+ include: z60.number().optional().describe("Include this many levels of linked entries"),
4341
+ order: z60.string().optional().describe("Order locales by this field")
3970
4342
  });
3971
4343
  function listLocaleTool(config) {
3972
4344
  async function tool2(args) {
@@ -4019,23 +4391,23 @@ function listLocaleTool(config) {
4019
4391
  }
4020
4392
 
4021
4393
  // src/tools/locales/updateLocale.ts
4022
- import { z as z59 } from "zod";
4394
+ import { z as z61 } from "zod";
4023
4395
  var UpdateLocaleToolParams = BaseToolSchema.extend({
4024
- localeId: z59.string().describe("The ID of the locale to update"),
4025
- fields: z59.object({
4026
- name: z59.string().optional().describe("The name of the locale"),
4396
+ localeId: z61.string().describe("The ID of the locale to update"),
4397
+ fields: z61.object({
4398
+ name: z61.string().optional().describe("The name of the locale"),
4027
4399
  // NOTE: internal_code changes are not allowed
4028
- code: z59.string().optional().describe("The code of the locale"),
4029
- fallbackCode: z59.string().optional().describe(
4400
+ code: z61.string().optional().describe("The code of the locale"),
4401
+ fallbackCode: z61.string().optional().describe(
4030
4402
  "The locale code to fallback to when there is no content for the current locale"
4031
4403
  ),
4032
- contentDeliveryApi: z59.boolean().optional().describe(
4404
+ contentDeliveryApi: z61.boolean().optional().describe(
4033
4405
  "If the content under this locale should be available on the CDA (for public reading)"
4034
4406
  ),
4035
- contentManagementApi: z59.boolean().optional().describe(
4407
+ contentManagementApi: z61.boolean().optional().describe(
4036
4408
  "If the content under this locale should be available on the CMA (for editing)"
4037
4409
  ),
4038
- optional: z59.boolean().optional().describe("If the locale needs to be filled in on entries or not")
4410
+ optional: z61.boolean().optional().describe("If the locale needs to be filled in on entries or not")
4039
4411
  })
4040
4412
  });
4041
4413
  function updateLocaleTool(config) {
@@ -4065,13 +4437,13 @@ function updateLocaleTool(config) {
4065
4437
  }
4066
4438
 
4067
4439
  // src/tools/locales/deleteLocale.ts
4068
- import { z as z60 } from "zod";
4440
+ import { z as z62 } from "zod";
4069
4441
  var DeleteLocaleToolParams = BaseToolSchema.extend({
4070
- localeId: z60.string().describe("The ID of the locale to delete"),
4071
- confirm: z60.boolean().optional().describe(
4442
+ localeId: z62.string().describe("The ID of the locale to delete"),
4443
+ confirm: z62.boolean().optional().describe(
4072
4444
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
4073
4445
  ),
4074
- confirmToken: z60.string().optional().describe(
4446
+ confirmToken: z62.string().optional().describe(
4075
4447
  "Token returned by the preview call; must be supplied with confirm: true."
4076
4448
  )
4077
4449
  });
@@ -4180,19 +4552,19 @@ function createLocaleTools(config) {
4180
4552
  }
4181
4553
 
4182
4554
  // src/tools/orgs/listOrgs.ts
4183
- import { z as z61 } from "zod";
4184
- import { createClient as createClient2 } from "contentful-management";
4185
- var ListOrgsToolParams = z61.object({
4186
- limit: z61.number().optional().describe("Maximum number of organizations to return (max 10)"),
4187
- skip: z61.number().optional().describe("Skip this many organizations for pagination"),
4188
- select: z61.string().optional().describe("Comma-separated list of fields to return"),
4189
- order: z61.string().optional().describe("Order organizations by this field")
4555
+ import { z as z63 } from "zod";
4556
+ import { createClient as createClient3 } from "contentful-management";
4557
+ var ListOrgsToolParams = z63.object({
4558
+ limit: z63.number().optional().describe("Maximum number of organizations to return (max 10)"),
4559
+ skip: z63.number().optional().describe("Skip this many organizations for pagination"),
4560
+ select: z63.string().optional().describe("Comma-separated list of fields to return"),
4561
+ order: z63.string().optional().describe("Order organizations by this field")
4190
4562
  });
4191
4563
  function listOrgsTool(config) {
4192
4564
  async function tool2(args) {
4193
4565
  const clientConfig = createClientConfig(config);
4194
4566
  delete clientConfig.space;
4195
- const contentfulClient = createClient2(clientConfig);
4567
+ const contentfulClient = createClient3(clientConfig);
4196
4568
  const organizations = await contentfulClient.organization.getAll({
4197
4569
  query: {
4198
4570
  limit: Math.min(args.limit || 10, 10),
@@ -4228,16 +4600,16 @@ function listOrgsTool(config) {
4228
4600
  }
4229
4601
 
4230
4602
  // src/tools/orgs/getOrg.ts
4231
- import { z as z62 } from "zod";
4232
- import { createClient as createClient3 } from "contentful-management";
4233
- var GetOrgToolParams = z62.object({
4234
- organizationId: z62.string().describe("The ID of the organization to retrieve")
4603
+ import { z as z64 } from "zod";
4604
+ import { createClient as createClient4 } from "contentful-management";
4605
+ var GetOrgToolParams = z64.object({
4606
+ organizationId: z64.string().describe("The ID of the organization to retrieve")
4235
4607
  });
4236
4608
  function getOrgTool(config) {
4237
4609
  async function tool2(args) {
4238
4610
  const clientConfig = createClientConfig(config);
4239
4611
  delete clientConfig.space;
4240
- const contentfulClient = createClient3(clientConfig);
4612
+ const contentfulClient = createClient4(clientConfig);
4241
4613
  const organization = await contentfulClient.organization.get({
4242
4614
  organizationId: args.organizationId
4243
4615
  });
@@ -4279,19 +4651,19 @@ function createOrgTools(config) {
4279
4651
  }
4280
4652
 
4281
4653
  // src/tools/spaces/listSpaces.ts
4282
- import { z as z63 } from "zod";
4283
- import { createClient as createClient4 } from "contentful-management";
4284
- var ListSpacesToolParams = z63.object({
4285
- limit: z63.number().optional().describe("Maximum number of spaces to return (max 10)"),
4286
- skip: z63.number().optional().describe("Skip this many spaces for pagination"),
4287
- select: z63.string().optional().describe("Comma-separated list of fields to return"),
4288
- order: z63.string().optional().describe("Order spaces by this field")
4654
+ import { z as z65 } from "zod";
4655
+ import { createClient as createClient5 } from "contentful-management";
4656
+ var ListSpacesToolParams = z65.object({
4657
+ limit: z65.number().optional().describe("Maximum number of spaces to return (max 10)"),
4658
+ skip: z65.number().optional().describe("Skip this many spaces for pagination"),
4659
+ select: z65.string().optional().describe("Comma-separated list of fields to return"),
4660
+ order: z65.string().optional().describe("Order spaces by this field")
4289
4661
  });
4290
4662
  function listSpacesTool(config) {
4291
4663
  async function tool2(args) {
4292
4664
  const clientConfig = createClientConfig(config);
4293
4665
  delete clientConfig.space;
4294
- const contentfulClient = createClient4(clientConfig);
4666
+ const contentfulClient = createClient5(clientConfig);
4295
4667
  const spaces = await contentfulClient.space.getMany({
4296
4668
  query: {
4297
4669
  limit: Math.min(args.limit || 10, 10),
@@ -4327,16 +4699,16 @@ function listSpacesTool(config) {
4327
4699
  }
4328
4700
 
4329
4701
  // src/tools/spaces/getSpace.ts
4330
- import { z as z64 } from "zod";
4331
- import { createClient as createClient5 } from "contentful-management";
4332
- var GetSpaceToolParams = z64.object({
4333
- spaceId: z64.string().describe("The ID of the space to retrieve")
4702
+ import { z as z66 } from "zod";
4703
+ import { createClient as createClient6 } from "contentful-management";
4704
+ var GetSpaceToolParams = z66.object({
4705
+ spaceId: z66.string().describe("The ID of the space to retrieve")
4334
4706
  });
4335
4707
  function getSpaceTool(config) {
4336
4708
  async function tool2(args) {
4337
4709
  const clientConfig = createClientConfig(config);
4338
4710
  delete clientConfig.space;
4339
- const contentfulClient = createClient5(clientConfig);
4711
+ const contentfulClient = createClient6(clientConfig);
4340
4712
  const space = await contentfulClient.space.get({
4341
4713
  spaceId: args.spaceId
4342
4714
  });
@@ -4376,12 +4748,12 @@ function createSpaceTools(config) {
4376
4748
  }
4377
4749
 
4378
4750
  // src/tools/tags/listTags.ts
4379
- import { z as z65 } from "zod";
4751
+ import { z as z67 } from "zod";
4380
4752
  var ListTagsToolParams = BaseToolSchema.extend({
4381
- limit: z65.number().optional().describe("Maximum number of tags to return"),
4382
- skip: z65.number().optional().describe("Skip this many tags for pagination"),
4383
- select: z65.string().optional().describe("Comma-separated list of fields to return"),
4384
- order: z65.string().optional().describe("Order tags by this field")
4753
+ limit: z67.number().optional().describe("Maximum number of tags to return"),
4754
+ skip: z67.number().optional().describe("Skip this many tags for pagination"),
4755
+ select: z67.string().optional().describe("Comma-separated list of fields to return"),
4756
+ order: z67.string().optional().describe("Order tags by this field")
4385
4757
  });
4386
4758
  function listTagsTool(config) {
4387
4759
  async function tool2(args) {
@@ -4427,11 +4799,11 @@ function listTagsTool(config) {
4427
4799
  }
4428
4800
 
4429
4801
  // src/tools/tags/createTag.ts
4430
- import { z as z66 } from "zod";
4802
+ import { z as z68 } from "zod";
4431
4803
  var CreateTagToolParams = BaseToolSchema.extend({
4432
- name: z66.string().describe("The name of the tag"),
4433
- id: z66.string().describe("The ID of the tag"),
4434
- visibility: z66.enum(["public", "private"]).describe("The visibility of the tag. Default to private if not specified")
4804
+ name: z68.string().describe("The name of the tag"),
4805
+ id: z68.string().describe("The ID of the tag"),
4806
+ visibility: z68.enum(["public", "private"]).describe("The visibility of the tag. Default to private if not specified")
4435
4807
  });
4436
4808
  function createTagTool(config) {
4437
4809
  async function tool2(args) {
@@ -4486,40 +4858,40 @@ function createTagTools(config) {
4486
4858
  }
4487
4859
 
4488
4860
  // src/tools/taxonomies/concept-schemes/createConceptScheme.ts
4489
- import { z as z68 } from "zod";
4490
- import { createClient as createClient6 } from "contentful-management";
4861
+ import { z as z70 } from "zod";
4862
+ import { createClient as createClient7 } from "contentful-management";
4491
4863
 
4492
4864
  // src/types/conceptPayloadTypes.ts
4493
- import { z as z67 } from "zod";
4494
- var TaxonomyConceptLinkSchema = z67.object({
4495
- sys: z67.object({
4496
- type: z67.literal("Link"),
4497
- linkType: z67.literal("TaxonomyConcept"),
4498
- id: z67.string()
4865
+ import { z as z69 } from "zod";
4866
+ var TaxonomyConceptLinkSchema = z69.object({
4867
+ sys: z69.object({
4868
+ type: z69.literal("Link"),
4869
+ linkType: z69.literal("TaxonomyConcept"),
4870
+ id: z69.string()
4499
4871
  })
4500
4872
  });
4501
4873
 
4502
4874
  // src/tools/taxonomies/concept-schemes/createConceptScheme.ts
4503
- var CreateConceptSchemeToolParams = z68.object({
4504
- organizationId: z68.string().describe("The ID of the Contentful organization"),
4505
- conceptSchemeId: z68.string().optional().describe(
4875
+ var CreateConceptSchemeToolParams = z70.object({
4876
+ organizationId: z70.string().describe("The ID of the Contentful organization"),
4877
+ conceptSchemeId: z70.string().optional().describe(
4506
4878
  "Optional user-defined ID for the concept scheme. If not provided, Contentful will generate one automatically."
4507
4879
  ),
4508
- prefLabel: z68.record(z68.string()).describe("The preferred label for the concept scheme (localized)"),
4509
- uri: z68.string().nullable().optional().describe("The URI for the concept scheme"),
4510
- definition: z68.record(z68.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
4511
- editorialNote: z68.record(z68.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
4512
- historyNote: z68.record(z68.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
4513
- example: z68.record(z68.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
4514
- note: z68.record(z68.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
4515
- scopeNote: z68.record(z68.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
4516
- topConcepts: z68.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme")
4880
+ prefLabel: z70.record(z70.string()).describe("The preferred label for the concept scheme (localized)"),
4881
+ uri: z70.string().nullable().optional().describe("The URI for the concept scheme"),
4882
+ definition: z70.record(z70.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
4883
+ editorialNote: z70.record(z70.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
4884
+ historyNote: z70.record(z70.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
4885
+ example: z70.record(z70.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
4886
+ note: z70.record(z70.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
4887
+ scopeNote: z70.record(z70.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
4888
+ topConcepts: z70.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme")
4517
4889
  });
4518
4890
  function createConceptSchemeTool(config) {
4519
4891
  async function tool2(args) {
4520
4892
  const clientConfig = createClientConfig(config);
4521
4893
  delete clientConfig.space;
4522
- const contentfulClient = createClient6(clientConfig);
4894
+ const contentfulClient = createClient7(clientConfig);
4523
4895
  const conceptSchemePayload = {
4524
4896
  prefLabel: args.prefLabel,
4525
4897
  ...Object.fromEntries(
@@ -4553,17 +4925,17 @@ function createConceptSchemeTool(config) {
4553
4925
  }
4554
4926
 
4555
4927
  // src/tools/taxonomies/concept-schemes/getConceptScheme.ts
4556
- import { z as z69 } from "zod";
4557
- import { createClient as createClient7 } from "contentful-management";
4558
- var GetConceptSchemeToolParams = z69.object({
4559
- organizationId: z69.string().describe("The ID of the Contentful organization"),
4560
- conceptSchemeId: z69.string().describe("The ID of the concept scheme to retrieve")
4928
+ import { z as z71 } from "zod";
4929
+ import { createClient as createClient8 } from "contentful-management";
4930
+ var GetConceptSchemeToolParams = z71.object({
4931
+ organizationId: z71.string().describe("The ID of the Contentful organization"),
4932
+ conceptSchemeId: z71.string().describe("The ID of the concept scheme to retrieve")
4561
4933
  });
4562
4934
  function getConceptSchemeTool(config) {
4563
4935
  async function tool2(args) {
4564
4936
  const clientConfig = createClientConfig(config);
4565
4937
  delete clientConfig.space;
4566
- const contentfulClient = createClient7(clientConfig);
4938
+ const contentfulClient = createClient8(clientConfig);
4567
4939
  const params = {
4568
4940
  organizationId: args.organizationId,
4569
4941
  conceptSchemeId: args.conceptSchemeId
@@ -4577,25 +4949,25 @@ function getConceptSchemeTool(config) {
4577
4949
  }
4578
4950
 
4579
4951
  // src/tools/taxonomies/concept-schemes/listConceptSchemes.ts
4580
- import { z as z70 } from "zod";
4581
- import { createClient as createClient8 } from "contentful-management";
4582
- import { cloneDeep } from "lodash-es";
4583
- var ListConceptSchemesToolParams = z70.object({
4584
- organizationId: z70.string(),
4585
- query: z70.union([
4586
- z70.object({
4587
- query: z70.string().optional(),
4588
- pageNext: z70.string().optional().describe("Cursor token for the next page of concept schemes"),
4589
- pagePrev: z70.string().optional().describe(
4952
+ import { z as z72 } from "zod";
4953
+ import { createClient as createClient9 } from "contentful-management";
4954
+ import { cloneDeep as cloneDeep2 } from "lodash-es";
4955
+ var ListConceptSchemesToolParams = z72.object({
4956
+ organizationId: z72.string(),
4957
+ query: z72.union([
4958
+ z72.object({
4959
+ query: z72.string().optional(),
4960
+ pageNext: z72.string().optional().describe("Cursor token for the next page of concept schemes"),
4961
+ pagePrev: z72.string().optional().describe(
4590
4962
  "Cursor token for the previous page of concept schemes"
4591
4963
  ),
4592
- limit: z70.number().optional().describe("Maximum number of concept schemes to return"),
4593
- order: z70.string().optional().describe("Order concept schemes by this field"),
4594
- skip: z70.never().optional()
4964
+ limit: z72.number().optional().describe("Maximum number of concept schemes to return"),
4965
+ order: z72.string().optional().describe("Order concept schemes by this field"),
4966
+ skip: z72.never().optional()
4595
4967
  }).passthrough(),
4596
4968
  // handles [key: string]: any from BasicQueryOptions
4597
- z70.object({
4598
- pageUrl: z70.string().optional()
4969
+ z72.object({
4970
+ pageUrl: z72.string().optional()
4599
4971
  })
4600
4972
  ]).optional().describe(
4601
4973
  'Query parameters for listing concept schemes, supports either pageUrl for cursor-based pagination. Offset "skip" pagination is not supported.'
@@ -4607,13 +4979,13 @@ function listConceptSchemesTool(config) {
4607
4979
  async function tool2(args) {
4608
4980
  const clientConfig = createClientConfig(config);
4609
4981
  delete clientConfig.space;
4610
- const contentfulClient = createClient8(clientConfig);
4982
+ const contentfulClient = createClient9(clientConfig);
4611
4983
  const query = {};
4612
4984
  if (args.query) {
4613
4985
  if ("pageUrl" in args.query && args.query.pageUrl) {
4614
4986
  query["pageUrl"] = args.query.pageUrl;
4615
4987
  } else {
4616
- const complexQuery = cloneDeep(args.query);
4988
+ const complexQuery = cloneDeep2(args.query);
4617
4989
  if (complexQuery["query"]) query["query"] = complexQuery["query"];
4618
4990
  if (complexQuery["pageNext"])
4619
4991
  query["pageNext"] = complexQuery["pageNext"];
@@ -4665,22 +5037,22 @@ function listConceptSchemesTool(config) {
4665
5037
  }
4666
5038
 
4667
5039
  // src/tools/taxonomies/concept-schemes/updateConceptScheme.ts
4668
- import { z as z71 } from "zod";
4669
- import { createClient as createClient9 } from "contentful-management";
4670
- var UpdateConceptSchemeToolParams = z71.object({
4671
- organizationId: z71.string().describe("The ID of the Contentful organization"),
4672
- conceptSchemeId: z71.string().describe("The ID of the concept scheme to update"),
4673
- version: z71.number().describe("The current version of the concept scheme"),
4674
- prefLabel: z71.record(z71.string()).optional().describe("The preferred label for the concept scheme (localized)"),
4675
- uri: z71.string().nullable().optional().describe("The URI for the concept scheme"),
4676
- definition: z71.record(z71.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
4677
- editorialNote: z71.record(z71.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
4678
- historyNote: z71.record(z71.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
4679
- example: z71.record(z71.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
4680
- note: z71.record(z71.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
4681
- scopeNote: z71.record(z71.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
4682
- topConcepts: z71.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme"),
4683
- addConcept: z71.string().optional().describe(
5040
+ import { z as z73 } from "zod";
5041
+ import { createClient as createClient10 } from "contentful-management";
5042
+ var UpdateConceptSchemeToolParams = z73.object({
5043
+ organizationId: z73.string().describe("The ID of the Contentful organization"),
5044
+ conceptSchemeId: z73.string().describe("The ID of the concept scheme to update"),
5045
+ version: z73.number().describe("The current version of the concept scheme"),
5046
+ prefLabel: z73.record(z73.string()).optional().describe("The preferred label for the concept scheme (localized)"),
5047
+ uri: z73.string().nullable().optional().describe("The URI for the concept scheme"),
5048
+ definition: z73.record(z73.string().nullable()).optional().describe("Definition of the concept scheme (localized)"),
5049
+ editorialNote: z73.record(z73.string().nullable()).optional().describe("Editorial note for the concept scheme (localized)"),
5050
+ historyNote: z73.record(z73.string().nullable()).optional().describe("History note for the concept scheme (localized)"),
5051
+ example: z73.record(z73.string().nullable()).optional().describe("Example for the concept scheme (localized)"),
5052
+ note: z73.record(z73.string().nullable()).optional().describe("General note for the concept scheme (localized)"),
5053
+ scopeNote: z73.record(z73.string().nullable()).optional().describe("Scope note for the concept scheme (localized)"),
5054
+ topConcepts: z73.array(TaxonomyConceptLinkSchema).optional().describe("Links to top-level concepts in this scheme"),
5055
+ addConcept: z73.string().optional().describe(
4684
5056
  "ID of a concept to add to this scheme (adds to both concepts and topConcepts)"
4685
5057
  )
4686
5058
  });
@@ -4688,7 +5060,7 @@ function updateConceptSchemeTool(config) {
4688
5060
  async function tool2(args) {
4689
5061
  const clientConfig = createClientConfig(config);
4690
5062
  delete clientConfig.space;
4691
- const contentfulClient = createClient9(clientConfig);
5063
+ const contentfulClient = createClient10(clientConfig);
4692
5064
  const params = {
4693
5065
  organizationId: args.organizationId,
4694
5066
  conceptSchemeId: args.conceptSchemeId
@@ -4755,15 +5127,15 @@ function updateConceptSchemeTool(config) {
4755
5127
  }
4756
5128
 
4757
5129
  // src/tools/taxonomies/concept-schemes/deleteConceptScheme.ts
4758
- import { z as z72 } from "zod";
4759
- import { createClient as createClient10 } from "contentful-management";
4760
- var DeleteConceptSchemeToolParams = z72.object({
4761
- organizationId: z72.string().describe("The ID of the Contentful organization"),
4762
- conceptSchemeId: z72.string().describe("The ID of the concept scheme to delete"),
4763
- confirm: z72.boolean().optional().describe(
5130
+ import { z as z74 } from "zod";
5131
+ import { createClient as createClient11 } from "contentful-management";
5132
+ var DeleteConceptSchemeToolParams = z74.object({
5133
+ organizationId: z74.string().describe("The ID of the Contentful organization"),
5134
+ conceptSchemeId: z74.string().describe("The ID of the concept scheme to delete"),
5135
+ confirm: z74.boolean().optional().describe(
4764
5136
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
4765
5137
  ),
4766
- confirmToken: z72.string().optional().describe(
5138
+ confirmToken: z74.string().optional().describe(
4767
5139
  "Token returned by the preview call; must be supplied with confirm: true."
4768
5140
  )
4769
5141
  });
@@ -4771,7 +5143,7 @@ function deleteConceptSchemeTool(config) {
4771
5143
  async function tool2(args) {
4772
5144
  const clientConfig = createClientConfig(config);
4773
5145
  delete clientConfig.space;
4774
- const contentfulClient = createClient10(clientConfig);
5146
+ const contentfulClient = createClient11(clientConfig);
4775
5147
  const conceptScheme = await contentfulClient.conceptScheme.get({
4776
5148
  organizationId: args.organizationId,
4777
5149
  conceptSchemeId: args.conceptSchemeId
@@ -4874,32 +5246,32 @@ function createConceptSchemeTools(config) {
4874
5246
  }
4875
5247
 
4876
5248
  // src/tools/taxonomies/concepts/createConcept.ts
4877
- import { z as z73 } from "zod";
4878
- import { createClient as createClient11 } from "contentful-management";
4879
- var CreateConceptToolParams = z73.object({
4880
- organizationId: z73.string().describe("The ID of the Contentful organization"),
4881
- conceptId: z73.string().optional().describe(
5249
+ import { z as z75 } from "zod";
5250
+ import { createClient as createClient12 } from "contentful-management";
5251
+ var CreateConceptToolParams = z75.object({
5252
+ organizationId: z75.string().describe("The ID of the Contentful organization"),
5253
+ conceptId: z75.string().optional().describe(
4882
5254
  "Optional user-defined ID for the concept. If not provided, Contentful will generate one automatically."
4883
5255
  ),
4884
- prefLabel: z73.record(z73.string()).describe("The preferred label for the concept (localized)"),
4885
- uri: z73.string().nullable().optional().describe("The URI for the concept"),
4886
- altLabels: z73.record(z73.array(z73.string())).optional().describe("Alternative labels for the concept (localized)"),
4887
- hiddenLabels: z73.record(z73.array(z73.string())).optional().describe("Hidden labels for the concept (localized)"),
4888
- definition: z73.record(z73.string().nullable()).optional().describe("Definition of the concept (localized)"),
4889
- editorialNote: z73.record(z73.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
4890
- historyNote: z73.record(z73.string().nullable()).optional().describe("History note for the concept (localized)"),
4891
- example: z73.record(z73.string().nullable()).optional().describe("Example for the concept (localized)"),
4892
- note: z73.record(z73.string().nullable()).optional().describe("General note for the concept (localized)"),
4893
- scopeNote: z73.record(z73.string().nullable()).optional().describe("Scope note for the concept (localized)"),
4894
- notations: z73.array(z73.string()).optional().describe("Notations for the concept"),
4895
- broader: z73.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
4896
- related: z73.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
5256
+ prefLabel: z75.record(z75.string()).describe("The preferred label for the concept (localized)"),
5257
+ uri: z75.string().nullable().optional().describe("The URI for the concept"),
5258
+ altLabels: z75.record(z75.array(z75.string())).optional().describe("Alternative labels for the concept (localized)"),
5259
+ hiddenLabels: z75.record(z75.array(z75.string())).optional().describe("Hidden labels for the concept (localized)"),
5260
+ definition: z75.record(z75.string().nullable()).optional().describe("Definition of the concept (localized)"),
5261
+ editorialNote: z75.record(z75.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
5262
+ historyNote: z75.record(z75.string().nullable()).optional().describe("History note for the concept (localized)"),
5263
+ example: z75.record(z75.string().nullable()).optional().describe("Example for the concept (localized)"),
5264
+ note: z75.record(z75.string().nullable()).optional().describe("General note for the concept (localized)"),
5265
+ scopeNote: z75.record(z75.string().nullable()).optional().describe("Scope note for the concept (localized)"),
5266
+ notations: z75.array(z75.string()).optional().describe("Notations for the concept"),
5267
+ broader: z75.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
5268
+ related: z75.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
4897
5269
  });
4898
5270
  function createConceptTool(config) {
4899
5271
  async function tool2(args) {
4900
5272
  const clientConfig = createClientConfig(config);
4901
5273
  delete clientConfig.space;
4902
- const contentfulClient = createClient11(clientConfig);
5274
+ const contentfulClient = createClient12(clientConfig);
4903
5275
  const conceptPayload = {
4904
5276
  prefLabel: args.prefLabel,
4905
5277
  ...args.uri !== void 0 && { uri: args.uri },
@@ -4928,15 +5300,15 @@ function createConceptTool(config) {
4928
5300
  }
4929
5301
 
4930
5302
  // src/tools/taxonomies/concepts/deleteConcept.ts
4931
- import { z as z74 } from "zod";
4932
- import { createClient as createClient12 } from "contentful-management";
4933
- var DeleteConceptToolParams = z74.object({
4934
- organizationId: z74.string().describe("The ID of the Contentful organization"),
4935
- conceptId: z74.string().describe("The ID of the concept to delete"),
4936
- confirm: z74.boolean().optional().describe(
5303
+ import { z as z76 } from "zod";
5304
+ import { createClient as createClient13 } from "contentful-management";
5305
+ var DeleteConceptToolParams = z76.object({
5306
+ organizationId: z76.string().describe("The ID of the Contentful organization"),
5307
+ conceptId: z76.string().describe("The ID of the concept to delete"),
5308
+ confirm: z76.boolean().optional().describe(
4937
5309
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
4938
5310
  ),
4939
- confirmToken: z74.string().optional().describe(
5311
+ confirmToken: z76.string().optional().describe(
4940
5312
  "Token returned by the preview call; must be supplied with confirm: true."
4941
5313
  )
4942
5314
  });
@@ -4944,7 +5316,7 @@ function deleteConceptTool(config) {
4944
5316
  async function tool2(args) {
4945
5317
  const clientConfig = createClientConfig(config);
4946
5318
  delete clientConfig.space;
4947
- const contentfulClient = createClient12(clientConfig);
5319
+ const contentfulClient = createClient13(clientConfig);
4948
5320
  const concept = await contentfulClient.concept.get({
4949
5321
  organizationId: args.organizationId,
4950
5322
  conceptId: args.conceptId
@@ -4973,31 +5345,31 @@ function deleteConceptTool(config) {
4973
5345
  }
4974
5346
 
4975
5347
  // src/tools/taxonomies/concepts/updateConcept.ts
4976
- import { z as z75 } from "zod";
4977
- import { createClient as createClient13 } from "contentful-management";
4978
- var UpdateConceptToolParams = z75.object({
4979
- organizationId: z75.string().describe("The ID of the Contentful organization"),
4980
- conceptId: z75.string().describe("The ID of the concept to update"),
4981
- version: z75.number().describe("The current version of the concept"),
4982
- prefLabel: z75.record(z75.string()).optional().describe("The preferred label for the concept (localized)"),
4983
- uri: z75.string().nullable().optional().describe("The URI for the concept"),
4984
- altLabels: z75.record(z75.array(z75.string())).optional().describe("Alternative labels for the concept (localized)"),
4985
- hiddenLabels: z75.record(z75.array(z75.string())).optional().describe("Hidden labels for the concept (localized)"),
4986
- definition: z75.record(z75.string().nullable()).optional().describe("Definition of the concept (localized)"),
4987
- editorialNote: z75.record(z75.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
4988
- historyNote: z75.record(z75.string().nullable()).optional().describe("History note for the concept (localized)"),
4989
- example: z75.record(z75.string().nullable()).optional().describe("Example for the concept (localized)"),
4990
- note: z75.record(z75.string().nullable()).optional().describe("General note for the concept (localized)"),
4991
- scopeNote: z75.record(z75.string().nullable()).optional().describe("Scope note for the concept (localized)"),
4992
- notations: z75.array(z75.string()).optional().describe("Notations for the concept"),
4993
- broader: z75.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
4994
- related: z75.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
5348
+ import { z as z77 } from "zod";
5349
+ import { createClient as createClient14 } from "contentful-management";
5350
+ var UpdateConceptToolParams = z77.object({
5351
+ organizationId: z77.string().describe("The ID of the Contentful organization"),
5352
+ conceptId: z77.string().describe("The ID of the concept to update"),
5353
+ version: z77.number().describe("The current version of the concept"),
5354
+ prefLabel: z77.record(z77.string()).optional().describe("The preferred label for the concept (localized)"),
5355
+ uri: z77.string().nullable().optional().describe("The URI for the concept"),
5356
+ altLabels: z77.record(z77.array(z77.string())).optional().describe("Alternative labels for the concept (localized)"),
5357
+ hiddenLabels: z77.record(z77.array(z77.string())).optional().describe("Hidden labels for the concept (localized)"),
5358
+ definition: z77.record(z77.string().nullable()).optional().describe("Definition of the concept (localized)"),
5359
+ editorialNote: z77.record(z77.string().nullable()).optional().describe("Editorial note for the concept (localized)"),
5360
+ historyNote: z77.record(z77.string().nullable()).optional().describe("History note for the concept (localized)"),
5361
+ example: z77.record(z77.string().nullable()).optional().describe("Example for the concept (localized)"),
5362
+ note: z77.record(z77.string().nullable()).optional().describe("General note for the concept (localized)"),
5363
+ scopeNote: z77.record(z77.string().nullable()).optional().describe("Scope note for the concept (localized)"),
5364
+ notations: z77.array(z77.string()).optional().describe("Notations for the concept"),
5365
+ broader: z77.array(TaxonomyConceptLinkSchema).optional().describe("Links to broader concepts"),
5366
+ related: z77.array(TaxonomyConceptLinkSchema).optional().describe("Links to related concepts")
4995
5367
  });
4996
5368
  function updateConceptTool(config) {
4997
5369
  async function tool2(args) {
4998
5370
  const clientConfig = createClientConfig(config);
4999
5371
  delete clientConfig.space;
5000
- const contentfulClient = createClient13(clientConfig);
5372
+ const contentfulClient = createClient14(clientConfig);
5001
5373
  const existingConcept = await contentfulClient.concept.get({
5002
5374
  organizationId: args.organizationId,
5003
5375
  conceptId: args.conceptId
@@ -5033,17 +5405,17 @@ function updateConceptTool(config) {
5033
5405
  }
5034
5406
 
5035
5407
  // src/tools/taxonomies/concepts/getConcept.ts
5036
- import { z as z76 } from "zod";
5037
- import { createClient as createClient14 } from "contentful-management";
5038
- var GetConceptToolParams = z76.object({
5039
- organizationId: z76.string().describe("The ID of the Contentful organization"),
5040
- conceptId: z76.string().describe("The ID of the concept to retrieve")
5408
+ import { z as z78 } from "zod";
5409
+ import { createClient as createClient15 } from "contentful-management";
5410
+ var GetConceptToolParams = z78.object({
5411
+ organizationId: z78.string().describe("The ID of the Contentful organization"),
5412
+ conceptId: z78.string().describe("The ID of the concept to retrieve")
5041
5413
  });
5042
5414
  function getConceptTool(config) {
5043
5415
  async function tool2(args) {
5044
5416
  const clientConfig = createClientConfig(config);
5045
5417
  delete clientConfig.space;
5046
- const contentfulClient = createClient14(clientConfig);
5418
+ const contentfulClient = createClient15(clientConfig);
5047
5419
  const concept = await contentfulClient.concept.get({
5048
5420
  organizationId: args.organizationId,
5049
5421
  conceptId: args.conceptId
@@ -5054,24 +5426,24 @@ function getConceptTool(config) {
5054
5426
  }
5055
5427
 
5056
5428
  // src/tools/taxonomies/concepts/listConcepts.ts
5057
- import { z as z77 } from "zod";
5058
- import { createClient as createClient15 } from "contentful-management";
5059
- var ListConceptsToolParams = z77.object({
5060
- organizationId: z77.string().describe("The ID of the Contentful organization"),
5061
- conceptId: z77.string().optional().describe("The ID of the concept (required for descendants/ancestors)"),
5062
- limit: z77.number().optional().describe("Maximum number of concepts to return"),
5063
- select: z77.string().optional().describe("Comma-separated list of fields to return"),
5064
- include: z77.number().optional().describe("Include this many levels of linked entries"),
5065
- order: z77.string().optional().describe("Order concepts by this field"),
5066
- getDescendants: z77.boolean().optional().describe("Get descendants of the specified concept (requires conceptId)"),
5067
- getAncestors: z77.boolean().optional().describe("Get ancestors of the specified concept (requires conceptId)"),
5068
- getTotalOnly: z77.boolean().optional().describe("Get only the total number of concepts without full data")
5429
+ import { z as z79 } from "zod";
5430
+ import { createClient as createClient16 } from "contentful-management";
5431
+ var ListConceptsToolParams = z79.object({
5432
+ organizationId: z79.string().describe("The ID of the Contentful organization"),
5433
+ conceptId: z79.string().optional().describe("The ID of the concept (required for descendants/ancestors)"),
5434
+ limit: z79.number().optional().describe("Maximum number of concepts to return"),
5435
+ select: z79.string().optional().describe("Comma-separated list of fields to return"),
5436
+ include: z79.number().optional().describe("Include this many levels of linked entries"),
5437
+ order: z79.string().optional().describe("Order concepts by this field"),
5438
+ getDescendants: z79.boolean().optional().describe("Get descendants of the specified concept (requires conceptId)"),
5439
+ getAncestors: z79.boolean().optional().describe("Get ancestors of the specified concept (requires conceptId)"),
5440
+ getTotalOnly: z79.boolean().optional().describe("Get only the total number of concepts without full data")
5069
5441
  });
5070
5442
  function listConceptsTool(config) {
5071
5443
  async function tool2(args) {
5072
5444
  const clientConfig = createClientConfig(config);
5073
5445
  delete clientConfig.space;
5074
- const contentfulClient = createClient15(clientConfig);
5446
+ const contentfulClient = createClient16(clientConfig);
5075
5447
  if ((args.getDescendants || args.getAncestors) && !args.conceptId) {
5076
5448
  throw new Error(
5077
5449
  "conceptId is required when getting descendants or ancestors"
@@ -5243,8 +5615,8 @@ function createTaxonomyTools(config) {
5243
5615
  }
5244
5616
 
5245
5617
  // src/tools/usage/getUsages.ts
5246
- import { z as z78 } from "zod";
5247
- import { createClient as createClient16 } from "contentful-management";
5618
+ import { z as z80 } from "zod";
5619
+ import { createClient as createClient17 } from "contentful-management";
5248
5620
  var AGGREGATED_USAGE_METRIC_KEYS = [
5249
5621
  "api_call_cma",
5250
5622
  "api_call_cpa",
@@ -5256,35 +5628,35 @@ var AGGREGATED_USAGE_METRIC_KEYS = [
5256
5628
  "ai_action_word_count",
5257
5629
  "ai_consumption_unit"
5258
5630
  ];
5259
- var FilterValueSchema = z78.union([
5260
- z78.string().min(1),
5261
- z78.array(z78.string().min(1)).min(1).max(10)
5631
+ var FilterValueSchema = z80.union([
5632
+ z80.string().min(1),
5633
+ z80.array(z80.string().min(1)).min(1).max(10)
5262
5634
  ]);
5263
- var GetUsagesToolParams = z78.object({
5264
- organizationId: z78.string().optional().describe(
5635
+ var GetUsagesToolParams = z80.object({
5636
+ organizationId: z80.string().optional().describe(
5265
5637
  "Organization ID. If omitted, falls back to the ORGANIZATION_ID configured on the server."
5266
5638
  ),
5267
- metricKey: z78.enum(AGGREGATED_USAGE_METRIC_KEYS).describe(
5639
+ metricKey: z80.enum(AGGREGATED_USAGE_METRIC_KEYS).describe(
5268
5640
  '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
5641
  ),
5270
- dateGte: z78.string().describe(
5642
+ dateGte: z80.string().describe(
5271
5643
  "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
5644
  ),
5273
- dateLte: z78.string().describe(
5645
+ dateLte: z80.string().describe(
5274
5646
  "End date (inclusive) in ISO-8601 format (YYYY-MM-DD or full date-time). Sent as query param date[lte]."
5275
5647
  ),
5276
- granularity: z78.enum(["P1D", "P1M"]).optional().describe(
5648
+ granularity: z80.enum(["P1D", "P1M"]).optional().describe(
5277
5649
  '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
5650
  ),
5279
- group: z78.string().optional().describe(
5651
+ group: z80.string().optional().describe(
5280
5652
  '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
5653
  ),
5282
- filter: z78.record(z78.string(), FilterValueSchema).optional().describe(
5654
+ filter: z80.record(z80.string(), FilterValueSchema).optional().describe(
5283
5655
  '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
5656
  ),
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(
5657
+ limit: z80.number().int().positive().max(1e3).optional().describe("Maximum number of items to return (1\u20131000, default 1000)."),
5658
+ skip: z80.number().int().min(0).max(1e4).optional().describe("Number of items to skip for pagination (0\u201310000, default 0)."),
5659
+ order: z80.string().optional().describe(
5288
5660
  '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
5661
  )
5290
5662
  });
@@ -5316,7 +5688,7 @@ function getUsagesTool(config) {
5316
5688
  "organizationId is required (either as a tool argument or via the ORGANIZATION_ID env var)."
5317
5689
  );
5318
5690
  }
5319
- const client = createClient16(createClientConfig(config), { type: "plain" });
5691
+ const client = createClient17(createClientConfig(config), { type: "plain" });
5320
5692
  const metricKey = args.metricKey;
5321
5693
  const collection = await client.raw.get(
5322
5694
  `/organizations/${organizationId}/usages/${metricKey}`,
@@ -5357,54 +5729,54 @@ function createUsageTools(config) {
5357
5729
  }
5358
5730
 
5359
5731
  // src/tools/jobs/space-to-space-migration/exportSpace.ts
5360
- import { z as z80 } from "zod";
5732
+ import { z as z82 } from "zod";
5361
5733
 
5362
5734
  // src/types/querySchema.ts
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")
5735
+ import { z as z81 } from "zod";
5736
+ var EntryQuerySchema = z81.object({
5737
+ content_type: z81.string().optional().describe("Filter by content type"),
5738
+ include: z81.number().optional().describe("Include this many levels of linked entries"),
5739
+ select: z81.string().optional().describe("Comma-separated list of fields to return"),
5740
+ links_to_entry: z81.string().optional().describe("Find entries that link to the specified entry ID"),
5741
+ limit: z81.number().optional().describe("Maximum number of entries to return"),
5742
+ skip: z81.number().optional().describe("Skip this many entries"),
5743
+ order: z81.string().optional().describe("Order entries by this field")
5744
+ });
5745
+ var AssetQuerySchema = z81.object({
5746
+ mimetype_group: z81.string().optional().describe("Filter by MIME type group"),
5747
+ select: z81.string().optional().describe("Comma-separated list of fields to return"),
5748
+ limit: z81.number().optional().describe("Maximum number of assets to return"),
5749
+ skip: z81.number().optional().describe("Skip this many assets"),
5750
+ order: z81.string().optional().describe("Order assets by this field")
5379
5751
  });
5380
5752
 
5381
5753
  // src/tools/jobs/space-to-space-migration/exportSpace.ts
5382
5754
  var ExportSpaceToolParams = BaseToolSchema.extend({
5383
- exportDir: z80.string().optional().describe(
5755
+ exportDir: z82.string().optional().describe(
5384
5756
  "Directory to save the exported space data (optional, defaults to current directory)"
5385
5757
  ),
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"),
5758
+ saveFile: z82.boolean().optional().default(true).describe("Save the exported space data to a file"),
5759
+ contentFile: z82.string().optional().describe("Custom filename for the exported space data (optional)"),
5760
+ includeDrafts: z82.boolean().optional().default(false).describe("Include draft entries in the export"),
5761
+ includeArchived: z82.boolean().optional().default(false).describe("Include archived entries in the export"),
5762
+ skipContentModel: z82.boolean().optional().default(false).describe("Skip exporting content types"),
5763
+ skipEditorInterfaces: z82.boolean().optional().default(false).describe("Skip exporting editor interfaces"),
5764
+ skipContent: z82.boolean().optional().default(false).describe("Skip exporting entries and assets"),
5765
+ skipRoles: z82.boolean().optional().default(false).describe("Skip exporting roles and permissions"),
5766
+ skipTags: z82.boolean().optional().default(false).describe("Skip exporting tags"),
5767
+ skipWebhooks: z82.boolean().optional().default(false).describe("Skip exporting webhooks"),
5768
+ stripTags: z82.boolean().optional().default(false).describe("Untag assets and entries"),
5769
+ contentOnly: z82.boolean().optional().default(false).describe("Only export assets and entries"),
5398
5770
  queryEntries: EntryQuerySchema.optional().describe(
5399
5771
  "Export only entries that match query parameters"
5400
5772
  ),
5401
5773
  queryAssets: AssetQuerySchema.optional().describe(
5402
5774
  "Export only assets that match query parameters"
5403
5775
  ),
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")
5776
+ downloadAssets: z82.boolean().optional().default(false).describe("Download actual asset files"),
5777
+ maxAllowedLimit: z82.number().optional().default(1e3).describe("Maximum number of items per request"),
5778
+ errorLogFile: z82.string().optional().describe("Path to error log output file"),
5779
+ useVerboseRenderer: z82.boolean().optional().describe("Line-by-line logging, useful for CI")
5408
5780
  });
5409
5781
  function createExportSpaceTool(config) {
5410
5782
  async function tool2(args) {
@@ -5445,79 +5817,77 @@ function createExportSpaceTool(config) {
5445
5817
  editorInterfaces: result.editorInterfaces?.length || 0
5446
5818
  });
5447
5819
  } catch (error) {
5448
- throw new Error(
5449
- `Failed to export space: ${error instanceof Error ? error.message : String(error)}`
5450
- );
5820
+ throw new Error(`Failed to export space: ${formatErrorMessage(error)}`);
5451
5821
  }
5452
5822
  }
5453
5823
  return withErrorHandling(tool2, "Error exporting space");
5454
5824
  }
5455
5825
 
5456
5826
  // src/tools/jobs/space-to-space-migration/paramCollection.ts
5457
- import { z as z81 } from "zod";
5827
+ import { z as z83 } from "zod";
5458
5828
  var ParamCollectionToolParams = BaseToolSchema.extend({
5459
- confirmation: z81.boolean().optional().describe(
5829
+ confirmation: z83.boolean().optional().describe(
5460
5830
  "User confirmation that they are ready to proceed with the workflow"
5461
5831
  ),
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"),
5832
+ export: z83.object({
5833
+ spaceId: z83.string().optional().describe("ID of the space with source data"),
5834
+ environmentId: z83.string().optional().describe("ID of the environment in the source space"),
5835
+ deliveryToken: z83.string().optional().describe("CDA token to export only published content (excludes tags)"),
5836
+ exportDir: z83.string().optional().describe("Path to export JSON output"),
5837
+ saveFile: z83.boolean().optional().describe("Save the export as a JSON file"),
5838
+ contentFile: z83.string().optional().describe("Filename for exported data"),
5839
+ includeDrafts: z83.boolean().optional().describe("Include drafts in exported entries"),
5840
+ includeArchived: z83.boolean().optional().describe("Include archived entries"),
5841
+ skipContentModel: z83.boolean().optional().describe("Skip exporting content models"),
5842
+ skipEditorInterfaces: z83.boolean().optional().describe("Skip exporting editor interfaces"),
5843
+ skipContent: z83.boolean().optional().describe("Skip exporting entries and assets"),
5844
+ skipRoles: z83.boolean().optional().describe("Skip exporting roles and permissions"),
5845
+ skipTags: z83.boolean().optional().describe("Skip exporting tags"),
5846
+ skipWebhooks: z83.boolean().optional().describe("Skip exporting webhooks"),
5847
+ stripTags: z83.boolean().optional().describe("Remove tags from entries and assets"),
5848
+ contentOnly: z83.boolean().optional().describe("Export only entries and assets"),
5479
5849
  queryEntries: EntryQuerySchema.optional().describe(
5480
5850
  "Export only entries that match query parameters"
5481
5851
  ),
5482
5852
  queryAssets: AssetQuerySchema.optional().describe(
5483
5853
  "Export only assets that match query parameters"
5484
5854
  ),
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")
5855
+ downloadAssets: z83.boolean().optional().describe("Download asset files to disk"),
5856
+ host: z83.string().optional().describe("Management API host"),
5857
+ hostDelivery: z83.string().optional().describe("Delivery API host"),
5858
+ proxy: z83.string().optional().describe("HTTP/HTTPS proxy config"),
5859
+ rawProxy: z83.boolean().optional().describe("Pass raw proxy config directly to Axios"),
5860
+ maxAllowedLimit: z83.number().optional().describe("Page size for requests"),
5861
+ headers: z83.record(z83.any()).optional().describe("Additional headers to include in requests"),
5862
+ errorLogFile: z83.string().optional().describe("Path to error log output file"),
5863
+ useVerboseRenderer: z83.boolean().optional().describe("Line-by-line logging, useful for CI"),
5864
+ config: z83.string().optional().describe("Path to a JSON config file with all options")
5495
5865
  }).optional(),
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(
5866
+ import: z83.object({
5867
+ spaceId: z83.string().optional().describe("ID of the space to import into"),
5868
+ environmentId: z83.string().optional().describe("Target environment in destination space"),
5869
+ contentFile: z83.string().optional().describe("Path to JSON file containing the content to import"),
5870
+ content: z83.record(z83.any()).optional().describe(
5501
5871
  "JS object containing import content (must match expected structure)"
5502
5872
  ),
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)")
5873
+ contentModelOnly: z83.boolean().optional().describe("Import only content types"),
5874
+ skipContentModel: z83.boolean().optional().describe("Skip importing content types and locales"),
5875
+ skipLocales: z83.boolean().optional().describe("Skip importing locales"),
5876
+ skipContentUpdates: z83.boolean().optional().describe("Do not update existing content"),
5877
+ skipContentPublishing: z83.boolean().optional().describe("Create but do not publish content"),
5878
+ uploadAssets: z83.boolean().optional().describe("Upload asset files (requires assetsDirectory)"),
5879
+ skipAssetUpdates: z83.boolean().optional().describe("Do not update existing assets"),
5880
+ assetsDirectory: z83.string().optional().describe("Path to directory containing exported asset files"),
5881
+ timeout: z83.number().optional().describe("Time between retries during asset processing (ms)"),
5882
+ retryLimit: z83.number().optional().describe("Max retries for asset processing"),
5883
+ host: z83.string().optional().describe("Management API host"),
5884
+ proxy: z83.string().optional().describe("HTTP/HTTPS proxy string (host:port or user:pass@host:port)"),
5885
+ rawProxy: z83.boolean().optional().describe("Pass proxy config directly to Axios"),
5886
+ rateLimit: z83.number().optional().describe("Max requests per second to the API"),
5887
+ headers: z83.record(z83.any()).optional().describe("Additional headers to attach to requests"),
5888
+ errorLogFile: z83.string().optional().describe("Path to error log file"),
5889
+ useVerboseRenderer: z83.boolean().optional().describe("Line-by-line progress output (good for CI)"),
5890
+ config: z83.string().optional().describe("Path to config JSON file (merged with CLI args)")
5521
5891
  }).optional()
5522
5892
  });
5523
5893
  var paramCollectionConfig = {
@@ -5633,25 +6003,25 @@ var createParamCollectionTool = withErrorHandling(
5633
6003
  );
5634
6004
 
5635
6005
  // src/tools/jobs/space-to-space-migration/importSpace.ts
5636
- import { z as z82 } from "zod";
6006
+ import { z as z84 } from "zod";
5637
6007
  var ImportSpaceToolParams = BaseToolSchema.extend({
5638
- contentFile: z82.string().optional().describe("Path to JSON file containing the content to import"),
5639
- content: z82.record(z82.any()).optional().describe(
6008
+ contentFile: z84.string().optional().describe("Path to JSON file containing the content to import"),
6009
+ content: z84.record(z84.any()).optional().describe(
5640
6010
  "JS object containing import content (must match expected structure)"
5641
6011
  ),
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)")
6012
+ contentModelOnly: z84.boolean().optional().default(false).describe("Import only content types"),
6013
+ skipContentModel: z84.boolean().optional().default(false).describe("Skip importing content types and locales"),
6014
+ skipLocales: z84.boolean().optional().default(false).describe("Skip importing locales"),
6015
+ skipContentUpdates: z84.boolean().optional().default(false).describe("Do not update existing content"),
6016
+ skipContentPublishing: z84.boolean().optional().default(false).describe("Create but do not publish content"),
6017
+ uploadAssets: z84.boolean().optional().default(false).describe("Upload asset files (requires assetsDirectory)"),
6018
+ skipAssetUpdates: z84.boolean().optional().default(false).describe("Do not update existing assets"),
6019
+ assetsDirectory: z84.string().optional().describe("Path to directory containing exported asset files"),
6020
+ timeout: z84.number().optional().default(3e3).describe("Time between retries during asset processing (ms)"),
6021
+ retryLimit: z84.number().optional().default(10).describe("Max retries for asset processing"),
6022
+ rateLimit: z84.number().optional().default(7).describe("Max requests per second to the API"),
6023
+ errorLogFile: z84.string().optional().describe("Path to error log file"),
6024
+ useVerboseRenderer: z84.boolean().optional().describe("Line-by-line progress output (good for CI)")
5655
6025
  });
5656
6026
  function createImportSpaceTool(config) {
5657
6027
  async function tool2(args) {
@@ -5687,16 +6057,14 @@ function createImportSpaceTool(config) {
5687
6057
  editorInterfaces: result.editorInterfaces?.length || 0
5688
6058
  });
5689
6059
  } catch (error) {
5690
- throw new Error(
5691
- `Failed to import space: ${error instanceof Error ? error.message : String(error)}`
5692
- );
6060
+ throw new Error(`Failed to import space: ${formatErrorMessage(error)}`);
5693
6061
  }
5694
6062
  }
5695
6063
  return withErrorHandling(tool2, "Error importing space");
5696
6064
  }
5697
6065
 
5698
6066
  // src/tools/jobs/space-to-space-migration/migrationHandler.ts
5699
- import { z as z83 } from "zod";
6067
+ import { z as z85 } from "zod";
5700
6068
 
5701
6069
  // src/tools/jobs/space-to-space-migration/instructions.ts
5702
6070
  var S2S_MIGRATION_INSTRUCTIONS = `
@@ -5739,7 +6107,7 @@ The space to space migration workflow has been concluded and all related tools h
5739
6107
  The workflow is now complete. You can start a new migration workflow by calling space_to_space_migration_handler with enableWorkflow=true if needed.
5740
6108
  `;
5741
6109
  var SpaceToSpaceMigrationHandlerToolParams = BaseToolSchema.extend({
5742
- enableWorkflow: z83.boolean().describe(
6110
+ enableWorkflow: z85.boolean().describe(
5743
6111
  "Set to true to enable the workflow tools, false to disable them and conclude the workflow"
5744
6112
  )
5745
6113
  });
@@ -5837,9 +6205,9 @@ function createJobTools(config) {
5837
6205
  }
5838
6206
 
5839
6207
  // src/tools/exo/components/getComponent.ts
5840
- import { z as z84 } from "zod";
6208
+ import { z as z86 } from "zod";
5841
6209
  var GetComponentToolParams = BaseToolSchema.extend({
5842
- componentId: z84.string().describe("The ID of the component to retrieve details for")
6210
+ componentId: z86.string().describe("The ID of the component to retrieve details for")
5843
6211
  });
5844
6212
  function getComponentTool(config) {
5845
6213
  async function tool2(args) {
@@ -5857,12 +6225,12 @@ function getComponentTool(config) {
5857
6225
  }
5858
6226
 
5859
6227
  // src/tools/exo/components/listComponents.ts
5860
- import { z as z85 } from "zod";
6228
+ import { z as z87 } from "zod";
5861
6229
  var ListComponentsToolParams = BaseToolSchema.extend({
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)")
6230
+ limit: z87.number().optional().describe("Maximum number of components to return (max 10)"),
6231
+ pageNext: z87.string().optional().describe("Cursor token to fetch the next page of results"),
6232
+ pagePrev: z87.string().optional().describe("Cursor token to fetch the previous page of results"),
6233
+ order: z87.string().optional().describe("Order components by this field (e.g. sys.createdAt)")
5866
6234
  });
5867
6235
  function listComponentsTool(config) {
5868
6236
  async function tool2(args) {
@@ -5892,10 +6260,10 @@ function listComponentsTool(config) {
5892
6260
  }
5893
6261
 
5894
6262
  // src/tools/exo/components/createComponent.ts
5895
- import { z as z87 } from "zod";
6263
+ import { z as z89 } from "zod";
5896
6264
 
5897
6265
  // src/types/exoSchemas.ts
5898
- import { z as z86 } from "zod";
6266
+ import { z as z88 } from "zod";
5899
6267
  var URN_EXAMPLES = {
5900
6268
  "Contentful:Component": "crn:contentful:::experience:spaces/{spaceId}/environments/{envId}/components/{id}",
5901
6269
  "Contentful:ExperienceFragment": "crn:contentful:::experience:spaces/{spaceId}/environments/{envId}/experienceFragments/{id}",
@@ -5905,19 +6273,19 @@ var URN_EXAMPLES = {
5905
6273
  var resourceLinkSchema2 = (linkType) => {
5906
6274
  const example = URN_EXAMPLES[linkType];
5907
6275
  const urnDesc = example ? `URN of the linked resource (e.g. "${example}")` : "URN of the linked resource";
5908
- return z86.object({
5909
- sys: z86.object({
5910
- type: z86.literal("ResourceLink"),
5911
- linkType: z86.literal(linkType),
5912
- urn: z86.string().describe(urnDesc)
6276
+ return z88.object({
6277
+ sys: z88.object({
6278
+ type: z88.literal("ResourceLink"),
6279
+ linkType: z88.literal(linkType),
6280
+ urn: z88.string().describe(urnDesc)
5913
6281
  })
5914
6282
  });
5915
6283
  };
5916
- var linkSchema2 = (linkType) => z86.object({
5917
- sys: z86.object({
5918
- type: z86.literal("Link"),
5919
- linkType: z86.literal(linkType),
5920
- id: z86.string()
6284
+ var linkSchema2 = (linkType) => z88.object({
6285
+ sys: z88.object({
6286
+ type: z88.literal("Link"),
6287
+ linkType: z88.literal(linkType),
6288
+ id: z88.string()
5921
6289
  })
5922
6290
  });
5923
6291
  var ComponentResourceLinkSchema = resourceLinkSchema2(
@@ -5929,71 +6297,71 @@ var ExperienceFragmentResourceLinkSchema = resourceLinkSchema2(
5929
6297
  var ExperienceTemplateResourceLinkSchema = resourceLinkSchema2(
5930
6298
  "Contentful:ExperienceTemplate"
5931
6299
  );
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()
6300
+ var ViewportSchema = z88.object({
6301
+ id: z88.string().describe("Viewport identifier"),
6302
+ query: z88.string().describe("CSS media query string"),
6303
+ displayName: z88.string().describe("Human-readable viewport name"),
6304
+ previewSize: z88.string().describe('Preview size (e.g. "1024px")')
6305
+ });
6306
+ var DataTypeDefinitionSchema = z88.lazy(
6307
+ () => z88.discriminatedUnion("type", [
6308
+ z88.object({
6309
+ type: z88.enum(["String", "Number", "Integer", "Boolean"]),
6310
+ name: z88.string().optional(),
6311
+ required: z88.boolean().optional()
5944
6312
  }),
5945
- z86.object({
5946
- type: z86.literal("RichText"),
5947
- name: z86.string().optional(),
5948
- required: z86.boolean().optional()
6313
+ z88.object({
6314
+ type: z88.literal("RichText"),
6315
+ name: z88.string().optional(),
6316
+ required: z88.boolean().optional()
5949
6317
  }),
5950
- z86.object({
5951
- type: z86.literal("Array"),
5952
- name: z86.string().optional(),
5953
- required: z86.boolean().optional(),
6318
+ z88.object({
6319
+ type: z88.literal("Array"),
6320
+ name: z88.string().optional(),
6321
+ required: z88.boolean().optional(),
5954
6322
  items: DataTypeDefinitionSchema
5955
6323
  }),
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)
6324
+ z88.object({
6325
+ type: z88.literal("Record"),
6326
+ name: z88.string().optional(),
6327
+ required: z88.boolean().optional(),
6328
+ fields: z88.record(z88.string(), DataTypeDefinitionSchema)
5961
6329
  }),
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()
6330
+ z88.object({
6331
+ type: z88.literal("TypeRef"),
6332
+ name: z88.string().optional(),
6333
+ required: z88.boolean().optional(),
6334
+ ref: z88.object({
6335
+ sys: z88.object({
6336
+ type: z88.literal("ResourceLink"),
6337
+ linkType: z88.string(),
6338
+ urn: z88.string()
5971
6339
  })
5972
6340
  })
5973
6341
  }),
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"),
6342
+ z88.object({
6343
+ type: z88.literal("Literal"),
6344
+ name: z88.string().optional(),
6345
+ required: z88.boolean().optional(),
6346
+ value: z88.custom().describe("JSON literal value"),
5979
6347
  valueType: DataTypeDefinitionSchema
5980
6348
  }),
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)
6349
+ z88.object({
6350
+ type: z88.literal("DiscriminatedUnion"),
6351
+ name: z88.string().optional(),
6352
+ required: z88.boolean().optional(),
6353
+ discriminator: z88.string(),
6354
+ members: z88.array(DataTypeDefinitionSchema)
5987
6355
  })
5988
6356
  ])
5989
6357
  );
5990
- var ContentPropertySchema = z86.intersection(
6358
+ var ContentPropertySchema = z88.intersection(
5991
6359
  DataTypeDefinitionSchema,
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")
6360
+ z88.object({
6361
+ id: z88.string().describe("Content property identifier"),
6362
+ name: z88.string().describe("Human-readable name"),
6363
+ required: z88.boolean().describe("Whether the property is required"),
6364
+ defaultValue: z88.unknown().optional().describe("Default value")
5997
6365
  })
5998
6366
  );
5999
6367
  var DTCG_DESIGN_PROPERTY_TYPES = [
@@ -6011,186 +6379,189 @@ var DTCG_DESIGN_PROPERTY_TYPES = [
6011
6379
  "DTCG.Gradient",
6012
6380
  "DTCG.Typography"
6013
6381
  ];
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")
6382
+ var DesignPropertyCommonFieldsSchema = z88.object({
6383
+ id: z88.string().describe("Design property identifier"),
6384
+ name: z88.string().describe("Human-readable name"),
6385
+ description: z88.string().optional().describe("Optional description")
6018
6386
  });
6019
6387
  var StringDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend({
6020
- type: z86.literal("String"),
6021
- fallbackValue: z86.object({
6022
- type: z86.literal("ManualDesignValue"),
6023
- value: z86.string()
6388
+ type: z88.literal("String"),
6389
+ fallbackValue: z88.object({
6390
+ type: z88.literal("ManualDesignValue"),
6391
+ value: z88.string()
6024
6392
  }).optional().describe("Manual fallback value for this design property"),
6025
- validations: z86.array(
6026
- z86.object({
6027
- regexp: z86.object({
6028
- pattern: z86.string().describe("Regular expression pattern")
6393
+ validations: z88.array(
6394
+ z88.object({
6395
+ regexp: z88.object({
6396
+ pattern: z88.string().describe("Regular expression pattern")
6029
6397
  })
6030
6398
  })
6031
6399
  ).optional().describe("Regexp validations constraining allowed string values")
6032
6400
  });
6033
6401
  var BooleanDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend({
6034
- type: z86.literal("Boolean"),
6035
- fallbackValue: z86.object({
6036
- type: z86.literal("ManualDesignValue"),
6037
- value: z86.boolean()
6402
+ type: z88.literal("Boolean"),
6403
+ fallbackValue: z88.object({
6404
+ type: z88.literal("ManualDesignValue"),
6405
+ value: z88.boolean()
6038
6406
  }).optional().describe("Manual fallback value for this design property")
6039
6407
  });
6040
- var DesignTokenValueSchema = z86.object({
6041
- type: z86.literal("DesignToken"),
6042
- value: z86.string().min(1).describe("Design token reference (non-empty)")
6408
+ var DesignTokenValueSchema = z88.object({
6409
+ type: z88.literal("DesignToken"),
6410
+ value: z88.string().min(1).describe("Design token reference (non-empty)")
6043
6411
  });
6044
6412
  var TokenBackedDesignPropertySchema = DesignPropertyCommonFieldsSchema.extend(
6045
6413
  {
6046
- type: z86.enum(DTCG_DESIGN_PROPERTY_TYPES),
6414
+ type: z88.enum(DTCG_DESIGN_PROPERTY_TYPES),
6047
6415
  fallbackValue: DesignTokenValueSchema.optional().describe(
6048
6416
  "Design-token-backed fallback value for this design property"
6049
6417
  ),
6050
- allowedResources: z86.array(
6051
- z86.object({
6052
- type: z86.literal("DesignToken"),
6053
- value: z86.string(),
6054
- name: z86.string().optional()
6418
+ allowedResources: z88.array(
6419
+ z88.object({
6420
+ type: z88.literal("DesignToken"),
6421
+ value: z88.string(),
6422
+ name: z88.string().optional()
6055
6423
  })
6056
6424
  ).optional().describe("Allowed design token resources")
6057
6425
  }
6058
6426
  );
6059
- var DesignPropertySchema = z86.union([
6427
+ var DesignPropertySchema = z88.union([
6060
6428
  StringDesignPropertySchema,
6061
6429
  BooleanDesignPropertySchema,
6062
6430
  TokenBackedDesignPropertySchema
6063
6431
  ]);
6064
- var ManualDesignValueSchema = z86.object({
6065
- type: z86.literal("ManualDesignValue"),
6066
- value: z86.union([z86.string(), z86.number(), z86.boolean()])
6432
+ var ManualDesignValueSchema = z88.object({
6433
+ type: z88.literal("ManualDesignValue"),
6434
+ value: z88.union([z88.string(), z88.number(), z88.boolean()])
6067
6435
  });
6068
- var DesignPropertyValueSchema = z86.union([
6436
+ var DesignPropertyValueSchema = z88.union([
6069
6437
  ManualDesignValueSchema,
6070
6438
  DesignTokenValueSchema
6071
6439
  ]);
6072
- var DesignPropertyPointerValueSchema = z86.custom(
6440
+ var DesignPropertyPointerValueSchema = z88.custom(
6073
6441
  (val) => typeof val === "string" && /^\$designProperties\//.test(val),
6074
6442
  { message: 'Must be a "$designProperties/..." pointer' }
6075
6443
  );
6076
- var DimensionedDesignPropertyValueSchema = z86.record(
6077
- z86.string(),
6444
+ var DimensionedDesignPropertyValueSchema = z88.record(
6445
+ z88.string(),
6078
6446
  DesignPropertyValueSchema
6079
6447
  );
6080
- var ComponentTreeDesignPropertyValueSchema = z86.union([
6448
+ var ComponentTreeDesignPropertyValueSchema = z88.union([
6081
6449
  DesignPropertyValueSchema,
6082
6450
  DesignPropertyPointerValueSchema,
6083
6451
  DimensionedDesignPropertyValueSchema
6084
6452
  ]);
6085
6453
  var COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE = "crn:contentful:::experience:spaces/$self/environments/$self";
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()
6454
+ var SlotDefinitionSchema = z88.object({
6455
+ id: z88.string().describe("Slot identifier"),
6456
+ name: z88.string().describe("Human-readable name"),
6457
+ required: z88.boolean().describe("Whether the slot must be filled"),
6458
+ validations: z88.array(
6459
+ z88.object({
6460
+ size: z88.object({
6461
+ min: z88.number().optional(),
6462
+ max: z88.number().optional()
6095
6463
  }).optional()
6096
6464
  })
6097
6465
  ).describe("Slot cardinality validations"),
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")
6466
+ allowedResources: z88.array(
6467
+ z88.object({
6468
+ type: z88.literal("Contentful:Component"),
6469
+ source: z88.literal(COMPONENT_TYPE_ALLOWED_RESOURCE_SOURCE),
6470
+ allowedTypes: z88.array(z88.string()).describe("IDs of components allowed in this slot")
6103
6471
  })
6104
6472
  ).optional().describe("Constrains which components may be placed in this slot")
6105
6473
  });
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"'),
6474
+ var ExperienceFragmentNodeSchema = z88.object({
6475
+ id: z88.string().describe("Node identifier"),
6476
+ name: z88.string().optional().describe("Optional display name"),
6477
+ nodeType: z88.literal("ExperienceFragment").describe('Must be "ExperienceFragment"'),
6110
6478
  experienceFragment: ExperienceFragmentResourceLinkSchema.describe(
6111
6479
  "Resource link to the referenced experience fragment"
6112
6480
  )
6113
6481
  });
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")
6482
+ var SlotNodeSchema = z88.object({
6483
+ id: z88.string().describe("Node identifier"),
6484
+ nodeType: z88.literal("Slot").describe('Must be "Slot"'),
6485
+ slotId: z88.string().describe("ID of the slot definition to render")
6118
6486
  });
6119
- var TreeNodeSchema = z86.lazy(
6120
- () => z86.union([ComponentNodeSchema, ExperienceFragmentNodeSchema, SlotNodeSchema])
6487
+ var TreeNodeSchema = z88.lazy(
6488
+ () => z88.union([ComponentNodeSchema, ExperienceFragmentNodeSchema, SlotNodeSchema])
6121
6489
  );
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"'),
6490
+ var ComponentNodeSchema = z88.lazy(
6491
+ () => z88.object({
6492
+ id: z88.string().describe("Node identifier"),
6493
+ name: z88.string().optional().describe("Optional display name"),
6494
+ nodeType: z88.literal("Component").describe('Must be "Component"'),
6127
6495
  component: ComponentResourceLinkSchema.describe(
6128
6496
  "Resource link to the component to render"
6129
6497
  ),
6130
- contentProperties: z86.union([
6131
- z86.record(z86.string(), z86.unknown()),
6132
- z86.string().describe('"$contentProperties/..." pointer')
6498
+ contentProperties: z88.union([
6499
+ z88.record(z88.string(), z88.unknown()),
6500
+ z88.string().describe('"$contentProperties/..." pointer')
6133
6501
  ]).describe(
6134
6502
  'Content property bindings \u2014 values or "$contentProperties/..." pointers'
6135
6503
  ),
6136
- designProperties: z86.record(z86.string(), ComponentTreeDesignPropertyValueSchema).describe(
6504
+ designProperties: z88.record(z88.string(), ComponentTreeDesignPropertyValueSchema).describe(
6137
6505
  'Design property values \u2014 ManualDesignValue, DesignTokenValue, or "$designProperties/..." pointers'
6138
6506
  ),
6139
- slots: z86.record(z86.string(), z86.array(TreeNodeSchema)).describe("Child tree nodes keyed by slot ID")
6507
+ slots: z88.record(z88.string(), z88.array(TreeNodeSchema)).describe("Child tree nodes keyed by slot ID")
6140
6508
  })
6141
6509
  );
6142
6510
  var TagLinkSchema = linkSchema2("Tag");
6143
6511
  var ConceptLinkSchema = linkSchema2("TaxonomyConcept");
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")
6512
+ var ExoMetadataSchema = z88.object({
6513
+ tags: z88.array(TagLinkSchema).optional().describe("Tags attached to this entity"),
6514
+ concepts: z88.array(ConceptLinkSchema).optional().describe("Taxonomy concepts attached to this entity")
6147
6515
  });
6148
6516
  var ExperienceMetadataSchema = ExoMetadataSchema.extend({
6149
- name: z86.string().optional().describe("Variant label for this metadata entry")
6517
+ name: z88.string().optional().describe("Variant label for this metadata entry")
6150
6518
  });
6151
6519
  var DataAssemblyResourceLinkSchema = resourceLinkSchema2(
6152
6520
  "Contentful:DataAssembly"
6153
6521
  );
6154
- var ExperienceContentBindingsSchema = z86.object({
6522
+ var ExperienceContentBindingsSchema = z88.object({
6155
6523
  sys: DataAssemblyResourceLinkSchema.shape.sys,
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()
6524
+ parameters: z88.record(
6525
+ z88.string(),
6526
+ z88.object({
6527
+ sys: z88.object({
6528
+ type: z88.literal("ResourceLink"),
6529
+ linkType: z88.string(),
6530
+ urn: z88.string()
6163
6531
  })
6164
6532
  })
6165
6533
  ).describe("Parameter bindings keyed by parameter ID")
6166
6534
  });
6167
- var InlineExperienceFragmentNodeSchema = z86.lazy(
6168
- () => z86.object({
6169
- id: z86.string().describe("Node identifier"),
6170
- nodeType: z86.literal("InlineExperienceFragment").describe('Must be "InlineExperienceFragment"'),
6535
+ var InlineExperienceFragmentNodeSchema = z88.lazy(
6536
+ () => z88.object({
6537
+ id: z88.string().describe("Node identifier"),
6538
+ nodeType: z88.literal("InlineExperienceFragment").describe('Must be "InlineExperienceFragment"'),
6171
6539
  component: ComponentResourceLinkSchema.describe(
6172
6540
  "Resource link to the component this inline experience fragment renders"
6173
6541
  ),
6174
- designProperties: z86.record(z86.string(), DimensionedDesignPropertyValueSchema).describe("Design property values for this inline experience fragment"),
6542
+ designProperties: z88.record(z88.string(), DimensionedDesignPropertyValueSchema).describe("Design property values for this inline experience fragment"),
6175
6543
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
6176
6544
  "Optional content bindings linking this inline experience fragment to a data assembly"
6177
6545
  ),
6178
- slots: z86.record(z86.string(), z86.array(ExperienceSlotNodeSchema)).optional().describe("Child slot contents keyed by slot ID")
6546
+ slots: z88.record(z88.string(), z88.array(ExperienceSlotNodeSchema)).optional().describe("Child slot contents keyed by slot ID")
6179
6547
  })
6180
6548
  );
6181
- var ExperienceSlotNodeSchema = z86.lazy(
6182
- () => z86.union([ExperienceFragmentNodeSchema, InlineExperienceFragmentNodeSchema])
6549
+ var ExperienceSlotNodeSchema = z88.lazy(
6550
+ () => z88.union([ExperienceFragmentNodeSchema, InlineExperienceFragmentNodeSchema])
6183
6551
  );
6184
6552
 
6185
6553
  // src/tools/exo/components/createComponent.ts
6186
6554
  var CreateComponentToolParams = BaseToolSchema.extend({
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"),
6555
+ componentId: z89.string().optional().describe(
6556
+ "Optional ID for the component. If provided, will use upsert (create via PUT) with this ID"
6557
+ ),
6558
+ name: z89.string().describe("The name of the component"),
6559
+ description: z89.string().describe("Description of the component"),
6560
+ viewports: z89.array(ViewportSchema).describe("Viewport definitions for the component (may be empty)"),
6561
+ contentProperties: z89.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
6562
+ designProperties: z89.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
6563
+ componentTree: z89.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
6564
+ slots: z89.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
6194
6565
  metadata: ExoMetadataSchema.optional().describe(
6195
6566
  "Optional ExO metadata (tags, concepts)"
6196
6567
  )
@@ -6202,18 +6573,29 @@ function createComponentTool(config) {
6202
6573
  config.protectedEnvironments
6203
6574
  );
6204
6575
  const contentfulClient = createExoToolClient(config, args);
6205
- const component = await contentfulClient.component.create(
6206
- { spaceId: args.spaceId, environmentId: args.environmentId },
6576
+ const componentData = {
6577
+ name: args.name,
6578
+ description: args.description,
6579
+ viewports: args.viewports,
6580
+ contentProperties: args.contentProperties,
6581
+ designProperties: args.designProperties,
6582
+ ...args.componentTree && { componentTree: args.componentTree },
6583
+ ...args.slots && { slots: args.slots },
6584
+ ...args.metadata && { metadata: args.metadata }
6585
+ };
6586
+ const component = args.componentId ? await contentfulClient.component.upsert(
6207
6587
  {
6208
- name: args.name,
6209
- description: args.description,
6210
- viewports: args.viewports,
6211
- contentProperties: args.contentProperties,
6212
- designProperties: args.designProperties,
6213
- ...args.componentTree && { componentTree: args.componentTree },
6214
- ...args.slots && { slots: args.slots },
6215
- ...args.metadata && { metadata: args.metadata }
6588
+ spaceId: args.spaceId,
6589
+ environmentId: args.environmentId,
6590
+ componentId: args.componentId
6591
+ },
6592
+ {
6593
+ sys: { id: args.componentId, type: "Component" },
6594
+ ...componentData
6216
6595
  }
6596
+ ) : await contentfulClient.component.create(
6597
+ { spaceId: args.spaceId, environmentId: args.environmentId },
6598
+ componentData
6217
6599
  );
6218
6600
  return createSuccessResponse("Component created successfully", {
6219
6601
  component
@@ -6223,19 +6605,19 @@ function createComponentTool(config) {
6223
6605
  }
6224
6606
 
6225
6607
  // src/tools/exo/components/upsertComponent.ts
6226
- import { z as z88 } from "zod";
6608
+ import { z as z90 } from "zod";
6227
6609
  var UpsertComponentToolParams = BaseToolSchema.extend({
6228
- componentId: z88.string().describe("The ID of the component to update"),
6229
- version: z88.number().describe(
6610
+ componentId: z90.string().describe("The ID of the component to update"),
6611
+ version: z90.number().describe(
6230
6612
  "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."
6231
6613
  ),
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"),
6614
+ name: z90.string().optional().describe("The name of the component"),
6615
+ description: z90.string().optional().describe("Description of the component"),
6616
+ viewports: z90.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6617
+ contentProperties: z90.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
6618
+ designProperties: z90.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
6619
+ componentTree: z90.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
6620
+ slots: z90.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
6239
6621
  metadata: ExoMetadataSchema.optional().describe(
6240
6622
  "ExO metadata (tags, concepts); replaces existing if provided"
6241
6623
  )
@@ -6282,13 +6664,13 @@ function upsertComponentTool(config) {
6282
6664
  }
6283
6665
 
6284
6666
  // src/tools/exo/components/deleteComponent.ts
6285
- import { z as z89 } from "zod";
6667
+ import { z as z91 } from "zod";
6286
6668
  var DeleteComponentToolParams = BaseToolSchema.extend({
6287
- componentId: z89.string().describe("The ID of the component to delete"),
6288
- confirm: z89.boolean().optional().describe(
6669
+ componentId: z91.string().describe("The ID of the component to delete"),
6670
+ confirm: z91.boolean().optional().describe(
6289
6671
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
6290
6672
  ),
6291
- confirmToken: z89.string().optional().describe(
6673
+ confirmToken: z91.string().optional().describe(
6292
6674
  "Token returned by the preview call; must be supplied with confirm: true."
6293
6675
  )
6294
6676
  });
@@ -6330,10 +6712,10 @@ function deleteComponentTool(config) {
6330
6712
  }
6331
6713
 
6332
6714
  // src/tools/exo/components/publishComponent.ts
6333
- import { z as z90 } from "zod";
6715
+ import { z as z92 } from "zod";
6334
6716
  var PublishComponentToolParams = BaseToolSchema.extend({
6335
- componentId: z90.string().describe("The ID of the component to publish"),
6336
- version: z90.number().describe(
6717
+ componentId: z92.string().describe("The ID of the component to publish"),
6718
+ version: z92.number().describe(
6337
6719
  "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."
6338
6720
  )
6339
6721
  });
@@ -6367,10 +6749,10 @@ function publishComponentTool(config) {
6367
6749
  }
6368
6750
 
6369
6751
  // src/tools/exo/components/unpublishComponent.ts
6370
- import { z as z91 } from "zod";
6752
+ import { z as z93 } from "zod";
6371
6753
  var UnpublishComponentToolParams = BaseToolSchema.extend({
6372
- componentId: z91.string().describe("The ID of the component to unpublish"),
6373
- version: z91.number().describe(
6754
+ componentId: z93.string().describe("The ID of the component to unpublish"),
6755
+ version: z93.number().describe(
6374
6756
  "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."
6375
6757
  )
6376
6758
  });
@@ -6499,9 +6881,9 @@ function createComponentTools(config) {
6499
6881
  }
6500
6882
 
6501
6883
  // src/tools/exo/experience-fragments/getExperienceFragment.ts
6502
- import { z as z92 } from "zod";
6884
+ import { z as z94 } from "zod";
6503
6885
  var GetExperienceFragmentToolParams = BaseToolSchema.extend({
6504
- experienceFragmentId: z92.string().describe("The ID of the experience fragment to retrieve details for")
6886
+ experienceFragmentId: z94.string().describe("The ID of the experience fragment to retrieve details for")
6505
6887
  });
6506
6888
  function getExperienceFragmentTool(config) {
6507
6889
  async function tool2(args) {
@@ -6519,12 +6901,12 @@ function getExperienceFragmentTool(config) {
6519
6901
  }
6520
6902
 
6521
6903
  // src/tools/exo/experience-fragments/listExperienceFragments.ts
6522
- import { z as z93 } from "zod";
6904
+ import { z as z95 } from "zod";
6523
6905
  var ListExperienceFragmentsToolParams = BaseToolSchema.extend({
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)")
6906
+ limit: z95.number().optional().describe("Maximum number of experience fragments to return (max 10)"),
6907
+ pageNext: z95.string().optional().describe("Cursor token to fetch the next page of results"),
6908
+ pagePrev: z95.string().optional().describe("Cursor token to fetch the previous page of results"),
6909
+ order: z95.string().optional().describe("Order experience fragments by this field (e.g. sys.createdAt)")
6528
6910
  });
6529
6911
  function listExperienceFragmentsTool(config) {
6530
6912
  async function tool2(args) {
@@ -6554,21 +6936,21 @@ function listExperienceFragmentsTool(config) {
6554
6936
  }
6555
6937
 
6556
6938
  // src/tools/exo/experience-fragments/createExperienceFragment.ts
6557
- import { z as z94 } from "zod";
6939
+ import { z as z96 } from "zod";
6558
6940
  var CreateExperienceFragmentToolParams = BaseToolSchema.extend({
6559
- name: z94.string().describe("The name of the experience fragment"),
6560
- description: z94.string().describe("Description of the experience fragment"),
6941
+ name: z96.string().describe("The name of the experience fragment"),
6942
+ description: z96.string().describe("Description of the experience fragment"),
6561
6943
  component: ComponentResourceLinkSchema.describe(
6562
6944
  "Resource link to the component this experience fragment is based on"
6563
6945
  ),
6564
- viewports: z94.array(ViewportSchema).describe("Viewport definitions (may be empty)"),
6565
- designProperties: z94.record(z94.string(), DimensionedDesignPropertyValueSchema).describe(
6946
+ viewports: z96.array(ViewportSchema).describe("Viewport definitions (may be empty)"),
6947
+ designProperties: z96.record(z96.string(), DimensionedDesignPropertyValueSchema).describe(
6566
6948
  "Design property values keyed by property ID (may be empty object)"
6567
6949
  ),
6568
6950
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
6569
6951
  "Optional content bindings for the experience fragment"
6570
6952
  ),
6571
- slots: z94.record(z94.string(), z94.array(ExperienceSlotNodeSchema)).optional().describe("Optional slot node definitions keyed by slot ID"),
6953
+ slots: z96.record(z96.string(), z96.array(ExperienceSlotNodeSchema)).optional().describe("Optional slot node definitions keyed by slot ID"),
6572
6954
  metadata: ExperienceMetadataSchema.optional().describe(
6573
6955
  "Optional ExO metadata (tags, concepts)"
6574
6956
  )
@@ -6601,20 +6983,20 @@ function createExperienceFragmentTool(config) {
6601
6983
  }
6602
6984
 
6603
6985
  // src/tools/exo/experience-fragments/updateExperienceFragment.ts
6604
- import { z as z95 } from "zod";
6986
+ import { z as z97 } from "zod";
6605
6987
  var UpdateExperienceFragmentToolParams = BaseToolSchema.extend({
6606
- experienceFragmentId: z95.string().describe("The ID of the experience fragment to update"),
6607
- version: z95.number().describe(
6988
+ experienceFragmentId: z97.string().describe("The ID of the experience fragment to update"),
6989
+ version: z97.number().describe(
6608
6990
  "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."
6609
6991
  ),
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"),
6992
+ name: z97.string().optional().describe("The name of the experience fragment"),
6993
+ description: z97.string().optional().describe("Description of the experience fragment"),
6994
+ viewports: z97.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
6995
+ designProperties: z97.record(z97.string(), DimensionedDesignPropertyValueSchema).optional().describe("Design property values; replaces existing if provided"),
6614
6996
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
6615
6997
  "Content bindings; replaces existing if provided"
6616
6998
  ),
6617
- slots: z95.record(z95.string(), z95.array(ExperienceSlotNodeSchema)).optional().describe("Slot node definitions; replaces existing if provided"),
6999
+ slots: z97.record(z97.string(), z97.array(ExperienceSlotNodeSchema)).optional().describe("Slot node definitions; replaces existing if provided"),
6618
7000
  metadata: ExperienceMetadataSchema.optional().describe(
6619
7001
  "ExO metadata (tags, concepts); replaces existing if provided"
6620
7002
  )
@@ -6662,13 +7044,13 @@ function updateExperienceFragmentTool(config) {
6662
7044
  }
6663
7045
 
6664
7046
  // src/tools/exo/experience-fragments/deleteExperienceFragment.ts
6665
- import { z as z96 } from "zod";
7047
+ import { z as z98 } from "zod";
6666
7048
  var DeleteExperienceFragmentToolParams = BaseToolSchema.extend({
6667
- experienceFragmentId: z96.string().describe("The ID of the experience fragment to delete"),
6668
- confirm: z96.boolean().optional().describe(
7049
+ experienceFragmentId: z98.string().describe("The ID of the experience fragment to delete"),
7050
+ confirm: z98.boolean().optional().describe(
6669
7051
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
6670
7052
  ),
6671
- confirmToken: z96.string().optional().describe(
7053
+ confirmToken: z98.string().optional().describe(
6672
7054
  "Token returned by the preview call; must be supplied with confirm: true."
6673
7055
  )
6674
7056
  });
@@ -6710,10 +7092,10 @@ function deleteExperienceFragmentTool(config) {
6710
7092
  }
6711
7093
 
6712
7094
  // src/tools/exo/experience-fragments/publishExperienceFragment.ts
6713
- import { z as z97 } from "zod";
7095
+ import { z as z99 } from "zod";
6714
7096
  var PublishExperienceFragmentToolParams = BaseToolSchema.extend({
6715
- experienceFragmentId: z97.string().describe("The ID of the experience fragment to publish"),
6716
- version: z97.number().describe(
7097
+ experienceFragmentId: z99.string().describe("The ID of the experience fragment to publish"),
7098
+ version: z99.number().describe(
6717
7099
  "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."
6718
7100
  )
6719
7101
  });
@@ -6747,10 +7129,10 @@ function publishExperienceFragmentTool(config) {
6747
7129
  }
6748
7130
 
6749
7131
  // src/tools/exo/experience-fragments/unpublishExperienceFragment.ts
6750
- import { z as z98 } from "zod";
7132
+ import { z as z100 } from "zod";
6751
7133
  var UnpublishExperienceFragmentToolParams = BaseToolSchema.extend({
6752
- experienceFragmentId: z98.string().describe("The ID of the experience fragment to unpublish"),
6753
- version: z98.number().describe(
7134
+ experienceFragmentId: z100.string().describe("The ID of the experience fragment to unpublish"),
7135
+ version: z100.number().describe(
6754
7136
  "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."
6755
7137
  )
6756
7138
  });
@@ -6882,9 +7264,9 @@ function createExperienceFragmentTools(config) {
6882
7264
  }
6883
7265
 
6884
7266
  // src/tools/exo/experience-templates/getExperienceTemplate.ts
6885
- import { z as z99 } from "zod";
7267
+ import { z as z101 } from "zod";
6886
7268
  var GetExperienceTemplateToolParams = BaseToolSchema.extend({
6887
- experienceTemplateId: z99.string().describe("The ID of the experience template to retrieve details for")
7269
+ experienceTemplateId: z101.string().describe("The ID of the experience template to retrieve details for")
6888
7270
  });
6889
7271
  function getExperienceTemplateTool(config) {
6890
7272
  async function tool2(args) {
@@ -6902,12 +7284,12 @@ function getExperienceTemplateTool(config) {
6902
7284
  }
6903
7285
 
6904
7286
  // src/tools/exo/experience-templates/listExperienceTemplates.ts
6905
- import { z as z100 } from "zod";
7287
+ import { z as z102 } from "zod";
6906
7288
  var ListExperienceTemplatesToolParams = BaseToolSchema.extend({
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)")
7289
+ limit: z102.number().optional().describe("Maximum number of experience templates to return (max 10)"),
7290
+ pageNext: z102.string().optional().describe("Cursor token to fetch the next page of results"),
7291
+ pagePrev: z102.string().optional().describe("Cursor token to fetch the previous page of results"),
7292
+ order: z102.string().optional().describe("Order experience templates by this field (e.g. sys.createdAt)")
6911
7293
  });
6912
7294
  function listExperienceTemplatesTool(config) {
6913
7295
  async function tool2(args) {
@@ -6937,17 +7319,17 @@ function listExperienceTemplatesTool(config) {
6937
7319
  }
6938
7320
 
6939
7321
  // src/tools/exo/experience-templates/createExperienceTemplate.ts
6940
- import { z as z101 } from "zod";
7322
+ import { z as z103 } from "zod";
6941
7323
  var CreateExperienceTemplateToolParams = BaseToolSchema.extend({
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(
7324
+ name: z103.string().describe("The name of the experience template"),
7325
+ description: z103.string().describe("Description of the experience template"),
7326
+ viewports: z103.array(ViewportSchema).describe(
6945
7327
  "Viewport definitions for the experience template (may be empty)"
6946
7328
  ),
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"),
7329
+ contentProperties: z103.array(ContentPropertySchema).describe("Content property definitions (may be empty)"),
7330
+ designProperties: z103.array(DesignPropertySchema).describe("Design property definitions (may be empty)"),
7331
+ componentTree: z103.array(TreeNodeSchema).optional().describe("Optional component tree node definitions"),
7332
+ slots: z103.array(SlotDefinitionSchema).optional().describe("Optional slot definitions"),
6951
7333
  metadata: ExoMetadataSchema.optional().describe(
6952
7334
  "Optional ExO metadata (tags, concepts)"
6953
7335
  )
@@ -6980,19 +7362,19 @@ function createExperienceTemplateTool(config) {
6980
7362
  }
6981
7363
 
6982
7364
  // src/tools/exo/experience-templates/upsertExperienceTemplate.ts
6983
- import { z as z102 } from "zod";
7365
+ import { z as z104 } from "zod";
6984
7366
  var UpsertExperienceTemplateToolParams = BaseToolSchema.extend({
6985
- experienceTemplateId: z102.string().describe("The ID of the experience template to update"),
6986
- version: z102.number().describe(
7367
+ experienceTemplateId: z104.string().describe("The ID of the experience template to update"),
7368
+ version: z104.number().describe(
6987
7369
  "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."
6988
7370
  ),
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"),
7371
+ name: z104.string().optional().describe("The name of the experience template"),
7372
+ description: z104.string().optional().describe("Description of the experience template"),
7373
+ viewports: z104.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
7374
+ contentProperties: z104.array(ContentPropertySchema).optional().describe("Content property definitions; replaces existing if provided"),
7375
+ designProperties: z104.array(DesignPropertySchema).optional().describe("Design property definitions; replaces existing if provided"),
7376
+ componentTree: z104.array(TreeNodeSchema).optional().describe("Component tree node definitions; replaces existing if provided"),
7377
+ slots: z104.array(SlotDefinitionSchema).optional().describe("Slot definitions; replaces existing if provided"),
6996
7378
  metadata: ExoMetadataSchema.optional().describe(
6997
7379
  "ExO metadata (tags, concepts); replaces existing if provided"
6998
7380
  )
@@ -7042,13 +7424,13 @@ function upsertExperienceTemplateTool(config) {
7042
7424
  }
7043
7425
 
7044
7426
  // src/tools/exo/experience-templates/deleteExperienceTemplate.ts
7045
- import { z as z103 } from "zod";
7427
+ import { z as z105 } from "zod";
7046
7428
  var DeleteExperienceTemplateToolParams = BaseToolSchema.extend({
7047
- experienceTemplateId: z103.string().describe("The ID of the experience template to delete"),
7048
- confirm: z103.boolean().optional().describe(
7429
+ experienceTemplateId: z105.string().describe("The ID of the experience template to delete"),
7430
+ confirm: z105.boolean().optional().describe(
7049
7431
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
7050
7432
  ),
7051
- confirmToken: z103.string().optional().describe(
7433
+ confirmToken: z105.string().optional().describe(
7052
7434
  "Token returned by the preview call; must be supplied with confirm: true."
7053
7435
  )
7054
7436
  });
@@ -7090,10 +7472,10 @@ function deleteExperienceTemplateTool(config) {
7090
7472
  }
7091
7473
 
7092
7474
  // src/tools/exo/experience-templates/publishExperienceTemplate.ts
7093
- import { z as z104 } from "zod";
7475
+ import { z as z106 } from "zod";
7094
7476
  var PublishExperienceTemplateToolParams = BaseToolSchema.extend({
7095
- experienceTemplateId: z104.string().describe("The ID of the experience template to publish"),
7096
- version: z104.number().describe(
7477
+ experienceTemplateId: z106.string().describe("The ID of the experience template to publish"),
7478
+ version: z106.number().describe(
7097
7479
  "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."
7098
7480
  )
7099
7481
  });
@@ -7127,10 +7509,10 @@ function publishExperienceTemplateTool(config) {
7127
7509
  }
7128
7510
 
7129
7511
  // src/tools/exo/experience-templates/unpublishExperienceTemplate.ts
7130
- import { z as z105 } from "zod";
7512
+ import { z as z107 } from "zod";
7131
7513
  var UnpublishExperienceTemplateToolParams = BaseToolSchema.extend({
7132
- experienceTemplateId: z105.string().describe("The ID of the experience template to unpublish"),
7133
- version: z105.number().describe(
7514
+ experienceTemplateId: z107.string().describe("The ID of the experience template to unpublish"),
7515
+ version: z107.number().describe(
7134
7516
  "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."
7135
7517
  )
7136
7518
  });
@@ -7262,9 +7644,9 @@ function createExperienceTemplateTools(config) {
7262
7644
  }
7263
7645
 
7264
7646
  // src/tools/exo/experiences/getExperience.ts
7265
- import { z as z106 } from "zod";
7647
+ import { z as z108 } from "zod";
7266
7648
  var GetExperienceToolParams = BaseToolSchema.extend({
7267
- experienceId: z106.string().describe("The ID of the experience to retrieve")
7649
+ experienceId: z108.string().describe("The ID of the experience to retrieve")
7268
7650
  });
7269
7651
  function getExperienceTool(config) {
7270
7652
  async function tool2(args) {
@@ -7282,12 +7664,12 @@ function getExperienceTool(config) {
7282
7664
  }
7283
7665
 
7284
7666
  // src/tools/exo/experiences/listExperiences.ts
7285
- import { z as z107 } from "zod";
7667
+ import { z as z109 } from "zod";
7286
7668
  var ListExperiencesToolParams = BaseToolSchema.extend({
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)")
7669
+ limit: z109.number().optional().describe("Maximum number of experiences to return (max 10)"),
7670
+ pageNext: z109.string().optional().describe("Cursor token to fetch the next page of results"),
7671
+ pagePrev: z109.string().optional().describe("Cursor token to fetch the previous page of results"),
7672
+ order: z109.string().optional().describe("Order experiences by this field (e.g. sys.createdAt)")
7291
7673
  });
7292
7674
  function listExperiencesTool(config) {
7293
7675
  async function tool2(args) {
@@ -7317,21 +7699,21 @@ function listExperiencesTool(config) {
7317
7699
  }
7318
7700
 
7319
7701
  // src/tools/exo/experiences/createExperience.ts
7320
- import { z as z108 } from "zod";
7702
+ import { z as z110 } from "zod";
7321
7703
  var CreateExperienceToolParams = BaseToolSchema.extend({
7322
- name: z108.string().describe("The name of the experience"),
7323
- description: z108.string().describe("Description of the experience"),
7704
+ name: z110.string().describe("The name of the experience"),
7705
+ description: z110.string().describe("Description of the experience"),
7324
7706
  experienceTemplate: ExperienceTemplateResourceLinkSchema.describe(
7325
7707
  "Resource link to the ExperienceTemplate this experience is backed by"
7326
7708
  ),
7327
- viewports: z108.array(ViewportSchema).describe("Viewport definitions for the experience (may be empty)"),
7328
- designProperties: z108.record(z108.string(), DimensionedDesignPropertyValueSchema).describe(
7709
+ viewports: z110.array(ViewportSchema).describe("Viewport definitions for the experience (may be empty)"),
7710
+ designProperties: z110.record(z110.string(), DimensionedDesignPropertyValueSchema).describe(
7329
7711
  "Design property values keyed by property ID. Each value is a dimensioned map (viewport ID \u2192 design value). May be an empty object."
7330
7712
  ),
7331
7713
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
7332
7714
  "Optional content bindings linking this experience to a data assembly"
7333
7715
  ),
7334
- slots: z108.record(z108.string(), z108.array(ExperienceSlotNodeSchema)).optional().describe(
7716
+ slots: z110.record(z110.string(), z110.array(ExperienceSlotNodeSchema)).optional().describe(
7335
7717
  "Optional slot contents keyed by slot ID. Each value is an array of ExperienceFragmentNode or InlineExperienceFragmentNode."
7336
7718
  ),
7337
7719
  metadata: ExperienceMetadataSchema.optional().describe(
@@ -7366,22 +7748,22 @@ function createExperienceTool(config) {
7366
7748
  }
7367
7749
 
7368
7750
  // src/tools/exo/experiences/upsertExperience.ts
7369
- import { z as z109 } from "zod";
7751
+ import { z as z111 } from "zod";
7370
7752
  var UpsertExperienceToolParams = BaseToolSchema.extend({
7371
- experienceId: z109.string().describe("The ID of the experience to update"),
7372
- version: z109.number().describe(
7753
+ experienceId: z111.string().describe("The ID of the experience to update"),
7754
+ version: z111.number().describe(
7373
7755
  "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."
7374
7756
  ),
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(
7757
+ name: z111.string().optional().describe("The name of the experience"),
7758
+ description: z111.string().optional().describe("Description of the experience"),
7759
+ viewports: z111.array(ViewportSchema).optional().describe("Viewport definitions; replaces existing viewports if provided"),
7760
+ designProperties: z111.record(z111.string(), DimensionedDesignPropertyValueSchema).optional().describe(
7379
7761
  "Design property values keyed by property ID; replaces existing if provided"
7380
7762
  ),
7381
7763
  contentBindings: ExperienceContentBindingsSchema.optional().describe(
7382
7764
  "Content bindings linking this experience to a data assembly; replaces existing if provided"
7383
7765
  ),
7384
- slots: z109.record(z109.string(), z109.array(ExperienceSlotNodeSchema)).optional().describe("Slot contents keyed by slot ID; replaces existing if provided"),
7766
+ slots: z111.record(z111.string(), z111.array(ExperienceSlotNodeSchema)).optional().describe("Slot contents keyed by slot ID; replaces existing if provided"),
7385
7767
  metadata: ExperienceMetadataSchema.optional().describe(
7386
7768
  "ExO metadata (tags, concepts); replaces existing if provided"
7387
7769
  )
@@ -7426,13 +7808,13 @@ function upsertExperienceTool(config) {
7426
7808
  }
7427
7809
 
7428
7810
  // src/tools/exo/experiences/deleteExperience.ts
7429
- import { z as z110 } from "zod";
7811
+ import { z as z112 } from "zod";
7430
7812
  var DeleteExperienceToolParams = BaseToolSchema.extend({
7431
- experienceId: z110.string().describe("The ID of the experience to delete"),
7432
- confirm: z110.boolean().optional().describe(
7813
+ experienceId: z112.string().describe("The ID of the experience to delete"),
7814
+ confirm: z112.boolean().optional().describe(
7433
7815
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
7434
7816
  ),
7435
- confirmToken: z110.string().optional().describe(
7817
+ confirmToken: z112.string().optional().describe(
7436
7818
  "Token returned by the preview call; must be supplied with confirm: true."
7437
7819
  )
7438
7820
  });
@@ -7474,10 +7856,10 @@ function deleteExperienceTool(config) {
7474
7856
  }
7475
7857
 
7476
7858
  // src/tools/exo/experiences/publishExperience.ts
7477
- import { z as z111 } from "zod";
7859
+ import { z as z113 } from "zod";
7478
7860
  var PublishExperienceToolParams = BaseToolSchema.extend({
7479
- experienceId: z111.string().describe("The ID of the experience to publish"),
7480
- version: z111.number().describe(
7861
+ experienceId: z113.string().describe("The ID of the experience to publish"),
7862
+ version: z113.number().describe(
7481
7863
  "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."
7482
7864
  )
7483
7865
  });
@@ -7511,10 +7893,10 @@ function publishExperienceTool(config) {
7511
7893
  }
7512
7894
 
7513
7895
  // src/tools/exo/experiences/unpublishExperience.ts
7514
- import { z as z112 } from "zod";
7896
+ import { z as z114 } from "zod";
7515
7897
  var UnpublishExperienceToolParams = BaseToolSchema.extend({
7516
- experienceId: z112.string().describe("The ID of the experience to unpublish"),
7517
- version: z112.number().describe(
7898
+ experienceId: z114.string().describe("The ID of the experience to unpublish"),
7899
+ version: z114.number().describe(
7518
7900
  "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."
7519
7901
  )
7520
7902
  });
@@ -7643,9 +8025,9 @@ function createExperienceTools(config) {
7643
8025
  }
7644
8026
 
7645
8027
  // src/tools/exo/data-assemblies/getDataAssembly.ts
7646
- import { z as z113 } from "zod";
8028
+ import { z as z115 } from "zod";
7647
8029
  var GetDataAssemblyToolParams = BaseToolSchema.extend({
7648
- dataAssemblyId: z113.string().describe("The ID of the data assembly to retrieve")
8030
+ dataAssemblyId: z115.string().describe("The ID of the data assembly to retrieve")
7649
8031
  });
7650
8032
  function getDataAssemblyTool(config) {
7651
8033
  async function tool2(args) {
@@ -7663,9 +8045,9 @@ function getDataAssemblyTool(config) {
7663
8045
  }
7664
8046
 
7665
8047
  // src/tools/exo/data-assemblies/getPublishedDataAssembly.ts
7666
- import { z as z114 } from "zod";
8048
+ import { z as z116 } from "zod";
7667
8049
  var GetPublishedDataAssemblyToolParams = BaseToolSchema.extend({
7668
- dataAssemblyId: z114.string().describe("The ID of the published data assembly to retrieve")
8050
+ dataAssemblyId: z116.string().describe("The ID of the published data assembly to retrieve")
7669
8051
  });
7670
8052
  function getPublishedDataAssemblyTool(config) {
7671
8053
  async function tool2(args) {
@@ -7683,12 +8065,12 @@ function getPublishedDataAssemblyTool(config) {
7683
8065
  }
7684
8066
 
7685
8067
  // src/tools/exo/data-assemblies/listDataAssemblies.ts
7686
- import { z as z115 } from "zod";
8068
+ import { z as z117 } from "zod";
7687
8069
  var ListDataAssembliesToolParams = BaseToolSchema.extend({
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")
8070
+ limit: z117.number().optional().describe("Maximum number of data assemblies to return (max 10)"),
8071
+ pageNext: z117.string().optional().describe("Cursor token to fetch the next page of results"),
8072
+ pagePrev: z117.string().optional().describe("Cursor token to fetch the previous page of results"),
8073
+ sysIdIn: z117.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
7692
8074
  });
7693
8075
  function listDataAssembliesTool(config) {
7694
8076
  async function tool2(args) {
@@ -7717,12 +8099,12 @@ function listDataAssembliesTool(config) {
7717
8099
  }
7718
8100
 
7719
8101
  // src/tools/exo/data-assemblies/listPublishedDataAssemblies.ts
7720
- import { z as z116 } from "zod";
8102
+ import { z as z118 } from "zod";
7721
8103
  var ListPublishedDataAssembliesToolParams = BaseToolSchema.extend({
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")
8104
+ limit: z118.number().optional().describe("Maximum number of published data assemblies to return (max 10)"),
8105
+ pageNext: z118.string().optional().describe("Cursor token to fetch the next page of results"),
8106
+ pagePrev: z118.string().optional().describe("Cursor token to fetch the previous page of results"),
8107
+ sysIdIn: z118.string().optional().describe("Comma-separated list of data assembly IDs to filter by")
7726
8108
  });
7727
8109
  function listPublishedDataAssembliesTool(config) {
7728
8110
  async function tool2(args) {
@@ -7751,35 +8133,35 @@ function listPublishedDataAssembliesTool(config) {
7751
8133
  }
7752
8134
 
7753
8135
  // src/tools/exo/data-assemblies/createDataAssembly.ts
7754
- import { z as z118 } from "zod";
8136
+ import { z as z120 } from "zod";
7755
8137
 
7756
8138
  // src/types/dataAssemblySchemas.ts
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(),
8139
+ import { z as z119 } from "zod";
8140
+ var PointerExpressionValueSchema = z119.lazy(
8141
+ () => z119.union([
8142
+ z119.string(),
8143
+ z119.object({
8144
+ $from: z119.union([
8145
+ z119.string(),
8146
+ z119.object({
8147
+ source: z119.string(),
7766
8148
  select: PointerExpressionValueSchema.optional()
7767
8149
  })
7768
8150
  ])
7769
8151
  }),
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),
8152
+ z119.object({ $literal: z119.custom() }),
8153
+ z119.object({ $object: z119.record(z119.string(), PointerExpressionValueSchema) }),
8154
+ z119.object({
8155
+ $on: z119.object({
8156
+ type: z119.record(z119.string(), PointerExpressionValueSchema),
7775
8157
  default: PointerExpressionValueSchema.optional()
7776
8158
  })
7777
8159
  }),
7778
- z117.record(z117.string(), PointerExpressionValueSchema)
8160
+ z119.record(z119.string(), PointerExpressionValueSchema)
7779
8161
  ])
7780
8162
  );
7781
- var CanonicalDataTypeArmSchema = z117.object({
7782
- type: z117.enum([
8163
+ var CanonicalDataTypeArmSchema = z119.object({
8164
+ type: z119.enum([
7783
8165
  "String",
7784
8166
  "Number",
7785
8167
  "Integer",
@@ -7791,72 +8173,72 @@ var CanonicalDataTypeArmSchema = z117.object({
7791
8173
  "Literal",
7792
8174
  "DiscriminatedUnion"
7793
8175
  ]),
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([
8176
+ id: z119.string().describe("Data type field identifier"),
8177
+ name: z119.string().describe("Human-readable name"),
8178
+ required: z119.boolean().optional()
8179
+ }).catchall(z119.unknown());
8180
+ var LegacyDataTypeArmSchema = z119.object({
8181
+ id: z119.string().describe("Data type field identifier"),
8182
+ name: z119.string().describe("Human-readable name"),
8183
+ type: z119.string(),
8184
+ required: z119.boolean().optional(),
8185
+ source: z119.string().optional(),
8186
+ ref: z119.unknown().optional()
8187
+ });
8188
+ var DataAssemblyDataTypeFieldSchema = z119.union([
7807
8189
  CanonicalDataTypeArmSchema,
7808
8190
  LegacyDataTypeArmSchema
7809
8191
  ]);
7810
8192
  var SAME_SPACE_CONTENT_SOURCE = "crn:contentful:::content:spaces/$self/environments/$self";
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())
8193
+ var DataAssemblyResourceLinkParameterSchema = z119.object({
8194
+ name: z119.string().optional(),
8195
+ description: z119.string().optional(),
8196
+ type: z119.literal("ResourceLink"),
8197
+ linkType: z119.literal("Contentful:Entry"),
8198
+ allowedResources: z119.array(
8199
+ z119.object({
8200
+ type: z119.literal("Contentful:Entry"),
8201
+ source: z119.literal(SAME_SPACE_CONTENT_SOURCE),
8202
+ allowedTypes: z119.array(z119.string())
7821
8203
  })
7822
8204
  )
7823
8205
  });
7824
- var DataAssemblyParameterConfigSchema = z117.record(
7825
- z117.string(),
8206
+ var DataAssemblyParameterConfigSchema = z119.record(
8207
+ z119.string(),
7826
8208
  DataAssemblyResourceLinkParameterSchema
7827
8209
  );
7828
- var DataAssemblyGraphQLResolverSchema = z117.object({
7829
- source: z117.literal("Contentful:GraphQL"),
7830
- query: z117.string().describe("GraphQL query string"),
8210
+ var DataAssemblyGraphQLResolverSchema = z119.object({
8211
+ source: z119.literal("Contentful:GraphQL"),
8212
+ query: z119.string().describe("GraphQL query string"),
7831
8213
  parameters: PointerExpressionValueSchema.optional()
7832
8214
  });
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()
8215
+ var DataAssemblyNestedResolverSchema = z119.object({
8216
+ source: z119.literal("Contentful:DataAssembly"),
8217
+ dataAssembly: z119.object({
8218
+ sys: z119.object({
8219
+ type: z119.literal("ResourceLink"),
8220
+ linkType: z119.literal("Contentful:DataAssembly"),
8221
+ urn: z119.string()
7840
8222
  })
7841
8223
  }),
7842
8224
  parameters: PointerExpressionValueSchema.optional()
7843
8225
  });
7844
- var DataAssemblyResolverDefinitionSchema = z117.union([
8226
+ var DataAssemblyResolverDefinitionSchema = z119.union([
7845
8227
  DataAssemblyGraphQLResolverSchema,
7846
8228
  DataAssemblyNestedResolverSchema
7847
8229
  ]);
7848
- var DataAssemblyResolverConfigSchema = z117.record(
7849
- z117.string(),
8230
+ var DataAssemblyResolverConfigSchema = z119.record(
8231
+ z119.string(),
7850
8232
  DataAssemblyResolverDefinitionSchema
7851
8233
  );
7852
8234
  var DataAssemblyReturnMappingConfigSchema = PointerExpressionValueSchema;
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()
8235
+ var DataAssemblyMetadataSchema = z119.object({
8236
+ tags: z119.array(
8237
+ z119.object({
8238
+ sys: z119.object({
8239
+ type: z119.literal("Link"),
8240
+ linkType: z119.literal("Tag"),
8241
+ id: z119.string()
7860
8242
  })
7861
8243
  })
7862
8244
  )
@@ -7864,8 +8246,8 @@ var DataAssemblyMetadataSchema = z117.object({
7864
8246
 
7865
8247
  // src/tools/exo/data-assemblies/createDataAssembly.ts
7866
8248
  var CreateDataAssemblyToolParams = BaseToolSchema.extend({
7867
- name: z118.string().describe("The name of the data assembly"),
7868
- description: z118.string().describe("Description of the data assembly"),
8249
+ name: z120.string().describe("The name of the data assembly"),
8250
+ description: z120.string().describe("Description of the data assembly"),
7869
8251
  parameters: DataAssemblyParameterConfigSchema.describe(
7870
8252
  "Parameter definitions keyed by parameter name (may be empty object)"
7871
8253
  ),
@@ -7875,8 +8257,8 @@ var CreateDataAssemblyToolParams = BaseToolSchema.extend({
7875
8257
  return: DataAssemblyReturnMappingConfigSchema.describe(
7876
8258
  "Return mapping configuration specifying how to map resolved data"
7877
8259
  ),
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"),
8260
+ dataType: z120.array(DataAssemblyDataTypeFieldSchema).describe("Data type field definitions for this data assembly (may be empty array)"),
8261
+ variant: z120.string().optional().describe("Optional variant identifier for this data assembly"),
7880
8262
  metadata: DataAssemblyMetadataSchema.optional().describe("Optional metadata (tags)")
7881
8263
  });
7882
8264
  function createDataAssemblyTool(config) {
@@ -7910,14 +8292,14 @@ function createDataAssemblyTool(config) {
7910
8292
  }
7911
8293
 
7912
8294
  // src/tools/exo/data-assemblies/updateDataAssembly.ts
7913
- import { z as z119 } from "zod";
8295
+ import { z as z121 } from "zod";
7914
8296
  var UpdateDataAssemblyToolParams = BaseToolSchema.extend({
7915
- dataAssemblyId: z119.string().describe("The ID of the data assembly to update"),
7916
- version: z119.number().describe(
8297
+ dataAssemblyId: z121.string().describe("The ID of the data assembly to update"),
8298
+ version: z121.number().describe(
7917
8299
  "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."
7918
8300
  ),
7919
- name: z119.string().optional().describe("The name of the data assembly"),
7920
- description: z119.string().optional().describe("Description of the data assembly"),
8301
+ name: z121.string().optional().describe("The name of the data assembly"),
8302
+ description: z121.string().optional().describe("Description of the data assembly"),
7921
8303
  parameters: DataAssemblyParameterConfigSchema.optional().describe(
7922
8304
  "Parameter definitions; replaces existing if provided"
7923
8305
  ),
@@ -7927,8 +8309,8 @@ var UpdateDataAssemblyToolParams = BaseToolSchema.extend({
7927
8309
  return: DataAssemblyReturnMappingConfigSchema.optional().describe(
7928
8310
  "Return mapping configuration; replaces existing if provided"
7929
8311
  ),
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"),
8312
+ dataType: z121.array(DataAssemblyDataTypeFieldSchema).optional().describe("Data type field definitions; replaces existing if provided"),
8313
+ variant: z121.string().optional().describe("Optional variant identifier; replaces existing if provided"),
7932
8314
  metadata: DataAssemblyMetadataSchema.optional().describe(
7933
8315
  "Metadata (tags); replaces existing if provided"
7934
8316
  )
@@ -7974,13 +8356,13 @@ function updateDataAssemblyTool(config) {
7974
8356
  }
7975
8357
 
7976
8358
  // src/tools/exo/data-assemblies/deleteDataAssembly.ts
7977
- import { z as z120 } from "zod";
8359
+ import { z as z122 } from "zod";
7978
8360
  var DeleteDataAssemblyToolParams = BaseToolSchema.extend({
7979
- dataAssemblyId: z120.string().describe("The ID of the data assembly to delete"),
7980
- confirm: z120.boolean().optional().describe(
8361
+ dataAssemblyId: z122.string().describe("The ID of the data assembly to delete"),
8362
+ confirm: z122.boolean().optional().describe(
7981
8363
  "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
7982
8364
  ),
7983
- confirmToken: z120.string().optional().describe(
8365
+ confirmToken: z122.string().optional().describe(
7984
8366
  "Token returned by the preview call; must be supplied with confirm: true."
7985
8367
  )
7986
8368
  });
@@ -8022,10 +8404,10 @@ function deleteDataAssemblyTool(config) {
8022
8404
  }
8023
8405
 
8024
8406
  // src/tools/exo/data-assemblies/publishDataAssembly.ts
8025
- import { z as z121 } from "zod";
8407
+ import { z as z123 } from "zod";
8026
8408
  var PublishDataAssemblyToolParams = BaseToolSchema.extend({
8027
- dataAssemblyId: z121.string().describe("The ID of the data assembly to publish"),
8028
- version: z121.number().describe(
8409
+ dataAssemblyId: z123.string().describe("The ID of the data assembly to publish"),
8410
+ version: z123.number().describe(
8029
8411
  "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."
8030
8412
  )
8031
8413
  });
@@ -8059,10 +8441,10 @@ function publishDataAssemblyTool(config) {
8059
8441
  }
8060
8442
 
8061
8443
  // src/tools/exo/data-assemblies/unpublishDataAssembly.ts
8062
- import { z as z122 } from "zod";
8444
+ import { z as z124 } from "zod";
8063
8445
  var UnpublishDataAssemblyToolParams = BaseToolSchema.extend({
8064
- dataAssemblyId: z122.string().describe("The ID of the data assembly to unpublish"),
8065
- version: z122.number().describe(
8446
+ dataAssemblyId: z124.string().describe("The ID of the data assembly to unpublish"),
8447
+ version: z124.number().describe(
8066
8448
  "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."
8067
8449
  )
8068
8450
  });
@@ -8214,6 +8596,231 @@ function createDataAssemblyTools(config) {
8214
8596
  };
8215
8597
  }
8216
8598
 
8599
+ // src/tools/exo/design-tokens/getDesignToken.ts
8600
+ import { z as z125 } from "zod";
8601
+ var GetDesignTokenToolParams = BaseToolSchema.extend({
8602
+ designTokenId: z125.string().describe("The ID of the design token to retrieve details for")
8603
+ });
8604
+ function getDesignTokenTool(config) {
8605
+ async function tool2(args) {
8606
+ const contentfulClient = createExoToolClient(config, args);
8607
+ const designToken = await contentfulClient.designToken.get({
8608
+ spaceId: args.spaceId,
8609
+ environmentId: args.environmentId,
8610
+ designTokenId: args.designTokenId
8611
+ });
8612
+ return createSuccessResponse("Design token retrieved successfully", {
8613
+ designToken
8614
+ });
8615
+ }
8616
+ return withErrorHandling(tool2, "Error retrieving design token");
8617
+ }
8618
+
8619
+ // src/tools/exo/design-tokens/listDesignTokens.ts
8620
+ import { z as z126 } from "zod";
8621
+ var ListDesignTokensToolParams = BaseToolSchema.extend({
8622
+ limit: z126.number().optional().describe("Maximum number of design tokens to return (max 10)"),
8623
+ pageNext: z126.string().optional().describe("Cursor token to fetch the next page of results"),
8624
+ pagePrev: z126.string().optional().describe("Cursor token to fetch the previous page of results"),
8625
+ type: z126.enum(DTCG_DESIGN_PROPERTY_TYPES).optional().describe("Filter to design tokens of this DTCG type (e.g. DTCG.Color)")
8626
+ });
8627
+ function listDesignTokensTool(config) {
8628
+ async function tool2(args) {
8629
+ const contentfulClient = createExoToolClient(config, args);
8630
+ const cursorParam = args.pageNext ? { pageNext: args.pageNext } : args.pagePrev ? { pagePrev: args.pagePrev } : {};
8631
+ const designTokens = await contentfulClient.designToken.getMany({
8632
+ spaceId: args.spaceId,
8633
+ environmentId: args.environmentId,
8634
+ query: {
8635
+ limit: Math.min(args.limit || 10, 10),
8636
+ ...args.type && { type: args.type },
8637
+ ...cursorParam
8638
+ }
8639
+ });
8640
+ const summarized = summarizeData(designTokens, {
8641
+ maxItems: 10,
8642
+ remainingMessage: "To see more design tokens, ask me to retrieve the next page using the pageNext cursor."
8643
+ });
8644
+ return createSuccessResponse("Design tokens retrieved successfully", {
8645
+ designTokens: summarized,
8646
+ total: designTokens.total,
8647
+ limit: designTokens.limit,
8648
+ pages: designTokens.pages
8649
+ });
8650
+ }
8651
+ return withErrorHandling(tool2, "Error listing design tokens");
8652
+ }
8653
+
8654
+ // src/tools/exo/design-tokens/upsertDesignToken.ts
8655
+ import { z as z127 } from "zod";
8656
+ var UpsertDesignTokenToolParams = BaseToolSchema.extend({
8657
+ designTokenId: z127.string().describe("The ID of the design token to create or update"),
8658
+ version: z127.number().optional().describe(
8659
+ "The design token's sys.version, required when updating an existing token. You must call get_design_token first to read the current state and version. The update is rejected if this does not match the current version, which means the token changed since you read it. Omit this entirely to create a new design token with this designTokenId \u2014 in that case name and type are required. Design tokens have no separate publish step: every upsert auto-publishes server-side, which bumps sys.version by 2 (not 1) per call."
8660
+ ),
8661
+ name: z127.string().optional().describe("The name of the design token; required when creating"),
8662
+ type: z127.enum(DTCG_DESIGN_PROPERTY_TYPES).optional().describe("The DTCG type of the design token; required when creating"),
8663
+ metadata: ExoMetadataSchema.optional().describe(
8664
+ "ExO metadata (tags, concepts); replaces existing if provided"
8665
+ )
8666
+ });
8667
+ function upsertDesignTokenTool(config) {
8668
+ async function tool2(args) {
8669
+ assertEnvironmentNotProtected(
8670
+ args.environmentId,
8671
+ config.protectedEnvironments
8672
+ );
8673
+ const params = {
8674
+ spaceId: args.spaceId,
8675
+ environmentId: args.environmentId,
8676
+ designTokenId: args.designTokenId
8677
+ };
8678
+ const contentfulClient = createExoToolClient(config, args);
8679
+ if (args.version !== void 0) {
8680
+ const current = await contentfulClient.designToken.get(params);
8681
+ if (args.version !== current.sys.version) {
8682
+ throw new Error(
8683
+ `Version conflict: the design token has changed since you read it (your version: ${args.version}, current version: ${current.sys.version}). Re-fetch the design token with get_design_token and retry the update with the latest sys.version.`
8684
+ );
8685
+ }
8686
+ const designToken2 = await contentfulClient.designToken.upsert(params, {
8687
+ sys: {
8688
+ id: current.sys.id,
8689
+ type: "DesignToken",
8690
+ version: current.sys.version
8691
+ },
8692
+ name: args.name ?? current.name,
8693
+ type: args.type ?? current.type,
8694
+ ...(args.metadata ?? current.metadata) && {
8695
+ metadata: args.metadata ?? current.metadata
8696
+ }
8697
+ });
8698
+ return createSuccessResponse("Design token updated successfully", {
8699
+ designToken: designToken2
8700
+ });
8701
+ }
8702
+ if (!args.name || !args.type) {
8703
+ throw new Error(
8704
+ "name and type are required when creating a new design token (no version supplied)."
8705
+ );
8706
+ }
8707
+ const designToken = await contentfulClient.designToken.upsert(params, {
8708
+ sys: { id: args.designTokenId, type: "DesignToken" },
8709
+ name: args.name,
8710
+ type: args.type,
8711
+ ...args.metadata && { metadata: args.metadata }
8712
+ });
8713
+ return createSuccessResponse("Design token created successfully", {
8714
+ designToken
8715
+ });
8716
+ }
8717
+ return withErrorHandling(tool2, "Error upserting design token");
8718
+ }
8719
+
8720
+ // src/tools/exo/design-tokens/deleteDesignToken.ts
8721
+ import { z as z128 } from "zod";
8722
+ var DeleteDesignTokenToolParams = BaseToolSchema.extend({
8723
+ designTokenId: z128.string().describe("The ID of the design token to delete"),
8724
+ confirm: z128.boolean().optional().describe(
8725
+ "Set to true on the second call to actually perform the deletion. Required together with confirmToken."
8726
+ ),
8727
+ confirmToken: z128.string().optional().describe(
8728
+ "Token returned by the preview call; must be supplied with confirm: true."
8729
+ )
8730
+ });
8731
+ function deleteDesignTokenTool(config) {
8732
+ async function tool2(args) {
8733
+ assertEnvironmentNotProtected(
8734
+ args.environmentId,
8735
+ config.protectedEnvironments
8736
+ );
8737
+ const params = {
8738
+ spaceId: args.spaceId,
8739
+ environmentId: args.environmentId,
8740
+ designTokenId: args.designTokenId
8741
+ };
8742
+ const contentfulClient = createExoToolClient(config, args);
8743
+ const designToken = await contentfulClient.designToken.get(params);
8744
+ const expectedToken = buildConfirmToken(
8745
+ "designToken",
8746
+ args.designTokenId,
8747
+ designToken.sys.version
8748
+ );
8749
+ if (args.confirm !== true || args.confirmToken !== expectedToken) {
8750
+ return createSuccessResponse(
8751
+ `${CONFIRMATION_MESSAGE_PREFIX} design token`,
8752
+ buildConfirmationPreview(
8753
+ "designToken",
8754
+ args.designTokenId,
8755
+ { designToken },
8756
+ expectedToken
8757
+ )
8758
+ );
8759
+ }
8760
+ await contentfulClient.designToken.delete(params);
8761
+ return createSuccessResponse("Design token deleted successfully", {
8762
+ designTokenId: args.designTokenId
8763
+ });
8764
+ }
8765
+ return withErrorHandling(tool2, "Error deleting design token");
8766
+ }
8767
+
8768
+ // src/tools/exo/design-tokens/register.ts
8769
+ function createDesignTokenTools(config) {
8770
+ const getDesignToken = getDesignTokenTool(config);
8771
+ const listDesignTokens = listDesignTokensTool(config);
8772
+ const upsertDesignToken = upsertDesignTokenTool(config);
8773
+ const deleteDesignToken = deleteDesignTokenTool(config);
8774
+ return {
8775
+ getDesignToken: {
8776
+ title: "get_design_token",
8777
+ description: "Get details about a specific ExO design token (a named DTCG-typed value, such as a color, dimension, or typography token, referenced by token-backed design properties on components).",
8778
+ inputParams: GetDesignTokenToolParams.shape,
8779
+ annotations: {
8780
+ readOnlyHint: true,
8781
+ destructiveHint: false,
8782
+ openWorldHint: false
8783
+ },
8784
+ tool: getDesignToken
8785
+ },
8786
+ listDesignTokens: {
8787
+ title: "list_design_tokens",
8788
+ description: "List ExO design tokens in a space and environment. Returns a maximum of 10 items per request; use the pageNext cursor (returned in pages.next) to paginate.",
8789
+ inputParams: ListDesignTokensToolParams.shape,
8790
+ annotations: {
8791
+ readOnlyHint: true,
8792
+ destructiveHint: false,
8793
+ openWorldHint: false
8794
+ },
8795
+ tool: listDesignTokens
8796
+ },
8797
+ upsertDesignToken: {
8798
+ title: "upsert_design_token",
8799
+ description: "Create or update an ExO design token. To update an existing token, call get_design_token first and pass the returned sys.version as the version parameter; the handler merges your updates with the existing fields, so you only need to provide what changes. If the version is stale, the update is rejected and you must re-fetch with get_design_token. To create a new token, omit version and supply designTokenId, name, and type. Design tokens have no separate publish step: every upsert auto-publishes server-side, bumping sys.version by 2 (not 1) per call.",
8800
+ inputParams: UpsertDesignTokenToolParams.shape,
8801
+ annotations: {
8802
+ readOnlyHint: false,
8803
+ destructiveHint: false,
8804
+ idempotentHint: false,
8805
+ openWorldHint: false
8806
+ },
8807
+ tool: upsertDesignToken
8808
+ },
8809
+ deleteDesignToken: {
8810
+ title: "delete_design_token",
8811
+ description: "Delete an ExO design token. Two-phase: the first call (without confirm/confirmToken) returns a preview and a confirmToken. To complete the deletion, call again with the same designTokenId, confirm: true, and the confirmToken from the preview.",
8812
+ inputParams: DeleteDesignTokenToolParams.shape,
8813
+ annotations: {
8814
+ readOnlyHint: false,
8815
+ destructiveHint: true,
8816
+ idempotentHint: false,
8817
+ openWorldHint: false
8818
+ },
8819
+ tool: deleteDesignToken
8820
+ }
8821
+ };
8822
+ }
8823
+
8217
8824
  // src/ContentfulMcpTools.ts
8218
8825
  var ContentfulMcpTools = class {
8219
8826
  config;
@@ -8244,6 +8851,12 @@ var ContentfulMcpTools = class {
8244
8851
  getAssetTools() {
8245
8852
  return createAssetTools(this.config);
8246
8853
  }
8854
+ /**
8855
+ * Get content preview tools
8856
+ */
8857
+ getContentPreviewTools() {
8858
+ return createContentPreviewTools(this.config);
8859
+ }
8247
8860
  /**
8248
8861
  * Get content type tools
8249
8862
  */
@@ -8340,6 +8953,12 @@ var ContentfulMcpTools = class {
8340
8953
  getDataAssemblyTools() {
8341
8954
  return createDataAssemblyTools(this.config);
8342
8955
  }
8956
+ /**
8957
+ * Get ExO design token tools
8958
+ */
8959
+ getDesignTokenTools() {
8960
+ return createDesignTokenTools(this.config);
8961
+ }
8343
8962
  /**
8344
8963
  * Get job tools (space-to-space migration)
8345
8964
  */
@@ -8349,10 +8968,10 @@ var ContentfulMcpTools = class {
8349
8968
  };
8350
8969
 
8351
8970
  // src/utils/entitlements.ts
8352
- import { createClient as createClient17 } from "contentful-management";
8971
+ import { createClient as createClient18 } from "contentful-management";
8353
8972
  var EXO_M1_FEATURE = "exoM1";
8354
8973
  function createPlainClient(config) {
8355
- return createClient17(createClientConfig(config), { type: "plain" });
8974
+ return createClient18(createClientConfig(config), { type: "plain" });
8356
8975
  }
8357
8976
  async function orgHasExoM1(client, organizationId) {
8358
8977
  try {