@umbraco-cms/mcp-editor 17.6.0-beta.8 → 18.0.0-beta.10

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.
@@ -7,8 +7,7 @@ import { resolve } from 'path';
7
7
 
8
8
  // src/config/mcp-servers.ts
9
9
  async function buildServers() {
10
- const isWorkersRuntime = typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers";
11
- if (isWorkersRuntime || typeof process === "undefined" || !process.env) return [];
10
+ if (typeof process === "undefined" || !process.env) return [];
12
11
  const useMockChain = process.env.USE_MOCK_MCP_CHAIN === "true";
13
12
  if (useMockChain) {
14
13
  const path2 = await import('path');
@@ -110,14 +109,6 @@ function truncateAvailableTools(message) {
110
109
  }
111
110
  return message.slice(0, availableToolsIndex + 1);
112
111
  }
113
- async function isCmsToolAvailable(toolName) {
114
- try {
115
- const { tools } = await mcpClientManager.listTools("cms");
116
- return (tools ?? []).some((t) => t.name === toolName);
117
- } catch {
118
- return true;
119
- }
120
- }
121
112
  async function chainCms(toolName, args) {
122
113
  let result;
123
114
  try {
@@ -480,9 +471,9 @@ var tool2 = {
480
471
  })),
481
472
  variants: doc.variants ?? [],
482
473
  previewUrl: buildPreviewUrl(doc.id),
483
- // The get-document-by-id response doesn't carry `urls` — published
484
- // URLs come only from the separate get-document-urls endpoint via
485
- // fetchPublishedUrls.
474
+ // Umbraco 18's get-document-by-id response no longer carries `urls` —
475
+ // published URLs now come only from the separate get-document-urls
476
+ // endpoint via fetchPublishedUrls.
486
477
  publishedUrls: await fetchPublishedUrls(id)
487
478
  });
488
479
  }
@@ -807,13 +798,13 @@ async function validateDocumentState(id, doc) {
807
798
  culture: v.culture ?? null,
808
799
  segment: v.segment ?? null
809
800
  }));
810
- const ancestorsResult = await chainCms("get-document-ancestors", { descendantId: id });
811
- const parent = ancestorsResult.ok ? (ancestorsResult.data.items ?? []).find((item) => item.id === id)?.parent ?? null : null;
801
+ const itemResult = await chainCms("get-item-document", { id: [id] });
802
+ const parent = itemResult.ok ? itemResult.data.items[0]?.parent ?? null : null;
812
803
  const result = await chainCms("validate-document", {
813
804
  id,
814
805
  documentType: { id: target.documentType.id },
815
806
  template: target.template ? { id: target.template.id } : null,
816
- parent,
807
+ parent: parent ? { id: parent.id } : null,
817
808
  values,
818
809
  variants
819
810
  });
@@ -957,6 +948,30 @@ function isBlockListOrGridValue(value) {
957
948
  function isRteWithBlocks(value) {
958
949
  return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && value.blocks !== null && typeof value.blocks === "object" && Array.isArray(value.blocks?.contentData);
959
950
  }
951
+
952
+ // src/umbraco-api/tools/helpers/block-inspector.ts
953
+ function blockPropertiesSchema(editTool) {
954
+ return z.array(z.object({
955
+ propertyAlias: z.string().describe("The property containing these blocks"),
956
+ editorAlias: z.string().optional(),
957
+ blocks: z.array(z.object({
958
+ contentKey: z.string().describe(`The block's unique key \u2014 use this with ${editTool}`),
959
+ contentTypeKey: z.string().describe("The block's element type ID"),
960
+ settingsKey: z.string().optional().describe("The key of the block's settings entry. Absent when the block has no settings."),
961
+ properties: z.array(z.object({
962
+ alias: z.string(),
963
+ value: z.any()
964
+ }))
965
+ }))
966
+ }));
967
+ }
968
+ function extractBlocks(contentData) {
969
+ return contentData.map((block) => ({
970
+ contentKey: block?.key ?? "",
971
+ contentTypeKey: block?.contentTypeKey ?? "",
972
+ properties: Array.isArray(block?.values) ? block.values.map((v) => ({ alias: v?.alias ?? "", value: v?.value })) : []
973
+ }));
974
+ }
960
975
  function findSettingsKey(container, contentKey) {
961
976
  const layout = container?.layout;
962
977
  if (!layout || typeof layout !== "object") return void 0;
@@ -983,6 +998,94 @@ function searchLayout(entries, contentKey) {
983
998
  }
984
999
  return void 0;
985
1000
  }
1001
+ function collectBlockProperties(values, propertyAlias) {
1002
+ const filtered = propertyAlias ? values.filter((v) => v.alias === propertyAlias) : values;
1003
+ return filtered.filter((v) => isBlockListOrGridValue(v.value) || isRteWithBlocks(v.value)).map((v) => {
1004
+ const value = v.value;
1005
+ const container = isRteWithBlocks(value) ? value.blocks : value;
1006
+ return {
1007
+ propertyAlias: v.alias,
1008
+ editorAlias: isRteWithBlocks(value) ? "Umbraco.RichText" : v.editorAlias ?? void 0,
1009
+ blocks: withSettingsKeys(extractBlocks(container.contentData), container)
1010
+ };
1011
+ });
1012
+ }
1013
+ var MAX_ENRICHED_BLOCKS = 50;
1014
+ var MAX_BLOCK_WALK_DEPTH = 20;
1015
+ function enrichBlockNotFoundError(errorResult, values, options = {}) {
1016
+ const problem = extractInnerProblemDetails(errorResult);
1017
+ const availableBlocks = problem.availableBlocks;
1018
+ if (!Array.isArray(availableBlocks)) return errorResult;
1019
+ const { propertyAlias, note } = options;
1020
+ const filtered = propertyAlias ? values.filter((v) => v.alias === propertyAlias) : values;
1021
+ const typeByKey = /* @__PURE__ */ new Map();
1022
+ for (const v of filtered) {
1023
+ const container = isRteWithBlocks(v.value) ? v.value.blocks : v.value;
1024
+ if (isBlockListOrGridValue(container)) {
1025
+ collectBlockEntryTypes(container, typeByKey, 0);
1026
+ }
1027
+ }
1028
+ const truncated = availableBlocks.length > MAX_ENRICHED_BLOCKS;
1029
+ const limitedBlocks = truncated ? availableBlocks.slice(0, MAX_ENRICHED_BLOCKS) : availableBlocks;
1030
+ const enrichedBlocks = limitedBlocks.map(
1031
+ (b) => b && typeof b === "object" && typeof b.key === "string" ? { ...b, contentTypeKey: typeByKey.get(b.key) ?? null } : b
1032
+ );
1033
+ return createToolResultError({
1034
+ ...problem,
1035
+ availableBlocks: enrichedBlocks,
1036
+ ...truncated ? { availableBlocksNote: `Showing ${MAX_ENRICHED_BLOCKS} of ${availableBlocks.length} available blocks \u2014 use inspect-blocks for the full list.` } : {},
1037
+ ...note ? { note } : {}
1038
+ });
1039
+ }
1040
+ function collectBlockEntryTypes(container, into, depth) {
1041
+ if (depth > MAX_BLOCK_WALK_DEPTH) return;
1042
+ for (const list of [container.contentData, container.settingsData]) {
1043
+ if (!Array.isArray(list)) continue;
1044
+ for (const block of list) {
1045
+ if (!block || typeof block !== "object") continue;
1046
+ const key = block.key;
1047
+ const contentTypeKey = block.contentTypeKey;
1048
+ if (typeof key === "string" && typeof contentTypeKey === "string") into.set(key, contentTypeKey);
1049
+ const nestedValues = block.values;
1050
+ if (!Array.isArray(nestedValues)) continue;
1051
+ for (const nested of nestedValues) {
1052
+ const nestedRaw = nested?.value;
1053
+ const nestedContainer = isRteWithBlocks(nestedRaw) ? nestedRaw.blocks : nestedRaw;
1054
+ if (isBlockListOrGridValue(nestedContainer)) {
1055
+ collectBlockEntryTypes(nestedContainer, into, depth + 1);
1056
+ }
1057
+ }
1058
+ }
1059
+ }
1060
+ }
1061
+ function withSettingsKeys(blocks, container) {
1062
+ return blocks.map((block) => {
1063
+ const settingsKey = findSettingsKey(container, block.contentKey);
1064
+ return settingsKey ? { ...block, settingsKey } : block;
1065
+ });
1066
+ }
1067
+ var blockPropertyAliasSchema = z.string().regex(
1068
+ /^[A-Za-z_][A-Za-z0-9_]*$/,
1069
+ "Property alias must be a valid identifier (letters, digits, underscore; not starting with a digit)"
1070
+ );
1071
+ function classifyBlockUpdateResults(results, requestedCount, requestedAliases = [], expectedEntryCount = 1) {
1072
+ const list = results ?? [];
1073
+ const processedCount = list.reduce((sum, r) => sum + (r.updatedCount ?? 0) + (r.addedCount ?? 0), 0);
1074
+ const updatedEntryCount = list.filter((r) => (r.updatedCount ?? 0) + (r.addedCount ?? 0) > 0).length;
1075
+ const errors = list.flatMap((r) => r.errors ?? []);
1076
+ const warnings = list.flatMap((r) => r.warnings ?? []);
1077
+ const failureText = [...errors, ...warnings].join("; ");
1078
+ const unresolvedEntries = list.filter(
1079
+ (r) => (r.updatedCount ?? 0) + (r.addedCount ?? 0) === 0 && !r.errors?.length && !r.warnings?.length
1080
+ );
1081
+ const missingEntryCount = Math.max(0, expectedEntryCount - list.length);
1082
+ const unresolvedBlockCount = unresolvedEntries.length + missingEntryCount;
1083
+ const detail = [...errors, ...warnings, ...unresolvedEntries.map((r) => r.message).filter(Boolean)].join("; ") || list.map((r) => r.message).filter(Boolean).join("; ") || "no detail returned";
1084
+ const outcome = processedCount === 0 ? "failed" : processedCount < requestedCount ? "partial" : "clean";
1085
+ const failedFields = requestedAliases.filter((alias) => failureText.includes(`'${alias}'`));
1086
+ const savedFields = unresolvedBlockCount > 0 ? [] : requestedAliases.filter((alias) => !failedFields.includes(alias));
1087
+ return { outcome, processedCount, updatedEntryCount, detail, warnings, savedFields, failedFields, unresolvedBlockCount };
1088
+ }
986
1089
 
987
1090
  // src/umbraco-api/tools/content/get/inspect-blocks.ts
988
1091
  var inputSchema6 = {
@@ -993,41 +1096,11 @@ var outputSchema6 = z.object({
993
1096
  id: z.string(),
994
1097
  name: z.string(),
995
1098
  previewUrl: previewUrlSchema,
996
- blockProperties: z.array(z.object({
997
- propertyAlias: z.string().describe("The document property containing these blocks"),
998
- editorAlias: z.string().optional(),
999
- blocks: z.array(z.object({
1000
- contentKey: z.string().describe("The block's unique key \u2014 use this with edit-block"),
1001
- contentTypeKey: z.string().describe("The block's element type ID"),
1002
- settingsKey: z.string().optional().describe("The key of the block's settings entry. Absent when the block has no settings."),
1003
- properties: z.array(z.object({
1004
- alias: z.string(),
1005
- value: z.any()
1006
- }))
1007
- }))
1008
- }))
1099
+ blockProperties: blockPropertiesSchema("edit-block")
1009
1100
  });
1010
- function isBlockListOrGridValue2(value) {
1011
- return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
1012
- }
1013
- function isRteWithBlocks2(value) {
1014
- return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && value.blocks !== null && typeof value.blocks === "object" && Array.isArray(value.blocks?.contentData);
1015
- }
1016
- function extractBlocks(contentData, container) {
1017
- return contentData.map((block) => {
1018
- const contentKey = block.key ?? "";
1019
- const settingsKey = findSettingsKey(container, contentKey);
1020
- return {
1021
- contentKey,
1022
- contentTypeKey: block.contentTypeKey ?? "",
1023
- ...settingsKey ? { settingsKey } : {},
1024
- properties: Array.isArray(block.values) ? block.values.map((v) => ({ alias: v.alias ?? "", value: v.value })) : []
1025
- };
1026
- });
1027
- }
1028
1101
  var tool6 = {
1029
1102
  name: "inspect-blocks",
1030
- description: "Inspect the block structure of a content page. Shows each block's type, unique key, and property values. Use this to understand how content is structured inside BlockList, BlockGrid, or Rich Text properties before using edit-block to make changes.",
1103
+ description: "Inspect the block structure of a content page. Shows each block's type, unique key, and property values. Use this to understand how content is structured inside BlockList, BlockGrid, or Rich Text properties before using edit-block to make changes. Content pages only \u2014 for blocks on a Library element use inspect-element-blocks instead.",
1031
1104
  inputSchema: inputSchema6,
1032
1105
  outputSchema: outputSchema6,
1033
1106
  slices: ["read"],
@@ -1036,28 +1109,11 @@ var tool6 = {
1036
1109
  const result = await chainCms("get-document-by-id", { id });
1037
1110
  if (!result.ok) return result.errorResult;
1038
1111
  const doc = result.data;
1039
- const allValues = doc.values ?? [];
1040
- const filtered = propertyAlias ? allValues.filter((v) => v.alias === propertyAlias) : allValues;
1041
- const blockProperties = filtered.filter((v) => isBlockListOrGridValue2(v.value) || isRteWithBlocks2(v.value)).map((v) => {
1042
- const value = v.value;
1043
- if (isRteWithBlocks2(value)) {
1044
- return {
1045
- propertyAlias: v.alias,
1046
- editorAlias: "Umbraco.RichText",
1047
- blocks: extractBlocks(value.blocks.contentData, value.blocks)
1048
- };
1049
- }
1050
- return {
1051
- propertyAlias: v.alias,
1052
- editorAlias: v.editorAlias ?? void 0,
1053
- blocks: extractBlocks(value.contentData, value)
1054
- };
1055
- });
1056
1112
  return createToolResult({
1057
1113
  id: doc.id,
1058
1114
  name: doc.variants?.[0]?.name ?? "Unknown",
1059
1115
  previewUrl: buildPreviewUrl(doc.id),
1060
- blockProperties
1116
+ blockProperties: collectBlockProperties(doc.values ?? [], propertyAlias)
1061
1117
  });
1062
1118
  }
1063
1119
  };
@@ -1385,7 +1441,8 @@ ${aliases.join("\n")}`
1385
1441
  const schemaResult = await chainCms("get-data-type-schema", { id: match.id });
1386
1442
  if (!schemaResult.ok) return schemaResult.errorResult;
1387
1443
  return createToolResult({
1388
- message: JSON.stringify(schemaResult.data, null, 2),
1444
+ message: `Value-shape template for ${editorAlias}:
1445
+ ${JSON.stringify(schemaResult.data, null, 2)}`,
1389
1446
  editorAlias
1390
1447
  });
1391
1448
  }
@@ -1532,7 +1589,7 @@ var outputSchema12 = z.object({
1532
1589
  });
1533
1590
  var tool12 = {
1534
1591
  name: "create-and-publish-page",
1535
- description: "Create a new content page and publish it \u2014 mirrors clicking 'Save and publish' (instead of 'Save') on the create screen in the Umbraco backoffice. This is a single atomic operation when the connected Umbraco instance supports it (17.6+); otherwise a two-call create-then-publish sequence is used. Call list-document-types first to find a valid documentTypeId. Use this as a starting point: pass `name`, `documentTypeId`, optional `parentId`, and at most a small number of simple initial values. Required-property validation runs at publish time, not create time: on the atomic path a validation failure leaves no page behind, but on the fallback path the draft can already have been created before publish fails, leaving an unpublished draft. Either way, check the response `message` before retrying \u2014 don't retry blindly, or you may pile up duplicate drafts. Use create-page followed by save-and-publish instead when you need to build up content across multiple calls before publishing.",
1592
+ description: "Create a new content page and publish it in one atomic operation \u2014 mirrors clicking 'Save and publish' (instead of 'Save') on the create screen in the Umbraco backoffice. Call list-document-types first to find a valid documentTypeId. Use this as a starting point: pass `name`, `documentTypeId`, optional `parentId`, and at most a small number of simple initial values. If the document type requires properties this doesn't set, or if the values fail validation, the whole operation fails and no page is created \u2014 use create-page followed by save-and-publish instead when you need to build up content across multiple calls before publishing.",
1536
1593
  inputSchema: inputSchema12,
1537
1594
  outputSchema: outputSchema12,
1538
1595
  slices: ["create", "publish"],
@@ -1540,42 +1597,14 @@ var tool12 = {
1540
1597
  handler: async ({ name, documentTypeId, parentId, values }) => {
1541
1598
  const resolved = await resolveEditorAliases(documentTypeId, values);
1542
1599
  if (!resolved.ok) return resolved.errorResult;
1543
- if (await isCmsToolAvailable("create-and-publish-document")) {
1544
- const createResult = await chainCms("create-and-publish-document", {
1545
- documentTypeId,
1546
- name,
1547
- values: resolved.values,
1548
- ...parentId ? { parentId } : {}
1549
- });
1550
- if (!createResult.ok) return createResult.errorResult;
1551
- const createdId2 = createResult.data.id;
1552
- return createToolResult({
1553
- message: `Created and published "${name}"`,
1554
- id: createdId2,
1555
- name,
1556
- publishedUrls: createdId2 ? await fetchPublishedUrls(createdId2) : []
1557
- });
1558
- }
1559
- const createDocumentResult = await chainCms("create-document", {
1600
+ const createResult = await chainCms("create-and-publish-document", {
1560
1601
  documentTypeId,
1561
1602
  name,
1562
1603
  values: resolved.values,
1563
1604
  ...parentId ? { parentId } : {}
1564
1605
  });
1565
- if (!createDocumentResult.ok) return createDocumentResult.errorResult;
1566
- const createdId = createDocumentResult.data.id;
1567
- const publishResult = await chainCms("publish-document", {
1568
- id: createdId,
1569
- data: { publishSchedules: [{ culture: null }] }
1570
- });
1571
- if (!publishResult.ok) {
1572
- return createToolResult({
1573
- message: `Created "${name}" as a draft but publish failed: ${publishResult.errorResult.content?.[0]?.text ?? "unknown error"}`,
1574
- id: createdId,
1575
- name,
1576
- publishedUrls: []
1577
- });
1578
- }
1606
+ if (!createResult.ok) return createResult.errorResult;
1607
+ const createdId = createResult.data.id;
1579
1608
  return createToolResult({
1580
1609
  message: `Created and published "${name}"`,
1581
1610
  id: createdId,
@@ -1913,78 +1942,6 @@ var tool17 = {
1913
1942
  }
1914
1943
  };
1915
1944
  var edit_page_default = withStandardDecorators(tool17);
1916
- var MAX_ENRICHED_BLOCKS = 50;
1917
- var MAX_BLOCK_WALK_DEPTH = 20;
1918
- function enrichBlockNotFoundError(errorResult, values, options = {}) {
1919
- const problem = extractInnerProblemDetails(errorResult);
1920
- const availableBlocks = problem.availableBlocks;
1921
- if (!Array.isArray(availableBlocks)) return errorResult;
1922
- const { propertyAlias, note } = options;
1923
- const filtered = propertyAlias ? values.filter((v) => v.alias === propertyAlias) : values;
1924
- const typeByKey = /* @__PURE__ */ new Map();
1925
- for (const v of filtered) {
1926
- const container = isRteWithBlocks(v.value) ? v.value.blocks : v.value;
1927
- if (isBlockListOrGridValue(container)) {
1928
- collectBlockEntryTypes(container, typeByKey, 0);
1929
- }
1930
- }
1931
- const truncated = availableBlocks.length > MAX_ENRICHED_BLOCKS;
1932
- const limitedBlocks = truncated ? availableBlocks.slice(0, MAX_ENRICHED_BLOCKS) : availableBlocks;
1933
- const enrichedBlocks = limitedBlocks.map(
1934
- (b) => b && typeof b === "object" && typeof b.key === "string" ? { ...b, contentTypeKey: typeByKey.get(b.key) ?? null } : b
1935
- );
1936
- return createToolResultError({
1937
- ...problem,
1938
- availableBlocks: enrichedBlocks,
1939
- ...truncated ? { availableBlocksNote: `Showing ${MAX_ENRICHED_BLOCKS} of ${availableBlocks.length} available blocks \u2014 use inspect-blocks for the full list.` } : {},
1940
- ...note ? { note } : {}
1941
- });
1942
- }
1943
- function collectBlockEntryTypes(container, into, depth) {
1944
- if (depth > MAX_BLOCK_WALK_DEPTH) return;
1945
- for (const list of [container.contentData, container.settingsData]) {
1946
- if (!Array.isArray(list)) continue;
1947
- for (const block of list) {
1948
- if (!block || typeof block !== "object") continue;
1949
- const key = block.key;
1950
- const contentTypeKey = block.contentTypeKey;
1951
- if (typeof key === "string" && typeof contentTypeKey === "string") into.set(key, contentTypeKey);
1952
- const nestedValues = block.values;
1953
- if (!Array.isArray(nestedValues)) continue;
1954
- for (const nested of nestedValues) {
1955
- const nestedRaw = nested?.value;
1956
- const nestedContainer = isRteWithBlocks(nestedRaw) ? nestedRaw.blocks : nestedRaw;
1957
- if (isBlockListOrGridValue(nestedContainer)) {
1958
- collectBlockEntryTypes(nestedContainer, into, depth + 1);
1959
- }
1960
- }
1961
- }
1962
- }
1963
- }
1964
- var blockPropertyAliasSchema = z.string().regex(
1965
- /^[A-Za-z_][A-Za-z0-9_]*$/,
1966
- "Property alias must be a valid identifier (letters, digits, underscore; not starting with a digit)"
1967
- );
1968
- function classifyBlockUpdateResults(results, requestedCount, requestedAliases = [], expectedEntryCount = 1) {
1969
- const list = results ?? [];
1970
- const processedCount = list.reduce((sum, r) => sum + (r.updatedCount ?? 0) + (r.addedCount ?? 0), 0);
1971
- const updatedEntryCount = list.filter((r) => (r.updatedCount ?? 0) + (r.addedCount ?? 0) > 0).length;
1972
- const errors = list.flatMap((r) => r.errors ?? []);
1973
- const warnings = list.flatMap((r) => r.warnings ?? []);
1974
- const failureText = [...errors, ...warnings].join("; ");
1975
- const unresolvedEntries = list.filter(
1976
- (r) => (r.updatedCount ?? 0) + (r.addedCount ?? 0) === 0 && !r.errors?.length && !r.warnings?.length
1977
- );
1978
- const missingEntryCount = Math.max(0, expectedEntryCount - list.length);
1979
- const unresolvedBlockCount = unresolvedEntries.length + missingEntryCount;
1980
- const detail = [...errors, ...warnings, ...unresolvedEntries.map((r) => r.message).filter(Boolean)].join("; ") || list.map((r) => r.message).filter(Boolean).join("; ") || "no detail returned";
1981
- const outcome = processedCount === 0 ? "failed" : processedCount < requestedCount ? "partial" : "clean";
1982
- const failedFields = requestedAliases.filter((alias) => failureText.includes(`'${alias}'`));
1983
- const savedFields = unresolvedBlockCount > 0 ? [] : requestedAliases.filter((alias) => !failedFields.includes(alias));
1984
- return { outcome, processedCount, updatedEntryCount, detail, warnings, savedFields, failedFields, unresolvedBlockCount };
1985
- }
1986
-
1987
- // src/umbraco-api/tools/content/put/edit-block.ts
1988
1945
  var inputSchema18 = {
1989
1946
  id: z.string().uuid().describe("The ID of the page containing the block"),
1990
1947
  propertyAlias: z.string().describe("The document property alias containing the blocks (e.g. 'mainContent'). Use inspect-blocks to find this."),
@@ -2009,7 +1966,7 @@ var outputSchema18 = z.object({
2009
1966
  });
2010
1967
  var tool18 = {
2011
1968
  name: "edit-block",
2012
- description: "Update properties within a specific block (BlockList, BlockGrid, or Rich Text block). Use inspect-blocks first to find the propertyAlias and contentKey. Pass blockType='settings' to edit a block's settings instead of its content. For non-block page properties, use edit-page instead. For structured property values inside the block (media pickers, content pickers, image cropper, slider, color, date, etc.) call get-property-value-template with the editor alias first to see the expected JSON shape. Culture/segment applies to the document property level \u2014 use separate calls for mixed-variant blocks. Changes are saved but NOT published. The response includes a `validation` field \u2014 if `validation.valid` is false the changes were saved but the parent page cannot be published until the listed errors are resolved.",
1969
+ description: "Update properties within a specific block (BlockList, BlockGrid, or Rich Text block). Use inspect-blocks first to find the propertyAlias and contentKey. Pass blockType='settings' to edit a block's settings instead of its content. For non-block page properties, use edit-page instead. Content pages only \u2014 for a block on a Library element use inspect-element-blocks then edit-element-block, not this tool. For structured property values inside the block (media pickers, content pickers, image cropper, slider, color, date, etc.) call get-property-value-template with the editor alias first to see the expected JSON shape. Culture/segment applies to the document property level \u2014 use separate calls for mixed-variant blocks. Changes are saved but NOT published. The response includes a `validation` field \u2014 if `validation.valid` is false the changes were saved but the parent page cannot be published until the listed errors are resolved.",
2013
1970
  inputSchema: inputSchema18,
2014
1971
  outputSchema: outputSchema18,
2015
1972
  slices: ["update"],
@@ -2121,7 +2078,8 @@ var tool19 = {
2121
2078
  const targetCulture = culture ?? null;
2122
2079
  const docResult = await chainCms("get-document-by-id", { id });
2123
2080
  if (!docResult.ok) return docResult.errorResult;
2124
- const variants = docResult.data.variants ?? [];
2081
+ const doc = docResult.data;
2082
+ const variants = doc.variants ?? [];
2125
2083
  const targetVariant = variants.find((v) => matchesCulture(v, targetCulture));
2126
2084
  if (!targetVariant) {
2127
2085
  if (targetCulture) {
@@ -2155,8 +2113,8 @@ var tool19 = {
2155
2113
  previewUrl: buildPreviewUrl(id)
2156
2114
  });
2157
2115
  }
2158
- const renameResult = await chainCms("update-document-name", { id, name, culture: targetCulture });
2159
- if (!renameResult.ok) return renameResult.errorResult;
2116
+ const updateResult = await chainCms("update-document-name", { id, name, culture: targetCulture });
2117
+ if (!updateResult.ok) return updateResult.errorResult;
2160
2118
  return createToolResult({
2161
2119
  message: `Renamed page${cultureLabel} from "${previousName}" to "${name}" (saved, not published)`,
2162
2120
  id,
@@ -2636,17 +2594,36 @@ var outputSchema27 = z.object({
2636
2594
  updatedFields: z.array(z.string()),
2637
2595
  publishedUrls: publishedUrlsSchema
2638
2596
  });
2639
- function mergeValues(existing, updates) {
2640
- const key = (v) => `${v.alias}::${v.culture ?? ""}::${v.segment ?? ""}`;
2641
- const merged = new Map(existing.map((v) => [key(v), { alias: v.alias, value: v.value, culture: v.culture ?? null, segment: v.segment ?? null }]));
2642
- for (const u of updates) {
2643
- merged.set(key(u), { alias: u.alias, value: u.value, culture: u.culture ?? null, segment: u.segment ?? null });
2597
+ function valueKey2(value) {
2598
+ return `${value.alias}|${value.culture ?? ""}|${value.segment ?? ""}`;
2599
+ }
2600
+ function normaliseValue(value) {
2601
+ return {
2602
+ alias: value.alias,
2603
+ value: value.value,
2604
+ culture: value.culture ?? null,
2605
+ segment: value.segment ?? null
2606
+ };
2607
+ }
2608
+ function mergeValues(current, incoming) {
2609
+ const merged = current.map(normaliseValue);
2610
+ const indexByKey = new Map(merged.map((value, index) => [valueKey2(value), index]));
2611
+ for (const value of incoming) {
2612
+ const next = normaliseValue(value);
2613
+ const key = valueKey2(next);
2614
+ const existingIndex = indexByKey.get(key);
2615
+ if (existingIndex !== void 0) {
2616
+ merged[existingIndex] = next;
2617
+ } else {
2618
+ indexByKey.set(key, merged.length);
2619
+ merged.push(next);
2620
+ }
2644
2621
  }
2645
- return [...merged.values()];
2622
+ return merged;
2646
2623
  }
2647
2624
  var tool27 = {
2648
2625
  name: "save-and-publish",
2649
- description: "Save property changes and publish a content page \u2014 mirrors the 'Save and publish' button in the Umbraco backoffice. If `values` is provided the changes are saved first; then the page is published. This is a single atomic operation when the connected Umbraco instance supports it (17.6+), otherwise a two-call save-then-publish sequence is used. Optionally publish descendants. Call get-page or get-document-type first to discover valid property aliases.",
2626
+ description: "Save property changes and publish a content page in one atomic operation \u2014 mirrors the 'Save and publish' button in the Umbraco backoffice. If `values` is provided the changes are saved and published in a single call; otherwise the current draft is published as-is. Optionally publish descendants. Call get-page or get-document-type first to discover valid property aliases.",
2650
2627
  inputSchema: inputSchema27,
2651
2628
  outputSchema: outputSchema27,
2652
2629
  slices: ["publish", "update"],
@@ -2657,6 +2634,7 @@ var tool27 = {
2657
2634
  const doc = docResult.data;
2658
2635
  const pageName = doc.variants?.[0]?.name ?? "Unknown";
2659
2636
  const fieldNames = (values ?? []).map((v) => v.alias);
2637
+ const hasValues = (values?.length ?? 0) > 0;
2660
2638
  if (includeDescendants) {
2661
2639
  if (!await requestApproval(extra, `Publish "${pageName}" and all its descendants?`)) {
2662
2640
  return createToolResult({
@@ -2671,9 +2649,9 @@ var tool27 = {
2671
2649
  }
2672
2650
  }
2673
2651
  const variantCultures = (doc.variants ?? []).length ? doc.variants.map((v) => v.culture ?? null) : [null];
2674
- const saved = !!(values && values.length > 0);
2675
2652
  if (includeDescendants) {
2676
- if (saved) {
2653
+ let saved = false;
2654
+ if (hasValues) {
2677
2655
  const properties = values.map((v) => ({
2678
2656
  alias: v.alias,
2679
2657
  value: v.value,
@@ -2682,6 +2660,7 @@ var tool27 = {
2682
2660
  }));
2683
2661
  const updateResult = await chainCms("update-document-properties", { id, properties });
2684
2662
  if (!updateResult.ok) return updateResult.errorResult;
2663
+ saved = true;
2685
2664
  }
2686
2665
  const publishResult = await chainCms("publish-document-with-descendants", {
2687
2666
  id,
@@ -2704,85 +2683,74 @@ var tool27 = {
2704
2683
  }
2705
2684
  return publishResult.errorResult;
2706
2685
  }
2707
- } else {
2708
- const mergedValues = mergeValues(doc.values ?? [], values ?? []);
2709
- const variants = (doc.variants ?? []).map((v) => ({
2710
- culture: v.culture ?? null,
2711
- segment: v.segment ?? null,
2712
- name: v.name
2713
- }));
2714
- if (await isCmsToolAvailable("update-and-publish-document")) {
2715
- const updateAndPublishResult = await chainCms("update-and-publish-document", {
2716
- id,
2717
- data: {
2718
- values: mergedValues,
2719
- variants,
2720
- template: doc.template ?? null,
2721
- culturesToPublish: variantCultures.filter((c) => c !== null)
2722
- }
2723
- });
2724
- if (!updateAndPublishResult.ok) return updateAndPublishResult.errorResult;
2725
- } else {
2726
- const updateResult = await chainCms("update-document", {
2727
- id,
2728
- data: {
2729
- values: mergedValues,
2730
- variants,
2731
- template: doc.template ?? null
2732
- }
2686
+ const savedPart2 = saved ? `Saved ${fieldNames.length} field(s) and ` : "";
2687
+ return createToolResult({
2688
+ message: `${savedPart2}published "${pageName}" and all descendants`,
2689
+ id,
2690
+ name: pageName,
2691
+ saved,
2692
+ published: true,
2693
+ updatedFields: fieldNames,
2694
+ publishedUrls: await fetchPublishedUrls(id)
2695
+ });
2696
+ }
2697
+ if (hasValues) {
2698
+ const updateAndPublishResult = await chainCms("update-and-publish-document", {
2699
+ id,
2700
+ data: {
2701
+ culturesToPublish: [...new Set(variantCultures.filter((c) => c !== null))],
2702
+ template: doc.template ?? null,
2703
+ values: mergeValues(doc.values ?? [], values),
2704
+ variants: (doc.variants ?? []).map((v) => ({
2705
+ culture: v.culture ?? null,
2706
+ segment: v.segment ?? null,
2707
+ name: v.name
2708
+ }))
2709
+ }
2710
+ });
2711
+ if (!updateAndPublishResult.ok) {
2712
+ const rolledBack = `No changes were saved to "${pageName}" \u2014 save-and-publish is a single atomic operation, so the field updates were rolled back along with the publish.`;
2713
+ const problem = extractInnerProblemDetails(updateAndPublishResult.errorResult);
2714
+ return createToolResultError({
2715
+ ...problem,
2716
+ status: typeof problem?.status === "number" ? problem.status : 500,
2717
+ title: "Save and publish failed",
2718
+ detail: problem?.detail ? `${String(problem.detail)} ${rolledBack}` : rolledBack
2733
2719
  });
2734
- if (!updateResult.ok) return updateResult.errorResult;
2735
- const publishResult = await chainCms("publish-document", {
2720
+ }
2721
+ } else {
2722
+ const publishResult = await chainCms("publish-document", {
2723
+ id,
2724
+ data: { publishSchedules: variantCultures.map((c) => ({ culture: c })) }
2725
+ });
2726
+ if (!publishResult.ok) return publishResult.errorResult;
2727
+ }
2728
+ const verifyError = await verifyDocumentPublished(id, variantCultures);
2729
+ if (verifyError) {
2730
+ if (hasValues) {
2731
+ return createToolResult({
2732
+ message: `Saved ${fieldNames.length} field(s) on "${pageName}" but publish did not take effect: ${verifyError}`,
2736
2733
  id,
2737
- data: {
2738
- publishSchedules: variantCultures.map((c) => ({ culture: c }))
2739
- }
2740
- });
2741
- if (!publishResult.ok) {
2742
- if (saved) {
2743
- return createToolResult({
2744
- message: `Saved ${fieldNames.length} field(s) on "${pageName}" but publish failed: ${publishResult.errorResult.content?.[0]?.text ?? "unknown error"}`,
2745
- id,
2746
- name: pageName,
2747
- saved: true,
2748
- published: false,
2749
- updatedFields: fieldNames,
2750
- publishedUrls: []
2751
- });
2752
- }
2753
- return publishResult.errorResult;
2754
- }
2755
- }
2756
- }
2757
- if (!includeDescendants) {
2758
- const verifyError = await verifyDocumentPublished(id, variantCultures);
2759
- if (verifyError) {
2760
- if (saved) {
2761
- return createToolResult({
2762
- message: `Saved ${fieldNames.length} field(s) on "${pageName}" but publish did not take effect: ${verifyError}`,
2763
- id,
2764
- name: pageName,
2765
- saved: true,
2766
- published: false,
2767
- updatedFields: fieldNames,
2768
- publishedUrls: []
2769
- });
2770
- }
2771
- return createToolResultError({
2772
- status: 500,
2773
- title: "Publish did not take effect",
2774
- detail: `"${pageName}": ${verifyError}`
2734
+ name: pageName,
2735
+ saved: true,
2736
+ published: false,
2737
+ updatedFields: fieldNames,
2738
+ publishedUrls: []
2775
2739
  });
2776
2740
  }
2741
+ return createToolResultError({
2742
+ status: 500,
2743
+ title: "Publish did not take effect",
2744
+ detail: `"${pageName}": ${verifyError}`
2745
+ });
2777
2746
  }
2778
2747
  const publishedUrls = await fetchPublishedUrls(id);
2779
- const savedPart = saved ? `Saved ${fieldNames.length} field(s) and ` : "";
2780
- const descPart = includeDescendants ? " and all descendants" : "";
2748
+ const savedPart = hasValues ? `Saved ${fieldNames.length} field(s) and ` : "";
2781
2749
  return createToolResult({
2782
- message: `${savedPart}published "${pageName}"${descPart}`,
2750
+ message: `${savedPart}published "${pageName}"`,
2783
2751
  id,
2784
2752
  name: pageName,
2785
- saved,
2753
+ saved: hasValues,
2786
2754
  published: true,
2787
2755
  updatedFields: fieldNames,
2788
2756
  publishedUrls
@@ -3853,11 +3821,525 @@ var collection5 = {
3853
3821
  };
3854
3822
  var media_management_default = collection5;
3855
3823
  var inputSchema46 = {
3824
+ id: z.string().uuid().describe("The unique ID of the element to retrieve")
3825
+ };
3826
+ var outputSchema46 = z.object({
3827
+ id: z.string(),
3828
+ name: z.string(),
3829
+ elementType: z.object({ id: z.string() }).describe("The element type (document type) this element is based on"),
3830
+ values: z.array(z.object({ alias: z.string(), value: z.any() }).passthrough()).describe("Property field values"),
3831
+ variants: z.array(z.object({ name: z.string() }).passthrough()).describe("Language/culture variants")
3832
+ });
3833
+ var tool46 = {
3834
+ name: "get-element",
3835
+ description: "Get the full details of a Library element \u2014 its element type, all property values, and culture variants. Elements are the document-like reusable content items that live in the Library section. Use this after search-elements or list-element-children to see what an element contains, and before edit-element to discover valid property aliases.",
3836
+ inputSchema: inputSchema46,
3837
+ outputSchema: outputSchema46,
3838
+ slices: ["read"],
3839
+ annotations: { readOnlyHint: true },
3840
+ handler: async ({ id }) => {
3841
+ const result = await chainCms("get-element-by-id", { id });
3842
+ if (!result.ok) return result.errorResult;
3843
+ const el = result.data;
3844
+ return createToolResult({
3845
+ id: el.id,
3846
+ name: el.variants?.[0]?.name ?? "Unknown",
3847
+ elementType: { id: el.documentType?.id ?? el.elementType?.id ?? "" },
3848
+ values: el.values ?? [],
3849
+ variants: el.variants ?? []
3850
+ });
3851
+ }
3852
+ };
3853
+ var get_element_default = withStandardDecorators(tool46);
3854
+ var inputSchema47 = {
3855
+ parentId: z.string().uuid().optional().describe("Parent folder ID in the Library. Omit to list the root of the Library (top-level folders and elements)."),
3856
+ take: z.number().optional().default(20).describe("Number of results to return"),
3857
+ skip: z.number().optional().default(0).describe("Number of results to skip")
3858
+ };
3859
+ var outputSchema47 = z.object({
3860
+ items: z.array(z.object({
3861
+ id: z.string(),
3862
+ name: z.string(),
3863
+ isFolder: z.boolean().describe("True if this node is a folder that organises elements, false if it is an element item"),
3864
+ hasChildren: z.boolean()
3865
+ })).describe("Child folders and elements"),
3866
+ total: z.number().describe("Total number of children")
3867
+ });
3868
+ var tool47 = {
3869
+ name: "list-element-children",
3870
+ description: "Browse the Library tree \u2014 list the folders and elements under a folder, or the Library root when no parentId is given. Elements are the document-like reusable content items in the Library section (Umbraco 18). Use this to navigate the Library, then get-element to see an element's details.",
3871
+ inputSchema: inputSchema47,
3872
+ outputSchema: outputSchema47,
3873
+ slices: ["tree"],
3874
+ annotations: { readOnlyHint: true },
3875
+ handler: async ({ parentId, take, skip }) => {
3876
+ const cursor = buildChainedCursor(skip, take);
3877
+ const result = parentId ? await chainCms("get-element-children", { parentId, cursor }) : await chainCms("get-element-root", { cursor });
3878
+ if (!result.ok) return result.errorResult;
3879
+ const data = result.data;
3880
+ const items = data.items ?? [];
3881
+ return createToolResult({
3882
+ items: items.map((item) => ({
3883
+ id: item.id,
3884
+ name: item.variants?.[0]?.name ?? item.name ?? "Unknown",
3885
+ isFolder: item.isFolder ?? false,
3886
+ hasChildren: item.hasChildren ?? false
3887
+ })),
3888
+ total: data.total ?? items.length
3889
+ });
3890
+ }
3891
+ };
3892
+ var list_element_children_default = withStandardDecorators(tool47);
3893
+ var inputSchema48 = {
3894
+ query: z.string().describe("Search term to find Library elements by name"),
3895
+ take: z.number().optional().default(10).describe("Number of results to return (default 10)"),
3896
+ skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
3897
+ };
3898
+ var outputSchema48 = z.object({
3899
+ items: z.array(z.object({
3900
+ id: z.string(),
3901
+ name: z.string()
3902
+ })).describe("Matching Library elements"),
3903
+ total: z.number().describe("Total number of matches")
3904
+ });
3905
+ var tool48 = {
3906
+ name: "search-elements",
3907
+ description: "Search for Library elements by name. Returns matching elements with their names and IDs. Use get-element with an ID from the results to retrieve an element's full details. Elements are the document-like reusable content items in the Library section (Umbraco 18).",
3908
+ inputSchema: inputSchema48,
3909
+ outputSchema: outputSchema48,
3910
+ slices: ["search"],
3911
+ annotations: { readOnlyHint: true },
3912
+ handler: async ({ query, take, skip }) => {
3913
+ const result = await chainCms("search-element", { query, cursor: buildChainedCursor(skip, take) });
3914
+ if (!result.ok) return result.errorResult;
3915
+ const data = result.data;
3916
+ const items = data.items ?? [];
3917
+ return createToolResult({
3918
+ items: items.map((item) => ({
3919
+ id: item.id,
3920
+ name: item.variants?.[0]?.name ?? item.name ?? "Unknown"
3921
+ })),
3922
+ total: data.total ?? items.length
3923
+ });
3924
+ }
3925
+ };
3926
+ var search_elements_default = withStandardDecorators(tool48);
3927
+ var inputSchema49 = {
3928
+ id: z.string().uuid().describe("The ID of the Library element to inspect"),
3929
+ propertyAlias: z.string().optional().describe("Specific property alias to inspect. If omitted, all block-based properties are shown.")
3930
+ };
3931
+ var outputSchema49 = z.object({
3932
+ id: z.string(),
3933
+ name: z.string(),
3934
+ blockProperties: blockPropertiesSchema("edit-element-block")
3935
+ });
3936
+ var tool49 = {
3937
+ name: "inspect-element-blocks",
3938
+ description: "Inspect the block structure of a Library element. Shows each block's type, unique key, and property values inside the element's BlockList, BlockGrid, or Rich Text properties. Use this to find the propertyAlias and contentKey that edit-element-block needs. Library elements only \u2014 for blocks on a content page use inspect-blocks instead. Elements are the document-like reusable content items in the Library section (Umbraco 18).",
3939
+ inputSchema: inputSchema49,
3940
+ outputSchema: outputSchema49,
3941
+ slices: ["read"],
3942
+ annotations: { readOnlyHint: true },
3943
+ handler: async ({ id, propertyAlias }) => {
3944
+ const result = await chainCms("get-element-by-id", { id });
3945
+ if (!result.ok) return result.errorResult;
3946
+ const element = result.data;
3947
+ return createToolResult({
3948
+ id: element.id,
3949
+ name: element.variants?.[0]?.name ?? "Unknown",
3950
+ blockProperties: collectBlockProperties(element.values ?? [], propertyAlias)
3951
+ });
3952
+ }
3953
+ };
3954
+ var inspect_element_blocks_default = withStandardDecorators(tool49);
3955
+ var inputSchema50 = {
3956
+ name: z.string().describe("The name of the element to create"),
3957
+ elementTypeId: z.string().uuid().describe("The ID of the element type (document type) to use. Elements are created from element types \u2014 find valid IDs from an existing element (get-element) or the element configuration."),
3958
+ parentId: z.string().uuid().optional().describe("The ID of the parent folder in the Library. Elements live inside folders; omit only if creating at a location that allows root items."),
3959
+ values: z.array(z.object({
3960
+ alias: z.string().describe("The property alias"),
3961
+ value: z.any().describe("The property value"),
3962
+ culture: z.string().nullable().optional().describe("The culture code for variant content"),
3963
+ segment: z.string().nullable().optional().describe("The segment for segmented content")
3964
+ })).optional().describe("Initial property values to set on the new element")
3965
+ };
3966
+ var outputSchema50 = z.object({
3967
+ message: z.string(),
3968
+ id: z.string(),
3969
+ name: z.string()
3970
+ });
3971
+ var tool50 = {
3972
+ name: "create-element",
3973
+ description: "Create a new Library element as a draft \u2014 it is NOT published automatically. Elements are the document-like reusable content items in the Library section. Pass `name`, `elementTypeId`, an optional parent folder `parentId`, and at most a few simple initial values. For everything else, follow up after creation with edit-element for property updates. Publish separately with publish-element.",
3974
+ inputSchema: inputSchema50,
3975
+ outputSchema: outputSchema50,
3976
+ slices: ["create"],
3977
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
3978
+ handler: async ({ name, elementTypeId, parentId, values }) => {
3979
+ const resolved = await resolveEditorAliases(elementTypeId, values);
3980
+ if (!resolved.ok) return resolved.errorResult;
3981
+ const createResult = await chainCms("create-element", {
3982
+ documentTypeId: elementTypeId,
3983
+ name,
3984
+ values: resolved.values,
3985
+ ...parentId ? { parentId } : {}
3986
+ });
3987
+ if (!createResult.ok) return createResult.errorResult;
3988
+ return createToolResult({
3989
+ message: `Created draft element "${name}"`,
3990
+ id: createResult.data.id ?? "",
3991
+ name
3992
+ });
3993
+ }
3994
+ };
3995
+ var create_element_default = withStandardDecorators(tool50);
3996
+ var inputSchema51 = {
3997
+ name: z.string().describe("The name of the element to create"),
3998
+ elementTypeId: z.string().uuid().describe("The ID of the element type (document type) to use. Elements are created from element types \u2014 find valid IDs from an existing element (get-element) or the element configuration."),
3999
+ parentId: z.string().uuid().optional().describe("The ID of the parent folder in the Library. Elements live inside folders; omit only if creating at a location that allows root items."),
4000
+ values: z.array(z.object({
4001
+ alias: z.string().describe("The property alias"),
4002
+ value: z.any().describe("The property value"),
4003
+ culture: z.string().nullable().optional().describe("The culture code for variant content"),
4004
+ segment: z.string().nullable().optional().describe("The segment for segmented content")
4005
+ })).optional().describe("Initial property values to set on the new element")
4006
+ };
4007
+ var outputSchema51 = z.object({
4008
+ message: z.string(),
4009
+ id: z.string(),
4010
+ name: z.string()
4011
+ });
4012
+ var tool51 = {
4013
+ name: "create-and-publish-element",
4014
+ description: "Create a new Library element and publish it in one atomic operation \u2014 mirrors clicking 'Save and publish' (instead of 'Save') on the element create screen. Elements are the document-like reusable content items in the Library section. Pass `name`, `elementTypeId`, an optional parent folder `parentId`, and at most a few simple initial values. If the element type requires properties this doesn't set, or if the values fail validation, the whole operation fails and no element is created \u2014 use create-element followed by publish-element instead when you need to build up content across multiple calls before publishing.",
4015
+ inputSchema: inputSchema51,
4016
+ outputSchema: outputSchema51,
4017
+ slices: ["create", "publish"],
4018
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
4019
+ handler: async ({ name, elementTypeId, parentId, values }) => {
4020
+ const createResult = await chainCms("create-and-publish-element", {
4021
+ documentTypeId: elementTypeId,
4022
+ name,
4023
+ values: (values ?? []).map((v) => ({
4024
+ alias: v.alias,
4025
+ value: v.value,
4026
+ culture: v.culture ?? null,
4027
+ segment: v.segment ?? null
4028
+ })),
4029
+ ...parentId ? { parentId } : {}
4030
+ });
4031
+ if (!createResult.ok) return createResult.errorResult;
4032
+ return createToolResult({
4033
+ message: `Created and published element "${name}"`,
4034
+ id: createResult.data.id ?? "",
4035
+ name
4036
+ });
4037
+ }
4038
+ };
4039
+ var create_and_publish_element_default = withStandardDecorators(tool51);
4040
+ var inputSchema52 = {
4041
+ name: z.string().describe("Name of the new folder"),
4042
+ parentId: z.string().uuid().optional().describe("ID of the parent folder in the Library (omit to create at the root)")
4043
+ };
4044
+ var outputSchema52 = z.object({
4045
+ message: z.string(),
4046
+ id: z.string(),
4047
+ name: z.string()
4048
+ });
4049
+ var tool52 = {
4050
+ name: "create-element-folder",
4051
+ description: "Create a folder in the Library to organise elements (Umbraco 18 Library section). Folders are the primary way the Library tree is structured; the returned ID can be used as parentId in list-element-children or create-element.",
4052
+ inputSchema: inputSchema52,
4053
+ outputSchema: outputSchema52,
4054
+ slices: ["create"],
4055
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
4056
+ handler: async ({ name, parentId }) => {
4057
+ const createResult = await chainCms("create-element-folder", { name, parent: parentId ? { id: parentId } : null });
4058
+ if (!createResult.ok) return createResult.errorResult;
4059
+ let createdId = createResult.data?.id ?? "";
4060
+ let location = "at the root";
4061
+ if (!createdId) {
4062
+ const listResult = parentId ? await chainCms("get-element-children", { parentId }) : await chainCms("get-element-root", {});
4063
+ if (listResult.ok) {
4064
+ const match = (listResult.data.items ?? []).filter((i) => i.isFolder).find((i) => (i.variants?.[0]?.name ?? i.name) === name);
4065
+ if (match) createdId = match.id;
4066
+ }
4067
+ }
4068
+ if (parentId) {
4069
+ const folderResult = await chainCms("get-element-folder", { id: parentId });
4070
+ if (folderResult.ok) location = `under "${folderResult.data.name ?? "Unknown"}"`;
4071
+ }
4072
+ return createToolResult({
4073
+ message: `Created Library folder "${name}" ${location}`,
4074
+ id: createdId,
4075
+ name
4076
+ });
4077
+ }
4078
+ };
4079
+ var create_element_folder_default = withStandardDecorators(tool52);
4080
+ var inputSchema53 = {
4081
+ id: z.string().uuid().describe("The ID of the element to publish")
4082
+ };
4083
+ var outputSchema53 = z.object({
4084
+ message: z.string(),
4085
+ id: z.string(),
4086
+ name: z.string()
4087
+ });
4088
+ var tool53 = {
4089
+ name: "publish-element",
4090
+ description: "Publish a Library element to make its current draft live (mirrors the back office 'Save and publish' action). Edit the element first with edit-element if it needs changes. Use unpublish-element to take it back offline. NOTE: this publishes directly \u2014 if the site requires workflow approval, that must be handled separately.",
4091
+ inputSchema: inputSchema53,
4092
+ outputSchema: outputSchema53,
4093
+ slices: ["publish"],
4094
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
4095
+ handler: async ({ id }) => {
4096
+ const elResult = await chainCms("get-element-by-id", { id });
4097
+ if (!elResult.ok) return elResult.errorResult;
4098
+ const el = elResult.data;
4099
+ const elementName = el.variants?.[0]?.name ?? "Unknown";
4100
+ const variantCultures = (el.variants ?? []).length ? el.variants.map((v) => v.culture ?? null) : [null];
4101
+ const publishResult = await chainCms("publish-element", {
4102
+ id,
4103
+ data: { publishSchedules: variantCultures.map((c) => ({ culture: c })) }
4104
+ });
4105
+ if (!publishResult.ok) return publishResult.errorResult;
4106
+ return createToolResult({
4107
+ message: `Published element "${elementName}"`,
4108
+ id,
4109
+ name: elementName
4110
+ });
4111
+ }
4112
+ };
4113
+ var publish_element_default = withStandardDecorators(tool53);
4114
+ var inputSchema54 = {
4115
+ id: z.string().uuid().describe("The ID of the element to unpublish")
4116
+ };
4117
+ var outputSchema54 = z.object({
4118
+ message: z.string(),
4119
+ id: z.string(),
4120
+ name: z.string()
4121
+ });
4122
+ var tool54 = {
4123
+ name: "unpublish-element",
4124
+ description: "Unpublish a Library element, taking it offline. The element still exists as a draft. You will be asked to confirm before unpublishing.",
4125
+ inputSchema: inputSchema54,
4126
+ outputSchema: outputSchema54,
4127
+ slices: ["publish"],
4128
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
4129
+ handler: async ({ id }, extra) => {
4130
+ const elResult = await chainCms("get-element-by-id", { id });
4131
+ if (!elResult.ok) return elResult.errorResult;
4132
+ const el = elResult.data;
4133
+ const elementName = el.variants?.[0]?.name ?? "Unknown";
4134
+ if (!await requestApproval(extra, `Unpublish element "${elementName}"? This will take it offline.`)) {
4135
+ return createToolResult({ message: "Unpublish cancelled", id, name: elementName });
4136
+ }
4137
+ const cultures = (el.variants ?? []).filter((v) => v.culture).map((v) => v.culture);
4138
+ const result = await chainCms("unpublish-element", {
4139
+ id,
4140
+ data: { cultures: cultures.length > 0 ? cultures : null }
4141
+ });
4142
+ if (!result.ok) return result.errorResult;
4143
+ return createToolResult({ message: `Unpublished element "${elementName}" \u2014 it is now a draft only`, id, name: elementName });
4144
+ }
4145
+ };
4146
+ var unpublish_element_default = withStandardDecorators(tool54);
4147
+ var inputSchema55 = {
4148
+ id: z.string().uuid().describe("The ID of the element to edit"),
4149
+ values: z.array(z.object({
4150
+ alias: z.string().describe("The property alias"),
4151
+ value: z.any().describe("The new property value"),
4152
+ culture: z.string().nullable().optional().describe("The culture code for variant content"),
4153
+ segment: z.string().nullable().optional().describe("The segment for segmented content")
4154
+ })).describe("Property values to update on the element")
4155
+ };
4156
+ var outputSchema55 = z.object({
4157
+ message: z.string(),
4158
+ id: z.string(),
4159
+ name: z.string(),
4160
+ updatedFields: z.array(z.string())
4161
+ });
4162
+ var tool55 = {
4163
+ name: "edit-element",
4164
+ description: "Update property values on a Library element. Changes are saved but NOT published \u2014 publish separately with publish-element. Call get-element first to discover valid property aliases. For structured non-block property values (media pickers, pickers, etc.) call get-property-value-template with the editor alias first to see the expected JSON shape. To change a property INSIDE a block on the element (BlockList, BlockGrid, or Rich Text block) use inspect-element-blocks then edit-element-block instead \u2014 passing a whole block value here would overwrite the property's entire block structure. Elements are the document-like reusable content items in the Library section (Umbraco 18).",
4165
+ inputSchema: inputSchema55,
4166
+ outputSchema: outputSchema55,
4167
+ slices: ["update"],
4168
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
4169
+ handler: async ({ id, values }) => {
4170
+ const elResult = await chainCms("get-element-by-id", { id });
4171
+ if (!elResult.ok) return elResult.errorResult;
4172
+ const elementName = elResult.data.variants?.[0]?.name ?? "Unknown";
4173
+ const fieldNames = values.map((v) => v.alias);
4174
+ const properties = values.map((v) => ({
4175
+ alias: v.alias,
4176
+ value: v.value,
4177
+ culture: v.culture ?? null,
4178
+ segment: v.segment ?? null
4179
+ }));
4180
+ const updateResult = await chainCms("update-element-properties", { id, properties });
4181
+ if (!updateResult.ok) return updateResult.errorResult;
4182
+ return createToolResult({
4183
+ message: `Updated ${fieldNames.length} field(s) on element "${elementName}" (saved, not published)`,
4184
+ id,
4185
+ name: elementName,
4186
+ updatedFields: fieldNames
4187
+ });
4188
+ }
4189
+ };
4190
+ var edit_element_default = withStandardDecorators(tool55);
4191
+ var inputSchema56 = {
4192
+ id: z.string().uuid().describe("The ID of the Library element containing the block"),
4193
+ propertyAlias: z.string().describe("The element property alias containing the blocks (e.g. 'mainContent'). Use inspect-element-blocks to find this."),
4194
+ contentKey: z.string().uuid().describe("The unique key of the block to edit \u2014 always the block's contentKey as reported by inspect-element-blocks, including when blockType is 'settings'."),
4195
+ values: z.array(z.object({
4196
+ alias: blockPropertyAliasSchema.describe("The property alias within the block"),
4197
+ value: z.any().describe("The new value for the property")
4198
+ })).min(1).describe("Properties to update within the block"),
4199
+ blockType: z.enum(["content", "settings"]).optional().describe("Whether to update the block's content or its settings. Defaults to 'content'."),
4200
+ culture: z.string().nullable().optional().describe("Culture code if the element property is variant"),
4201
+ segment: z.string().nullable().optional().describe("Segment if the element property is variant")
4202
+ };
4203
+ var outputSchema56 = z.object({
4204
+ message: z.string(),
4205
+ id: z.string(),
4206
+ name: z.string(),
4207
+ contentKey: z.string(),
4208
+ updatedFields: z.array(z.string()),
4209
+ warnings: z.array(z.string()).optional()
4210
+ });
4211
+ var tool56 = {
4212
+ name: "edit-element-block",
4213
+ description: "Update properties within a specific block (BlockList, BlockGrid, or Rich Text block) on a Library element. Use inspect-element-blocks first to find the propertyAlias and contentKey. Pass blockType='settings' to edit a block's settings instead of its content \u2014 still pass the block's contentKey, this tool resolves the settings entry itself. For non-block element properties use edit-element instead; for blocks on a content page use edit-block instead. For structured property values inside the block (media pickers, content pickers, image cropper, slider, color, date, etc.) call get-property-value-template with the editor alias first to see the expected JSON shape. Culture/segment applies to the element property level \u2014 use separate calls for mixed-variant blocks. Changes are saved but NOT published \u2014 publish separately with publish-element. Elements are the document-like reusable content items in the Library section (Umbraco 18).",
4214
+ inputSchema: inputSchema56,
4215
+ outputSchema: outputSchema56,
4216
+ slices: ["update"],
4217
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
4218
+ handler: async ({ id, propertyAlias, contentKey, values, blockType, culture, segment }) => {
4219
+ const elResult = await chainCms("get-element-by-id", { id });
4220
+ if (!elResult.ok) return elResult.errorResult;
4221
+ const elementName = elResult.data.variants?.[0]?.name ?? "Unknown";
4222
+ const fieldNames = values.map((v) => v.alias);
4223
+ const resolvedBlockType = blockType ?? "content";
4224
+ let targetKey = contentKey;
4225
+ if (resolvedBlockType === "settings") {
4226
+ const rawValue = (elResult.data.values ?? []).find(
4227
+ (v) => v.alias === propertyAlias && (v.culture ?? null) === (culture ?? null) && (v.segment ?? null) === (segment ?? null)
4228
+ )?.value;
4229
+ const container = isRteWithBlocks(rawValue) ? rawValue.blocks : rawValue;
4230
+ const settingsKey = findSettingsKey(container, contentKey);
4231
+ if (!settingsKey) {
4232
+ return createToolResultError(
4233
+ `Block ${contentKey} in property "${propertyAlias}" has no settings entry, so its settings cannot be edited. Use inspect-element-blocks to check for a settingsKey, or omit blockType to edit the block's content.`
4234
+ );
4235
+ }
4236
+ targetKey = settingsKey;
4237
+ }
4238
+ const propsTuple = values.map((v) => ({ alias: v.alias, value: v.value }));
4239
+ const updateResult = await chainCms("update-element-block-property", {
4240
+ elementId: id,
4241
+ propertyAlias,
4242
+ culture: culture ?? null,
4243
+ segment: segment ?? null,
4244
+ updates: [{
4245
+ contentKey: targetKey,
4246
+ blockType: resolvedBlockType,
4247
+ properties: propsTuple
4248
+ }]
4249
+ });
4250
+ if (!updateResult.ok) return updateResult.errorResult;
4251
+ const results = updateResult.data.results;
4252
+ if (!results || results.length === 0) {
4253
+ return createToolResultError(
4254
+ "update-element-block-property returned no per-block result \u2014 cannot confirm the write succeeded."
4255
+ );
4256
+ }
4257
+ const classification = classifyBlockUpdateResults(results, fieldNames.length, fieldNames, 1);
4258
+ if (classification.outcome === "failed") {
4259
+ return createToolResultError(
4260
+ `Block update failed: ${classification.detail || updateResult.data.message || "no detail returned"}`
4261
+ );
4262
+ }
4263
+ if (classification.outcome === "partial") {
4264
+ return createToolResultError({
4265
+ message: `Block update partially failed: ${classification.processedCount} of ${fieldNames.length} field(s) saved \u2014 ${classification.detail}`,
4266
+ savedFields: classification.savedFields,
4267
+ failedFields: classification.failedFields,
4268
+ ...classification.savedFields.length > 0 ? { note: "savedFields were written to the element and must not be retried." } : {},
4269
+ ...classification.warnings.length ? { warnings: classification.warnings } : {}
4270
+ });
4271
+ }
4272
+ const target = resolvedBlockType === "settings" ? "settings" : "content";
4273
+ const warnings = classification.warnings;
4274
+ return createToolResult({
4275
+ message: `Updated ${fieldNames.length} field(s) in block ${target} on element "${elementName}" (saved, not published)`,
4276
+ id,
4277
+ name: elementName,
4278
+ contentKey,
4279
+ updatedFields: fieldNames,
4280
+ ...warnings.length ? { warnings } : {}
4281
+ });
4282
+ }
4283
+ };
4284
+ var edit_element_block_default = withStandardDecorators(tool56);
4285
+ var inputSchema57 = {
4286
+ id: z.string().uuid().describe("The ID of the element to delete")
4287
+ };
4288
+ var outputSchema57 = z.object({
4289
+ message: z.string(),
4290
+ id: z.string(),
4291
+ name: z.string()
4292
+ });
4293
+ var tool57 = {
4294
+ name: "delete-element",
4295
+ description: "Move a Library element to the recycle bin. It can be restored later. You will be asked to confirm before deleting.",
4296
+ inputSchema: inputSchema57,
4297
+ outputSchema: outputSchema57,
4298
+ slices: ["delete"],
4299
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
4300
+ handler: async ({ id }, extra) => {
4301
+ const elResult = await chainCms("get-element-by-id", { id });
4302
+ if (!elResult.ok) return elResult.errorResult;
4303
+ const elementName = elResult.data.variants?.[0]?.name ?? "Unknown";
4304
+ if (!await requestApproval(extra, `WARNING: Move element "${elementName}" to the recycle bin? This will remove it from the Library.`)) {
4305
+ return createToolResult({ message: "Delete cancelled", id, name: elementName });
4306
+ }
4307
+ const deleteResult = await chainCms("move-element-to-recycle-bin", { id });
4308
+ if (!deleteResult.ok) return deleteResult.errorResult;
4309
+ return createToolResult({ message: `Moved element "${elementName}" to the recycle bin`, id, name: elementName });
4310
+ }
4311
+ };
4312
+ var delete_element_default = withStandardDecorators(tool57);
4313
+
4314
+ // src/umbraco-api/tools/element/index.ts
4315
+ var collection6 = {
4316
+ metadata: {
4317
+ name: "element",
4318
+ displayName: "Library Elements",
4319
+ description: "Browse, view, edit (including blocks), publish, and organise reusable Library elements (Umbraco 18 Library section)"
4320
+ },
4321
+ tools: () => [
4322
+ get_element_default,
4323
+ list_element_children_default,
4324
+ search_elements_default,
4325
+ inspect_element_blocks_default,
4326
+ create_element_default,
4327
+ create_and_publish_element_default,
4328
+ create_element_folder_default,
4329
+ edit_element_default,
4330
+ edit_element_block_default,
4331
+ publish_element_default,
4332
+ unpublish_element_default,
4333
+ delete_element_default
4334
+ ]
4335
+ };
4336
+ var element_default = collection6;
4337
+ var inputSchema58 = {
3856
4338
  parentId: z.string().uuid().optional().describe("The ID of a blueprint folder to list children of. If omitted, lists root-level blueprints."),
3857
4339
  take: z.number().optional().default(50).describe("Number of results to return"),
3858
4340
  skip: z.number().optional().default(0).describe("Number of results to skip")
3859
4341
  };
3860
- var outputSchema46 = z.object({
4342
+ var outputSchema58 = z.object({
3861
4343
  items: z.array(z.object({
3862
4344
  id: z.string(),
3863
4345
  name: z.string(),
@@ -3865,11 +4347,11 @@ var outputSchema46 = z.object({
3865
4347
  })).describe("Available page blueprints"),
3866
4348
  total: z.number()
3867
4349
  });
3868
- var tool46 = {
4350
+ var tool58 = {
3869
4351
  name: "list-blueprints",
3870
4352
  description: "List available page blueprints (templates with pre-filled content). Use get-blueprint to view a blueprint's details and property values.",
3871
- inputSchema: inputSchema46,
3872
- outputSchema: outputSchema46,
4353
+ inputSchema: inputSchema58,
4354
+ outputSchema: outputSchema58,
3873
4355
  slices: ["list"],
3874
4356
  annotations: { readOnlyHint: true },
3875
4357
  handler: async ({ parentId, take, skip }) => {
@@ -3895,11 +4377,11 @@ var tool46 = {
3895
4377
  });
3896
4378
  }
3897
4379
  };
3898
- var list_blueprints_default = withStandardDecorators(tool46);
3899
- var inputSchema47 = {
4380
+ var list_blueprints_default = withStandardDecorators(tool58);
4381
+ var inputSchema59 = {
3900
4382
  id: z.string().uuid().describe("The ID of the blueprint to retrieve")
3901
4383
  };
3902
- var outputSchema47 = z.object({
4384
+ var outputSchema59 = z.object({
3903
4385
  id: z.string(),
3904
4386
  name: z.string(),
3905
4387
  documentType: z.object({
@@ -3919,11 +4401,11 @@ var outputSchema47 = z.object({
3919
4401
  segment: z.string().nullable().optional()
3920
4402
  })).optional().describe("Variant information")
3921
4403
  });
3922
- var tool47 = {
4404
+ var tool59 = {
3923
4405
  name: "get-blueprint",
3924
4406
  description: "Get the full details of a page blueprint including its pre-filled property values. Blueprints are page templates that provide default content when creating new pages.",
3925
- inputSchema: inputSchema47,
3926
- outputSchema: outputSchema47,
4407
+ inputSchema: inputSchema59,
4408
+ outputSchema: outputSchema59,
3927
4409
  slices: ["read"],
3928
4410
  annotations: { readOnlyHint: true },
3929
4411
  handler: async ({ id }) => {
@@ -3946,21 +4428,21 @@ var tool47 = {
3946
4428
  });
3947
4429
  }
3948
4430
  };
3949
- var get_blueprint_default = withStandardDecorators(tool47);
3950
- var inputSchema48 = {
4431
+ var get_blueprint_default = withStandardDecorators(tool59);
4432
+ var inputSchema60 = {
3951
4433
  pageId: z.string().uuid().describe("The ID of the source page to save as a blueprint"),
3952
4434
  name: z.string().describe("The name for the new blueprint")
3953
4435
  };
3954
- var outputSchema48 = z.object({
4436
+ var outputSchema60 = z.object({
3955
4437
  message: z.string(),
3956
4438
  id: z.string(),
3957
4439
  name: z.string()
3958
4440
  });
3959
- var tool48 = {
4441
+ var tool60 = {
3960
4442
  name: "create-blueprint",
3961
4443
  description: "Save an existing page as a reusable blueprint (template). The blueprint preserves the page's document type and property values.",
3962
- inputSchema: inputSchema48,
3963
- outputSchema: outputSchema48,
4444
+ inputSchema: inputSchema60,
4445
+ outputSchema: outputSchema60,
3964
4446
  slices: ["create"],
3965
4447
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
3966
4448
  handler: async ({ pageId, name }) => {
@@ -3992,10 +4474,10 @@ var tool48 = {
3992
4474
  });
3993
4475
  }
3994
4476
  };
3995
- var create_blueprint_default = withStandardDecorators(tool48);
4477
+ var create_blueprint_default = withStandardDecorators(tool60);
3996
4478
 
3997
4479
  // src/umbraco-api/tools/blueprint/index.ts
3998
- var collection6 = {
4480
+ var collection7 = {
3999
4481
  metadata: {
4000
4482
  name: "blueprint",
4001
4483
  displayName: "Blueprints",
@@ -4003,12 +4485,12 @@ var collection6 = {
4003
4485
  },
4004
4486
  tools: () => [list_blueprints_default, get_blueprint_default, create_blueprint_default]
4005
4487
  };
4006
- var blueprint_default = collection6;
4007
- var inputSchema49 = {
4488
+ var blueprint_default = collection7;
4489
+ var inputSchema61 = {
4008
4490
  take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
4009
4491
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
4010
4492
  };
4011
- var outputSchema49 = z.object({
4493
+ var outputSchema61 = z.object({
4012
4494
  items: z.array(z.object({
4013
4495
  isoCode: z.string().describe("ISO language code (e.g. en-US)"),
4014
4496
  name: z.string().describe("Display name of the language"),
@@ -4017,11 +4499,11 @@ var outputSchema49 = z.object({
4017
4499
  })).describe("List of configured languages"),
4018
4500
  total: z.number().describe("Total number of languages")
4019
4501
  });
4020
- var tool49 = {
4502
+ var tool61 = {
4021
4503
  name: "list-languages",
4022
4504
  description: "List all languages configured on the Umbraco site. Shows the ISO code, name, and whether each language is the default or mandatory.",
4023
- inputSchema: inputSchema49,
4024
- outputSchema: outputSchema49,
4505
+ inputSchema: inputSchema61,
4506
+ outputSchema: outputSchema61,
4025
4507
  slices: ["list"],
4026
4508
  annotations: { readOnlyHint: true },
4027
4509
  handler: async ({ take, skip }) => {
@@ -4039,22 +4521,22 @@ var tool49 = {
4039
4521
  });
4040
4522
  }
4041
4523
  };
4042
- var list_languages_default = withStandardDecorators(tool49);
4043
- var inputSchema50 = {
4524
+ var list_languages_default = withStandardDecorators(tool61);
4525
+ var inputSchema62 = {
4044
4526
  isoCode: z.string().describe("ISO language code (e.g. en-US)")
4045
4527
  };
4046
- var outputSchema50 = z.object({
4528
+ var outputSchema62 = z.object({
4047
4529
  isoCode: z.string().describe("ISO language code"),
4048
4530
  name: z.string().describe("Display name of the language"),
4049
4531
  isDefault: z.boolean().describe("Whether this is the default language"),
4050
4532
  isMandatory: z.boolean().describe("Whether this language is mandatory"),
4051
4533
  fallbackIsoCode: z.string().nullable().describe("ISO code of the fallback language, if set")
4052
4534
  });
4053
- var tool50 = {
4535
+ var tool62 = {
4054
4536
  name: "get-language",
4055
4537
  description: "Get details of a language by its ISO code. Shows default/mandatory status and fallback language. Use list-languages to see all available ISO codes.",
4056
- inputSchema: inputSchema50,
4057
- outputSchema: outputSchema50,
4538
+ inputSchema: inputSchema62,
4539
+ outputSchema: outputSchema62,
4058
4540
  slices: ["read"],
4059
4541
  annotations: { readOnlyHint: true },
4060
4542
  handler: async ({ isoCode }) => {
@@ -4070,24 +4552,24 @@ var tool50 = {
4070
4552
  });
4071
4553
  }
4072
4554
  };
4073
- var get_language_default = withStandardDecorators(tool50);
4074
- var inputSchema51 = {
4555
+ var get_language_default = withStandardDecorators(tool62);
4556
+ var inputSchema63 = {
4075
4557
  isoCode: z.string().describe("ISO language code to add (e.g. fr-FR)"),
4076
4558
  name: z.string().optional().describe("Display name for the language (e.g. 'French'). Defaults to the ISO code if not provided."),
4077
4559
  isDefault: z.boolean().optional().describe("Whether this language should be the default"),
4078
4560
  isMandatory: z.boolean().optional().describe("Whether this language should be mandatory"),
4079
4561
  fallbackIsoCode: z.string().optional().describe("ISO code of the fallback language")
4080
4562
  };
4081
- var outputSchema51 = z.object({
4563
+ var outputSchema63 = z.object({
4082
4564
  message: z.string(),
4083
4565
  isoCode: z.string(),
4084
4566
  name: z.string()
4085
4567
  });
4086
- var tool51 = {
4568
+ var tool63 = {
4087
4569
  name: "create-language",
4088
4570
  description: "Add a new language to the site. Use this only for languages that do not yet exist \u2014 call list-languages first to avoid duplicates, and use update-language to change settings on an existing language.",
4089
- inputSchema: inputSchema51,
4090
- outputSchema: outputSchema51,
4571
+ inputSchema: inputSchema63,
4572
+ outputSchema: outputSchema63,
4091
4573
  slices: ["create"],
4092
4574
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
4093
4575
  handler: async ({ isoCode, name: displayName, isDefault, isMandatory, fallbackIsoCode }) => {
@@ -4107,23 +4589,23 @@ var tool51 = {
4107
4589
  });
4108
4590
  }
4109
4591
  };
4110
- var create_language_default = withStandardDecorators(tool51);
4111
- var inputSchema52 = {
4592
+ var create_language_default = withStandardDecorators(tool63);
4593
+ var inputSchema64 = {
4112
4594
  isoCode: z.string().describe("ISO language code of the language to update (e.g. en-US)"),
4113
4595
  isDefault: z.boolean().optional().describe("Whether this language should be the default"),
4114
4596
  isMandatory: z.boolean().optional().describe("Whether this language should be mandatory"),
4115
4597
  fallbackIsoCode: z.string().optional().describe("ISO code of the fallback language")
4116
4598
  };
4117
- var outputSchema52 = z.object({
4599
+ var outputSchema64 = z.object({
4118
4600
  message: z.string(),
4119
4601
  isoCode: z.string(),
4120
4602
  name: z.string()
4121
4603
  });
4122
- var tool52 = {
4604
+ var tool64 = {
4123
4605
  name: "update-language",
4124
4606
  description: "Update a language's settings (default, mandatory, fallback).",
4125
- inputSchema: inputSchema52,
4126
- outputSchema: outputSchema52,
4607
+ inputSchema: inputSchema64,
4608
+ outputSchema: outputSchema64,
4127
4609
  slices: ["update"],
4128
4610
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
4129
4611
  handler: async ({ isoCode, isDefault, isMandatory, fallbackIsoCode }) => {
@@ -4148,20 +4630,20 @@ var tool52 = {
4148
4630
  });
4149
4631
  }
4150
4632
  };
4151
- var update_language_default = withStandardDecorators(tool52);
4152
- var inputSchema53 = {
4633
+ var update_language_default = withStandardDecorators(tool64);
4634
+ var inputSchema65 = {
4153
4635
  isoCode: z.string().describe("ISO language code of the language to delete (e.g. fr-FR)")
4154
4636
  };
4155
- var outputSchema53 = z.object({
4637
+ var outputSchema65 = z.object({
4156
4638
  message: z.string(),
4157
4639
  isoCode: z.string(),
4158
4640
  name: z.string()
4159
4641
  });
4160
- var tool53 = {
4642
+ var tool65 = {
4161
4643
  name: "delete-language",
4162
4644
  description: "Remove a language from the site. Content variants in this language will become inaccessible. You will be asked to confirm before deleting.",
4163
- inputSchema: inputSchema53,
4164
- outputSchema: outputSchema53,
4645
+ inputSchema: inputSchema65,
4646
+ outputSchema: outputSchema65,
4165
4647
  slices: ["delete"],
4166
4648
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
4167
4649
  handler: async ({ isoCode }, extra) => {
@@ -4182,10 +4664,10 @@ var tool53 = {
4182
4664
  });
4183
4665
  }
4184
4666
  };
4185
- var delete_language_default = withStandardDecorators(tool53);
4667
+ var delete_language_default = withStandardDecorators(tool65);
4186
4668
 
4187
4669
  // src/umbraco-api/tools/language/index.ts
4188
- var collection7 = {
4670
+ var collection8 = {
4189
4671
  metadata: {
4190
4672
  name: "language",
4191
4673
  displayName: "Languages",
@@ -4193,7 +4675,7 @@ var collection7 = {
4193
4675
  },
4194
4676
  tools: () => [list_languages_default, get_language_default, create_language_default, update_language_default, delete_language_default]
4195
4677
  };
4196
- var language_default = collection7;
4678
+ var language_default = collection8;
4197
4679
  async function checkVariesByCulture(documentId) {
4198
4680
  const docResult = await chainCms("get-document-by-id", { id: documentId });
4199
4681
  if (!docResult.ok) return docResult.errorResult;
@@ -4213,7 +4695,7 @@ async function checkVariesByCulture(documentId) {
4213
4695
  }
4214
4696
 
4215
4697
  // src/umbraco-api/tools/translation/post/create-variant.ts
4216
- var inputSchema54 = {
4698
+ var inputSchema66 = {
4217
4699
  id: z.string().uuid().describe("The ID of the page to add a language variant to"),
4218
4700
  culture: z.string().describe("The target language ISO code (e.g. 'da-DK', 'fr-FR'). Call list-languages to find available cultures."),
4219
4701
  values: z.array(z.object({
@@ -4223,7 +4705,7 @@ var inputSchema54 = {
4223
4705
  segment: z.string().nullable().optional().describe("The segment for segmented content")
4224
4706
  })).optional().describe("Optional property values to set on the new variant")
4225
4707
  };
4226
- var outputSchema54 = z.object({
4708
+ var outputSchema66 = z.object({
4227
4709
  message: z.string(),
4228
4710
  id: z.string(),
4229
4711
  name: z.string(),
@@ -4231,11 +4713,11 @@ var outputSchema54 = z.object({
4231
4713
  previewUrl: previewUrlSchema,
4232
4714
  validation: validationResultSchema
4233
4715
  });
4234
- var tool54 = {
4716
+ var tool66 = {
4235
4717
  name: "create-variant",
4236
4718
  description: "Create a new language variant for a content page. Call list-languages to find available cultures. Optionally provide property values for the new variant.",
4237
- inputSchema: inputSchema54,
4238
- outputSchema: outputSchema54,
4719
+ inputSchema: inputSchema66,
4720
+ outputSchema: outputSchema66,
4239
4721
  slices: ["create"],
4240
4722
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
4241
4723
  handler: async ({ id, culture, values }) => {
@@ -4279,13 +4761,13 @@ var tool54 = {
4279
4761
  });
4280
4762
  }
4281
4763
  };
4282
- var create_variant_default = withStandardDecorators(tool54);
4283
- var inputSchema55 = {
4764
+ var create_variant_default = withStandardDecorators(tool66);
4765
+ var inputSchema67 = {
4284
4766
  id: z.string().uuid().describe("The ID of the page to copy a variant on"),
4285
4767
  sourceCulture: z.string().describe("The source language ISO code to copy content from (e.g. 'en-US')"),
4286
4768
  targetCulture: z.string().describe("The target language ISO code to copy content to (e.g. 'da-DK')")
4287
4769
  };
4288
- var outputSchema55 = z.object({
4770
+ var outputSchema67 = z.object({
4289
4771
  message: z.string(),
4290
4772
  id: z.string(),
4291
4773
  name: z.string(),
@@ -4295,11 +4777,11 @@ var outputSchema55 = z.object({
4295
4777
  previewUrl: previewUrlSchema,
4296
4778
  validation: validationResultSchema
4297
4779
  });
4298
- var tool55 = {
4780
+ var tool67 = {
4299
4781
  name: "copy-variant",
4300
4782
  description: "Copy all content from one language variant to another as a starting point for translation. Overwrites the target variant's content and creates the variant if it does not exist \u2014 you will be asked to confirm. Note: Umbraco supports language fallback chains, so a property left unset on a variant can fall back to the default language automatically \u2014 copy-variant is for when you want explicit content per culture rather than relying on fallback.",
4301
- inputSchema: inputSchema55,
4302
- outputSchema: outputSchema55,
4783
+ inputSchema: inputSchema67,
4784
+ outputSchema: outputSchema67,
4303
4785
  slices: ["create"],
4304
4786
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
4305
4787
  handler: async ({ id, sourceCulture, targetCulture }, extra) => {
@@ -4353,14 +4835,14 @@ var tool55 = {
4353
4835
  });
4354
4836
  }
4355
4837
  };
4356
- var copy_variant_default = withStandardDecorators(tool55);
4357
- var inputSchema56 = {
4838
+ var copy_variant_default = withStandardDecorators(tool67);
4839
+ var inputSchema68 = {
4358
4840
  culture: z.string().describe("The language ISO code to check for (e.g. 'da-DK'). Pages missing this variant will be returned. Call list-languages to find valid culture codes."),
4359
4841
  parentId: z.string().uuid().optional().describe("Parent page ID to search under. Omit to search root-level pages."),
4360
4842
  take: z.number().optional().default(20).describe("Number of results to return"),
4361
4843
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
4362
4844
  };
4363
- var outputSchema56 = z.object({
4845
+ var outputSchema68 = z.object({
4364
4846
  items: z.array(z.object({
4365
4847
  id: z.string(),
4366
4848
  name: z.string(),
@@ -4368,11 +4850,11 @@ var outputSchema56 = z.object({
4368
4850
  })).describe("Pages that are missing the specified language variant"),
4369
4851
  total: z.number().describe("Total number of pages missing the variant (before pagination)")
4370
4852
  });
4371
- var tool56 = {
4853
+ var tool68 = {
4372
4854
  name: "list-untranslated",
4373
4855
  description: "Find content pages that are missing a specific language variant. Searches up to 100 pages per call \u2014 use parentId to scope to a subtree for larger sites. Use copy-variant to seed translations for found pages. Call list-languages to find valid culture codes.",
4374
- inputSchema: inputSchema56,
4375
- outputSchema: outputSchema56,
4856
+ inputSchema: inputSchema68,
4857
+ outputSchema: outputSchema68,
4376
4858
  slices: ["search"],
4377
4859
  annotations: { readOnlyHint: true },
4378
4860
  handler: async ({ culture, parentId, take, skip }) => {
@@ -4405,10 +4887,10 @@ var tool56 = {
4405
4887
  return createToolResult({ items: paged, total });
4406
4888
  }
4407
4889
  };
4408
- var list_untranslated_default = withStandardDecorators(tool56);
4890
+ var list_untranslated_default = withStandardDecorators(tool68);
4409
4891
 
4410
4892
  // src/umbraco-api/tools/translation/index.ts
4411
- var collection8 = {
4893
+ var collection9 = {
4412
4894
  metadata: {
4413
4895
  name: "translation",
4414
4896
  displayName: "Translation",
@@ -4416,13 +4898,13 @@ var collection8 = {
4416
4898
  },
4417
4899
  tools: () => [create_variant_default, copy_variant_default, list_untranslated_default]
4418
4900
  };
4419
- var translation_default = collection8;
4420
- var inputSchema57 = {
4901
+ var translation_default = collection9;
4902
+ var inputSchema69 = {
4421
4903
  parentId: z.string().uuid().optional().describe("UUID of the parent dictionary item, or omit to list root-level entries"),
4422
4904
  take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
4423
4905
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
4424
4906
  };
4425
- var outputSchema57 = z.object({
4907
+ var outputSchema69 = z.object({
4426
4908
  items: z.array(
4427
4909
  z.object({
4428
4910
  id: z.string(),
@@ -4432,11 +4914,11 @@ var outputSchema57 = z.object({
4432
4914
  ).describe("Dictionary items"),
4433
4915
  total: z.number().describe("Total number of items")
4434
4916
  });
4435
- var tool57 = {
4917
+ var tool69 = {
4436
4918
  name: "list-dictionary",
4437
4919
  description: "Browse the dictionary tree. Shows root entries or children of a parent. Each item shows which languages have translations. Use get-dictionary to see the full translations.",
4438
- inputSchema: inputSchema57,
4439
- outputSchema: outputSchema57,
4920
+ inputSchema: inputSchema69,
4921
+ outputSchema: outputSchema69,
4440
4922
  slices: ["list", "tree"],
4441
4923
  annotations: { readOnlyHint: true },
4442
4924
  handler: async ({ parentId, take, skip }) => {
@@ -4462,11 +4944,11 @@ var tool57 = {
4462
4944
  });
4463
4945
  }
4464
4946
  };
4465
- var list_dictionary_default = withStandardDecorators(tool57);
4466
- var inputSchema58 = {
4947
+ var list_dictionary_default = withStandardDecorators(tool69);
4948
+ var inputSchema70 = {
4467
4949
  query: z.string().describe("Search term to match against dictionary item key names")
4468
4950
  };
4469
- var outputSchema58 = z.object({
4951
+ var outputSchema70 = z.object({
4470
4952
  items: z.array(
4471
4953
  z.object({
4472
4954
  id: z.string(),
@@ -4475,11 +4957,11 @@ var outputSchema58 = z.object({
4475
4957
  ).describe("Matching dictionary items"),
4476
4958
  total: z.number().describe("Total number of matching items")
4477
4959
  });
4478
- var tool58 = {
4960
+ var tool70 = {
4479
4961
  name: "search-dictionary",
4480
4962
  description: "Search for dictionary items by key name. Use get-dictionary to see all translations for a specific item.",
4481
- inputSchema: inputSchema58,
4482
- outputSchema: outputSchema58,
4963
+ inputSchema: inputSchema70,
4964
+ outputSchema: outputSchema70,
4483
4965
  slices: ["search"],
4484
4966
  annotations: { readOnlyHint: true },
4485
4967
  handler: async ({ query }) => {
@@ -4494,11 +4976,11 @@ var tool58 = {
4494
4976
  });
4495
4977
  }
4496
4978
  };
4497
- var search_dictionary_default = withStandardDecorators(tool58);
4498
- var inputSchema59 = {
4979
+ var search_dictionary_default = withStandardDecorators(tool70);
4980
+ var inputSchema71 = {
4499
4981
  id: z.string().uuid().describe("UUID of the dictionary item to retrieve")
4500
4982
  };
4501
- var outputSchema59 = z.object({
4983
+ var outputSchema71 = z.object({
4502
4984
  id: z.string(),
4503
4985
  name: z.string(),
4504
4986
  translations: z.array(
@@ -4509,11 +4991,11 @@ var outputSchema59 = z.object({
4509
4991
  })
4510
4992
  ).describe("All translations for this dictionary item")
4511
4993
  });
4512
- var tool59 = {
4994
+ var tool71 = {
4513
4995
  name: "get-dictionary",
4514
4996
  description: "Get a dictionary item with all its translations across languages. Shows the key name and each language's translation value.",
4515
- inputSchema: inputSchema59,
4516
- outputSchema: outputSchema59,
4997
+ inputSchema: inputSchema71,
4998
+ outputSchema: outputSchema71,
4517
4999
  slices: ["read"],
4518
5000
  annotations: { readOnlyHint: true },
4519
5001
  handler: async ({ id }) => {
@@ -4535,8 +5017,8 @@ var tool59 = {
4535
5017
  });
4536
5018
  }
4537
5019
  };
4538
- var get_dictionary_default = withStandardDecorators(tool59);
4539
- var inputSchema60 = {
5020
+ var get_dictionary_default = withStandardDecorators(tool71);
5021
+ var inputSchema72 = {
4540
5022
  name: z.string().describe("The dictionary key name"),
4541
5023
  translations: z.array(
4542
5024
  z.object({
@@ -4546,16 +5028,16 @@ var inputSchema60 = {
4546
5028
  ).describe("Translations to set for this dictionary item"),
4547
5029
  parentId: z.string().uuid().optional().describe("UUID of the parent dictionary item, or omit to create at the root")
4548
5030
  };
4549
- var outputSchema60 = z.object({
5031
+ var outputSchema72 = z.object({
4550
5032
  message: z.string(),
4551
5033
  id: z.string(),
4552
5034
  name: z.string()
4553
5035
  });
4554
- var tool60 = {
5036
+ var tool72 = {
4555
5037
  name: "create-dictionary",
4556
5038
  description: "Create a new dictionary item with translations. Dictionary keys typically use dot-notation (e.g. 'Header.Title', 'Buttons.ReadMore') \u2014 call list-dictionary first to avoid duplicate keys, and use update-dictionary to change translations on an existing item. Use list-languages to find valid ISO codes.",
4557
- inputSchema: inputSchema60,
4558
- outputSchema: outputSchema60,
5039
+ inputSchema: inputSchema72,
5040
+ outputSchema: outputSchema72,
4559
5041
  slices: ["create"],
4560
5042
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
4561
5043
  handler: async ({ name, translations, parentId }) => {
@@ -4572,8 +5054,8 @@ var tool60 = {
4572
5054
  });
4573
5055
  }
4574
5056
  };
4575
- var create_dictionary_default = withStandardDecorators(tool60);
4576
- var inputSchema61 = {
5057
+ var create_dictionary_default = withStandardDecorators(tool72);
5058
+ var inputSchema73 = {
4577
5059
  id: z.string().uuid().describe("UUID of the dictionary item to update"),
4578
5060
  translations: z.array(
4579
5061
  z.object({
@@ -4582,17 +5064,17 @@ var inputSchema61 = {
4582
5064
  })
4583
5065
  ).describe("Translations to update. Languages not listed here will keep their existing translations.")
4584
5066
  };
4585
- var outputSchema61 = z.object({
5067
+ var outputSchema73 = z.object({
4586
5068
  message: z.string(),
4587
5069
  id: z.string(),
4588
5070
  name: z.string(),
4589
5071
  updatedLanguages: z.array(z.string()).describe("ISO codes of languages that were updated")
4590
5072
  });
4591
- var tool61 = {
5073
+ var tool73 = {
4592
5074
  name: "update-dictionary",
4593
5075
  description: "Update translations for a dictionary item. Call get-dictionary first to see existing translations.",
4594
- inputSchema: inputSchema61,
4595
- outputSchema: outputSchema61,
5076
+ inputSchema: inputSchema73,
5077
+ outputSchema: outputSchema73,
4596
5078
  slices: ["update"],
4597
5079
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
4598
5080
  handler: async ({ id, translations }) => {
@@ -4624,21 +5106,21 @@ var tool61 = {
4624
5106
  });
4625
5107
  }
4626
5108
  };
4627
- var update_dictionary_default = withStandardDecorators(tool61);
4628
- var inputSchema62 = {
5109
+ var update_dictionary_default = withStandardDecorators(tool73);
5110
+ var inputSchema74 = {
4629
5111
  id: z.string().uuid().describe("UUID of the dictionary item to move"),
4630
5112
  targetParentId: z.string().uuid().optional().describe("UUID of the destination parent dictionary item, or omit to move to the root")
4631
5113
  };
4632
- var outputSchema62 = z.object({
5114
+ var outputSchema74 = z.object({
4633
5115
  message: z.string(),
4634
5116
  id: z.string(),
4635
5117
  name: z.string()
4636
5118
  });
4637
- var tool62 = {
5119
+ var tool74 = {
4638
5120
  name: "move-dictionary",
4639
5121
  description: "Move a dictionary item to a different parent in the dictionary tree, or to the root. You will be asked to confirm.",
4640
- inputSchema: inputSchema62,
4641
- outputSchema: outputSchema62,
5122
+ inputSchema: inputSchema74,
5123
+ outputSchema: outputSchema74,
4642
5124
  slices: ["move"],
4643
5125
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
4644
5126
  handler: async ({ id, targetParentId }, extra) => {
@@ -4669,10 +5151,10 @@ var tool62 = {
4669
5151
  });
4670
5152
  }
4671
5153
  };
4672
- var move_dictionary_default = withStandardDecorators(tool62);
5154
+ var move_dictionary_default = withStandardDecorators(tool74);
4673
5155
 
4674
5156
  // src/umbraco-api/tools/dictionary/index.ts
4675
- var collection9 = {
5157
+ var collection10 = {
4676
5158
  metadata: {
4677
5159
  name: "dictionary",
4678
5160
  displayName: "Dictionary",
@@ -4680,13 +5162,13 @@ var collection9 = {
4680
5162
  },
4681
5163
  tools: () => [list_dictionary_default, search_dictionary_default, get_dictionary_default, create_dictionary_default, update_dictionary_default, move_dictionary_default]
4682
5164
  };
4683
- var dictionary_default = collection9;
4684
- var inputSchema63 = {
5165
+ var dictionary_default = collection10;
5166
+ var inputSchema75 = {
4685
5167
  tagGroup: z.string().optional().describe("Filter tags by group name, or omit to list all tags"),
4686
5168
  take: z.number().optional().default(50).describe("Number of tags to return"),
4687
5169
  skip: z.number().optional().default(0).describe("Number of tags to skip for pagination")
4688
5170
  };
4689
- var outputSchema63 = z.object({
5171
+ var outputSchema75 = z.object({
4690
5172
  items: z.array(
4691
5173
  z.object({
4692
5174
  id: z.number(),
@@ -4697,11 +5179,11 @@ var outputSchema63 = z.object({
4697
5179
  ).describe("Tags in use across the site"),
4698
5180
  total: z.number().describe("Total number of tags")
4699
5181
  });
4700
- var tool63 = {
5182
+ var tool75 = {
4701
5183
  name: "list-tags",
4702
5184
  description: "List tags in use across the site. Optionally filter by tag group. Shows how many content items use each tag.",
4703
- inputSchema: inputSchema63,
4704
- outputSchema: outputSchema63,
5185
+ inputSchema: inputSchema75,
5186
+ outputSchema: outputSchema75,
4705
5187
  slices: ["list"],
4706
5188
  annotations: { readOnlyHint: true },
4707
5189
  handler: async ({ tagGroup, take, skip }) => {
@@ -4718,10 +5200,10 @@ var tool63 = {
4718
5200
  });
4719
5201
  }
4720
5202
  };
4721
- var list_tags_default = withStandardDecorators(tool63);
5203
+ var list_tags_default = withStandardDecorators(tool75);
4722
5204
 
4723
5205
  // src/umbraco-api/tools/tag/index.ts
4724
- var collection10 = {
5206
+ var collection11 = {
4725
5207
  metadata: {
4726
5208
  name: "tag",
4727
5209
  displayName: "Tags",
@@ -4729,13 +5211,13 @@ var collection10 = {
4729
5211
  },
4730
5212
  tools: () => [list_tags_default]
4731
5213
  };
4732
- var tag_default = collection10;
5214
+ var tag_default = collection11;
4733
5215
  var TITLE_ALIASES = ["pageTitle", "title", "metaTitle", "seoTitle"];
4734
5216
  var META_DESC_ALIASES = ["metaDescription", "seoMetaDescription", "description"];
4735
- var inputSchema64 = {
5217
+ var inputSchema76 = {
4736
5218
  id: z.string().uuid().describe("The ID of the content page to audit")
4737
5219
  };
4738
- var outputSchema64 = z.object({
5220
+ var outputSchema76 = z.object({
4739
5221
  id: z.string().describe("Page ID"),
4740
5222
  name: z.string().describe("Page name"),
4741
5223
  url: z.string().describe("Page URL"),
@@ -4752,11 +5234,11 @@ var outputSchema64 = z.object({
4752
5234
  headings: z.array(z.object({ level: z.number(), text: z.string() })).describe("Headings found in body content"),
4753
5235
  images: z.array(z.object({ src: z.string(), alt: z.string(), hasAlt: z.boolean() })).describe("Images found in body content with alt text status")
4754
5236
  });
4755
- var tool64 = {
5237
+ var tool76 = {
4756
5238
  name: "audit-page-seo",
4757
5239
  description: "Audit a page's SEO health. Returns title, meta description, headings, images with alt text status, and word count. Includes flags for quick scanning and raw data for detailed analysis. Use with analytics data to prioritise high-traffic pages.",
4758
- inputSchema: inputSchema64,
4759
- outputSchema: outputSchema64,
5240
+ inputSchema: inputSchema76,
5241
+ outputSchema: outputSchema76,
4760
5242
  slices: ["read"],
4761
5243
  annotations: { readOnlyHint: true },
4762
5244
  handler: async ({ id }) => {
@@ -4800,13 +5282,13 @@ var tool64 = {
4800
5282
  });
4801
5283
  }
4802
5284
  };
4803
- var audit_page_seo_default = withStandardDecorators(tool64);
5285
+ var audit_page_seo_default = withStandardDecorators(tool76);
4804
5286
  var META_DESC_ALIASES2 = ["metaDescription", "seoMetaDescription", "description"];
4805
5287
  var BODY_CONTENT_MAX = 2e3;
4806
- var inputSchema65 = {
5288
+ var inputSchema77 = {
4807
5289
  id: z.string().uuid().describe("The ID of the content page to audit")
4808
5290
  };
4809
- var outputSchema65 = z.object({
5291
+ var outputSchema77 = z.object({
4810
5292
  id: z.string().describe("Page ID"),
4811
5293
  name: z.string().describe("Page name"),
4812
5294
  url: z.string().describe("Page URL"),
@@ -4817,11 +5299,11 @@ var outputSchema65 = z.object({
4817
5299
  documentType: z.string().describe("The document type name"),
4818
5300
  lastModified: z.string().describe("ISO date string of last modification")
4819
5301
  });
4820
- var tool65 = {
5302
+ var tool77 = {
4821
5303
  name: "audit-page-content",
4822
5304
  description: "Retrieve a page's body text alongside its meta description for alignment analysis. Use to identify where the meta description does not reflect the actual content. Returns the first ~2000 characters of body text.",
4823
- inputSchema: inputSchema65,
4824
- outputSchema: outputSchema65,
5305
+ inputSchema: inputSchema77,
5306
+ outputSchema: outputSchema77,
4825
5307
  slices: ["read"],
4826
5308
  annotations: { readOnlyHint: true },
4827
5309
  handler: async ({ id }) => {
@@ -4858,10 +5340,10 @@ var tool65 = {
4858
5340
  });
4859
5341
  }
4860
5342
  };
4861
- var audit_page_content_default = withStandardDecorators(tool65);
5343
+ var audit_page_content_default = withStandardDecorators(tool77);
4862
5344
 
4863
5345
  // src/umbraco-api/tools/content-health/index.ts
4864
- var collection11 = {
5346
+ var collection12 = {
4865
5347
  metadata: {
4866
5348
  name: "content-health",
4867
5349
  displayName: "Content Health",
@@ -4869,8 +5351,8 @@ var collection11 = {
4869
5351
  },
4870
5352
  tools: () => [audit_page_seo_default, audit_page_content_default]
4871
5353
  };
4872
- var content_health_default = collection11;
4873
- var inputSchema66 = {
5354
+ var content_health_default = collection12;
5355
+ var inputSchema78 = {
4874
5356
  parentId: z.string().uuid().optional().describe("Scope to a subtree by parent page ID. Omit to start from root."),
4875
5357
  maxDepth: z.number().optional().default(5).describe("How many levels deep to scan (default 5)")
4876
5358
  };
@@ -4885,7 +5367,7 @@ var treeNodeSchema = z.lazy(
4885
5367
  children: z.array(treeNodeSchema)
4886
5368
  })
4887
5369
  );
4888
- var outputSchema66 = z.object({
5370
+ var outputSchema78 = z.object({
4889
5371
  tree: z.array(treeNodeSchema).describe("Hierarchical site tree with children nested inside each node"),
4890
5372
  totalPages: z.number().describe("Total number of pages found across all levels"),
4891
5373
  maxDepthFound: z.number().describe("The deepest level actually found during the scan"),
@@ -4926,11 +5408,11 @@ async function buildTreeNodes(parentId, depth, maxDepth, pagesPerLevel, totalRef
4926
5408
  }
4927
5409
  return nodes;
4928
5410
  }
4929
- var tool66 = {
5411
+ var tool78 = {
4930
5412
  name: "report-site-tree-summary",
4931
5413
  description: "Full site tree structure with page counts per level. Returns hierarchical data that maps to tree diagrams, sitemaps, and flowcharts. Use maxDepth to limit how deep to scan.",
4932
- inputSchema: inputSchema66,
4933
- outputSchema: outputSchema66,
5414
+ inputSchema: inputSchema78,
5415
+ outputSchema: outputSchema78,
4934
5416
  slices: ["read"],
4935
5417
  annotations: { readOnlyHint: true },
4936
5418
  handler: async ({ parentId, maxDepth }) => {
@@ -4947,14 +5429,14 @@ var tool66 = {
4947
5429
  });
4948
5430
  }
4949
5431
  };
4950
- var report_site_tree_summary_default = withStandardDecorators(tool66);
4951
- var inputSchema67 = {
5432
+ var report_site_tree_summary_default = withStandardDecorators(tool78);
5433
+ var inputSchema79 = {
4952
5434
  depthThreshold: z.number().optional().default(4).describe("Pages deeper than this level are reported (default 4)"),
4953
5435
  parentId: z.string().uuid().optional().describe("Scope to a subtree by parent page ID. Omit to start from root."),
4954
5436
  take: z.number().optional().default(50).describe("Number of results to return after filtering (default 50)"),
4955
5437
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination (default 0)")
4956
5438
  };
4957
- var outputSchema67 = z.object({
5439
+ var outputSchema79 = z.object({
4958
5440
  items: z.array(
4959
5441
  z.object({
4960
5442
  id: z.string(),
@@ -4969,11 +5451,11 @@ var outputSchema67 = z.object({
4969
5451
  scannedPages: z.number().describe("Total number of pages scanned during the walk"),
4970
5452
  threshold: z.number().describe("The depth threshold used for this scan")
4971
5453
  });
4972
- var tool67 = {
5454
+ var tool79 = {
4973
5455
  name: "report-deep-pages",
4974
5456
  description: "Find pages buried more than N levels deep in the site tree. Deep pages are harder for users to find. Default threshold is 4 levels. Includes the full path to each deep page.",
4975
- inputSchema: inputSchema67,
4976
- outputSchema: outputSchema67,
5457
+ inputSchema: inputSchema79,
5458
+ outputSchema: outputSchema79,
4977
5459
  slices: ["read"],
4978
5460
  annotations: { readOnlyHint: true },
4979
5461
  handler: async ({ depthThreshold, parentId, take, skip }) => {
@@ -5020,10 +5502,10 @@ var tool67 = {
5020
5502
  });
5021
5503
  }
5022
5504
  };
5023
- var report_deep_pages_default = withStandardDecorators(tool67);
5505
+ var report_deep_pages_default = withStandardDecorators(tool79);
5024
5506
 
5025
5507
  // src/umbraco-api/tools/site-structure/index.ts
5026
- var collection12 = {
5508
+ var collection13 = {
5027
5509
  metadata: {
5028
5510
  name: "site-structure",
5029
5511
  displayName: "Site Structure",
@@ -5031,12 +5513,12 @@ var collection12 = {
5031
5513
  },
5032
5514
  tools: () => [report_site_tree_summary_default, report_deep_pages_default]
5033
5515
  };
5034
- var site_structure_default = collection12;
5035
- var inputSchema68 = {
5516
+ var site_structure_default = collection13;
5517
+ var inputSchema80 = {
5036
5518
  ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to publish (max 10)"),
5037
5519
  includeDescendants: z.boolean().optional().default(false).describe("Whether to also publish all child pages of each page")
5038
5520
  };
5039
- var outputSchema68 = z.object({
5521
+ var outputSchema80 = z.object({
5040
5522
  message: z.string(),
5041
5523
  results: z.array(z.object({
5042
5524
  id: z.string(),
@@ -5050,11 +5532,11 @@ var outputSchema68 = z.object({
5050
5532
  failureCount: z.number(),
5051
5533
  skippedCount: z.number()
5052
5534
  });
5053
- var tool68 = {
5535
+ var tool80 = {
5054
5536
  name: "bulk-publish",
5055
5537
  description: "Publish multiple pages at once (max 10). Lists all page names for confirmation. Each result includes a previousVersionId for rollback. Use search-content or list-children to find page IDs first.",
5056
- inputSchema: inputSchema68,
5057
- outputSchema: outputSchema68,
5538
+ inputSchema: inputSchema80,
5539
+ outputSchema: outputSchema80,
5058
5540
  slices: ["publish"],
5059
5541
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
5060
5542
  handler: async ({ ids, includeDescendants }, extra) => {
@@ -5106,11 +5588,11 @@ ${nameList}`;
5106
5588
  return createToolResult(buildBulkOutput("Published", results));
5107
5589
  }
5108
5590
  };
5109
- var bulk_publish_default = withStandardDecorators(tool68);
5110
- var inputSchema69 = {
5591
+ var bulk_publish_default = withStandardDecorators(tool80);
5592
+ var inputSchema81 = {
5111
5593
  ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to unpublish (max 10)")
5112
5594
  };
5113
- var outputSchema69 = z.object({
5595
+ var outputSchema81 = z.object({
5114
5596
  message: z.string(),
5115
5597
  results: z.array(z.object({
5116
5598
  id: z.string(),
@@ -5124,11 +5606,11 @@ var outputSchema69 = z.object({
5124
5606
  failureCount: z.number(),
5125
5607
  skippedCount: z.number()
5126
5608
  });
5127
- var tool69 = {
5609
+ var tool81 = {
5128
5610
  name: "bulk-unpublish",
5129
5611
  description: "Take multiple pages offline at once (max 10). Pages will remain as drafts. Lists all page names for confirmation. Each result includes a previousVersionId for rollback.",
5130
- inputSchema: inputSchema69,
5131
- outputSchema: outputSchema69,
5612
+ inputSchema: inputSchema81,
5613
+ outputSchema: outputSchema81,
5132
5614
  slices: ["publish"],
5133
5615
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
5134
5616
  handler: async ({ ids }, extra) => {
@@ -5184,7 +5666,7 @@ ${nameList}`;
5184
5666
  return createToolResult(buildBulkOutput("Unpublished", results));
5185
5667
  }
5186
5668
  };
5187
- var bulk_unpublish_default = withStandardDecorators(tool69);
5669
+ var bulk_unpublish_default = withStandardDecorators(tool81);
5188
5670
 
5189
5671
  // src/umbraco-api/tools/helpers/format-date.ts
5190
5672
  function formatDate(iso) {
@@ -5198,11 +5680,11 @@ function formatDate(iso) {
5198
5680
  }
5199
5681
 
5200
5682
  // src/umbraco-api/tools/bulk-operations/post/bulk-schedule-publish.ts
5201
- var inputSchema70 = {
5683
+ var inputSchema82 = {
5202
5684
  ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to schedule for publishing (max 10)"),
5203
5685
  publishDate: z.string().datetime().describe("The future date and time to publish the pages, in ISO 8601 format (e.g. 2026-06-01T09:00:00Z). Must be in the future.")
5204
5686
  };
5205
- var outputSchema70 = z.object({
5687
+ var outputSchema82 = z.object({
5206
5688
  message: z.string(),
5207
5689
  results: z.array(z.object({
5208
5690
  id: z.string(),
@@ -5216,11 +5698,11 @@ var outputSchema70 = z.object({
5216
5698
  failureCount: z.number(),
5217
5699
  skippedCount: z.number()
5218
5700
  });
5219
- var tool70 = {
5701
+ var tool82 = {
5220
5702
  name: "bulk-schedule-publish",
5221
5703
  description: "Schedule multiple pages to publish at a future date (max 10). Provide the date in ISO 8601 format. Lists all page names and the scheduled date for confirmation.",
5222
- inputSchema: inputSchema70,
5223
- outputSchema: outputSchema70,
5704
+ inputSchema: inputSchema82,
5705
+ outputSchema: outputSchema82,
5224
5706
  slices: ["publish"],
5225
5707
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
5226
5708
  handler: async ({ ids, publishDate }, extra) => {
@@ -5265,15 +5747,15 @@ ${nameList}`;
5265
5747
  return createToolResult(buildBulkOutput("Scheduled", results));
5266
5748
  }
5267
5749
  };
5268
- var bulk_schedule_publish_default = withStandardDecorators(tool70);
5269
- var inputSchema71 = {
5750
+ var bulk_schedule_publish_default = withStandardDecorators(tool82);
5751
+ var inputSchema83 = {
5270
5752
  ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to update (max 10)"),
5271
5753
  alias: z.string().describe("The property alias to set (call get-page first to verify it exists on the document type)"),
5272
5754
  value: z.any().describe("The value to set on the property"),
5273
5755
  culture: z.string().optional().describe("The culture code for variant content (omit for invariant properties)"),
5274
5756
  segment: z.string().optional().describe("The segment for segmented content (omit if not using segments)")
5275
5757
  };
5276
- var outputSchema71 = z.object({
5758
+ var outputSchema83 = z.object({
5277
5759
  message: z.string(),
5278
5760
  results: z.array(z.object({
5279
5761
  id: z.string(),
@@ -5288,11 +5770,11 @@ var outputSchema71 = z.object({
5288
5770
  failureCount: z.number(),
5289
5771
  skippedCount: z.number()
5290
5772
  });
5291
- var tool71 = {
5773
+ var tool83 = {
5292
5774
  name: "bulk-set-property",
5293
5775
  description: "Set the same property value on multiple pages at once (max 10). Call get-page first to verify the property alias exists. For non-string non-block property values (media pickers, content/multi-node pickers, image cropper, slider, color, date, etc.) call get-property-value-template with the editor alias first to see the expected JSON shape. For block-shaped values use bulk-set-block-property (or the per-page block tools \u2014 add-blocklist-block / add-blockgrid-block / add-rte-block / edit-block) instead of hand-constructing the JSON here. Lists all page names and the property change for confirmation. Each successful result includes a previousVersionId for rollback, a previewUrl (draft preview after the change), and a `validation` outcome \u2014 if `valid` is false the changes were saved but the page cannot be published until the listed errors are resolved.",
5294
- inputSchema: inputSchema71,
5295
- outputSchema: outputSchema71,
5776
+ inputSchema: inputSchema83,
5777
+ outputSchema: outputSchema83,
5296
5778
  slices: ["update"],
5297
5779
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
5298
5780
  handler: async ({ ids, alias, value, culture, segment }, extra) => {
@@ -5339,12 +5821,12 @@ ${nameList}`;
5339
5821
  return createToolResult(buildBulkOutput("Updated", results));
5340
5822
  }
5341
5823
  };
5342
- var bulk_set_property_default = withStandardDecorators(tool71);
5343
- var inputSchema72 = {
5824
+ var bulk_set_property_default = withStandardDecorators(tool83);
5825
+ var inputSchema84 = {
5344
5826
  ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to move (max 10)"),
5345
5827
  targetParentId: z.string().uuid().describe("The ID of the destination parent page to move the pages into")
5346
5828
  };
5347
- var outputSchema72 = z.object({
5829
+ var outputSchema84 = z.object({
5348
5830
  message: z.string(),
5349
5831
  results: z.array(z.object({
5350
5832
  id: z.string(),
@@ -5358,11 +5840,11 @@ var outputSchema72 = z.object({
5358
5840
  failureCount: z.number(),
5359
5841
  skippedCount: z.number()
5360
5842
  });
5361
- var tool72 = {
5843
+ var tool84 = {
5362
5844
  name: "bulk-move",
5363
5845
  description: "Move multiple pages to a new parent location (max 10). Shows each page name and target location for confirmation. Restructuring the site tree is hard to undo \u2014 review carefully. Note: previousVersionId in results is for content rollback only and cannot undo a move.",
5364
- inputSchema: inputSchema72,
5365
- outputSchema: outputSchema72,
5846
+ inputSchema: inputSchema84,
5847
+ outputSchema: outputSchema84,
5366
5848
  slices: ["move"],
5367
5849
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
5368
5850
  handler: async ({ ids, targetParentId }, extra) => {
@@ -5415,8 +5897,8 @@ ${nameList}`;
5415
5897
  return createToolResult(buildBulkOutput("Moved", results));
5416
5898
  }
5417
5899
  };
5418
- var bulk_move_default = withStandardDecorators(tool72);
5419
- var inputSchema73 = {
5900
+ var bulk_move_default = withStandardDecorators(tool84);
5901
+ var inputSchema85 = {
5420
5902
  ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to update (max 10)"),
5421
5903
  contentTypeKey: z.string().uuid().describe("The block element type key to target. Use inspect-blocks to find this."),
5422
5904
  propertyAlias: z.string().describe("The document property alias containing the blocks (e.g. 'contentRows'). Use inspect-blocks to find this."),
@@ -5427,7 +5909,7 @@ var inputSchema73 = {
5427
5909
  culture: z.string().nullable().optional().describe("Culture code if the document property is variant"),
5428
5910
  segment: z.string().nullable().optional().describe("Segment if the document property is variant")
5429
5911
  };
5430
- var outputSchema73 = z.object({
5912
+ var outputSchema85 = z.object({
5431
5913
  message: z.string(),
5432
5914
  results: z.array(z.object({
5433
5915
  id: z.string(),
@@ -5445,10 +5927,10 @@ var outputSchema73 = z.object({
5445
5927
  skippedCount: z.number(),
5446
5928
  totalBlocksUpdated: z.number()
5447
5929
  });
5448
- function isBlockListOrGridValue3(value) {
5930
+ function isBlockListOrGridValue2(value) {
5449
5931
  return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
5450
5932
  }
5451
- function isRteWithBlocks3(value) {
5933
+ function isRteWithBlocks2(value) {
5452
5934
  return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && value.blocks !== null && typeof value.blocks === "object" && Array.isArray(value.blocks?.contentData);
5453
5935
  }
5454
5936
  function findMatchingBlocks(doc, propertyAlias, contentTypeKey) {
@@ -5456,18 +5938,18 @@ function findMatchingBlocks(doc, propertyAlias, contentTypeKey) {
5456
5938
  const prop = allValues.find((v) => v.alias === propertyAlias);
5457
5939
  if (!prop) return [];
5458
5940
  let contentData = [];
5459
- if (isBlockListOrGridValue3(prop.value)) {
5941
+ if (isBlockListOrGridValue2(prop.value)) {
5460
5942
  contentData = prop.value.contentData;
5461
- } else if (isRteWithBlocks3(prop.value)) {
5943
+ } else if (isRteWithBlocks2(prop.value)) {
5462
5944
  contentData = prop.value.blocks.contentData;
5463
5945
  }
5464
5946
  return contentData.filter((block) => block.contentTypeKey === contentTypeKey).map((block) => ({ contentKey: block.key ?? "" })).filter((b) => b.contentKey !== "");
5465
5947
  }
5466
- var tool73 = {
5948
+ var tool85 = {
5467
5949
  name: "bulk-set-block-property",
5468
5950
  description: "Update properties on blocks of a specific type across multiple pages (max 10). Targets all blocks matching the given element type within the specified property. Use inspect-blocks first on a sample page to find contentTypeKey and propertyAlias. For non-string property values inside the block (media pickers, content pickers, image cropper, slider, color, date, etc.) call get-property-value-template with the editor alias first to see the expected JSON shape. Changes are saved but NOT published. You will be asked to confirm before updating. Each successful per-page result includes a previewUrl (parent page draft preview) and a `validation` outcome \u2014 if `valid` is false the changes were saved but the page cannot be published until the listed errors are resolved.",
5469
- inputSchema: inputSchema73,
5470
- outputSchema: outputSchema73,
5951
+ inputSchema: inputSchema85,
5952
+ outputSchema: outputSchema85,
5471
5953
  slices: ["update"],
5472
5954
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
5473
5955
  handler: async ({ ids, contentTypeKey, propertyAlias, values, culture, segment }, extra) => {
@@ -5647,10 +6129,10 @@ Changes will be saved but not published.`;
5647
6129
  });
5648
6130
  }
5649
6131
  };
5650
- var bulk_set_block_property_default = withStandardDecorators(tool73);
6132
+ var bulk_set_block_property_default = withStandardDecorators(tool85);
5651
6133
 
5652
6134
  // src/umbraco-api/tools/bulk-operations/index.ts
5653
- var collection13 = {
6135
+ var collection14 = {
5654
6136
  metadata: {
5655
6137
  name: "bulk-operations",
5656
6138
  displayName: "Bulk Operations",
@@ -5658,7 +6140,7 @@ var collection13 = {
5658
6140
  },
5659
6141
  tools: () => [bulk_publish_default, bulk_unpublish_default, bulk_schedule_publish_default, bulk_set_property_default, bulk_move_default, bulk_set_block_property_default]
5660
6142
  };
5661
- var bulk_operations_default = collection13;
6143
+ var bulk_operations_default = collection14;
5662
6144
 
5663
6145
  // src/umbraco-api/tools/member-reporting/get/member-type-helper.ts
5664
6146
  function memberTypeToString(memberType) {
@@ -5672,12 +6154,12 @@ function memberTypeToString(memberType) {
5672
6154
  }
5673
6155
 
5674
6156
  // src/umbraco-api/tools/member/get/search-members.ts
5675
- var inputSchema74 = {
6157
+ var inputSchema86 = {
5676
6158
  query: z.string().describe("Search term to find members by name or email address"),
5677
6159
  take: z.number().optional().default(20).describe("Number of results to return (default 20)"),
5678
6160
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
5679
6161
  };
5680
- var outputSchema74 = z.object({
6162
+ var outputSchema86 = z.object({
5681
6163
  items: z.array(z.object({
5682
6164
  id: z.string(),
5683
6165
  name: z.string(),
@@ -5688,11 +6170,11 @@ var outputSchema74 = z.object({
5688
6170
  })).describe("Matching members"),
5689
6171
  total: z.number().describe("Total number of matches")
5690
6172
  });
5691
- var tool74 = {
6173
+ var tool86 = {
5692
6174
  name: "search-members",
5693
6175
  description: "Search for members by name or email address. Returns matching members with their approval and lockout status. Use get-member for full profile details.",
5694
- inputSchema: inputSchema74,
5695
- outputSchema: outputSchema74,
6176
+ inputSchema: inputSchema86,
6177
+ outputSchema: outputSchema86,
5696
6178
  slices: ["search"],
5697
6179
  annotations: { readOnlyHint: true },
5698
6180
  handler: async ({ query, take, skip }) => {
@@ -5712,7 +6194,7 @@ var tool74 = {
5712
6194
  });
5713
6195
  }
5714
6196
  };
5715
- var search_members_default = withStandardDecorators(tool74);
6197
+ var search_members_default = withStandardDecorators(tool86);
5716
6198
 
5717
6199
  // src/umbraco-api/tools/member/sensitive-data-access.ts
5718
6200
  async function checkSensitiveDataAccess() {
@@ -5722,10 +6204,10 @@ async function checkSensitiveDataAccess() {
5722
6204
  }
5723
6205
 
5724
6206
  // src/umbraco-api/tools/member/get/get-member.ts
5725
- var inputSchema75 = {
6207
+ var inputSchema87 = {
5726
6208
  id: z.string().uuid().describe("The ID of the member to retrieve")
5727
6209
  };
5728
- var outputSchema75 = z.object({
6210
+ var outputSchema87 = z.object({
5729
6211
  id: z.string(),
5730
6212
  name: z.string(),
5731
6213
  email: z.string(),
@@ -5745,11 +6227,11 @@ var outputSchema75 = z.object({
5745
6227
  lastPasswordChangeDate: z.string().nullable(),
5746
6228
  sensitiveDataAccessible: z.boolean().describe("Whether the calling API user can see real values for isApproved / isLockedOut / isTwoFactorEnabled / lastLoginDate. False means those fields are null in this response \u2014 grant Sensitive Data group access to the API user to see them.")
5747
6229
  });
5748
- var tool75 = {
6230
+ var tool87 = {
5749
6231
  name: "get-member",
5750
6232
  description: "Get the full profile of a member including their groups, properties, approval status, and login history.",
5751
- inputSchema: inputSchema75,
5752
- outputSchema: outputSchema75,
6233
+ inputSchema: inputSchema87,
6234
+ outputSchema: outputSchema87,
5753
6235
  slices: ["read"],
5754
6236
  annotations: { readOnlyHint: true },
5755
6237
  handler: async ({ id }) => {
@@ -5775,12 +6257,12 @@ var tool75 = {
5775
6257
  });
5776
6258
  }
5777
6259
  };
5778
- var get_member_default = withStandardDecorators(tool75);
5779
- var inputSchema76 = {
6260
+ var get_member_default = withStandardDecorators(tool87);
6261
+ var inputSchema88 = {
5780
6262
  take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
5781
6263
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
5782
6264
  };
5783
- var outputSchema76 = z.object({
6265
+ var outputSchema88 = z.object({
5784
6266
  items: z.array(z.object({
5785
6267
  id: z.string(),
5786
6268
  alias: z.string(),
@@ -5788,11 +6270,11 @@ var outputSchema76 = z.object({
5788
6270
  })).describe("Available member types"),
5789
6271
  total: z.number().describe("Total number of member types")
5790
6272
  });
5791
- var tool76 = {
6273
+ var tool88 = {
5792
6274
  name: "list-member-types",
5793
6275
  description: "List available member types. Use this before create-member to find a valid member type ID.",
5794
- inputSchema: inputSchema76,
5795
- outputSchema: outputSchema76,
6276
+ inputSchema: inputSchema88,
6277
+ outputSchema: outputSchema88,
5796
6278
  slices: ["list"],
5797
6279
  annotations: { readOnlyHint: true },
5798
6280
  handler: async ({ take, skip }) => {
@@ -5808,8 +6290,8 @@ var tool76 = {
5808
6290
  });
5809
6291
  }
5810
6292
  };
5811
- var list_member_types_default = withStandardDecorators(tool76);
5812
- var inputSchema77 = {
6293
+ var list_member_types_default = withStandardDecorators(tool88);
6294
+ var inputSchema89 = {
5813
6295
  email: z.string().email().describe("The email address for the new member"),
5814
6296
  username: z.string().describe("The username for the new member"),
5815
6297
  name: z.string().describe("The display name for the new member"),
@@ -5822,17 +6304,17 @@ var inputSchema77 = {
5822
6304
  value: z.any().describe("The property value")
5823
6305
  })).optional().describe("Custom property values to set on the new member")
5824
6306
  };
5825
- var outputSchema77 = z.object({
6307
+ var outputSchema89 = z.object({
5826
6308
  message: z.string(),
5827
6309
  id: z.string(),
5828
6310
  name: z.string(),
5829
6311
  email: z.string()
5830
6312
  });
5831
- var tool77 = {
6313
+ var tool89 = {
5832
6314
  name: "create-member",
5833
6315
  description: "Create a new member account. Use update-member to change details on an existing member \u2014 search-members first if unsure whether the email or username is already taken. Call list-member-types to find a valid memberTypeId and list-member-groups for group IDs.",
5834
- inputSchema: inputSchema77,
5835
- outputSchema: outputSchema77,
6316
+ inputSchema: inputSchema89,
6317
+ outputSchema: outputSchema89,
5836
6318
  slices: ["create"],
5837
6319
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
5838
6320
  handler: async ({ email, username, name, password, memberTypeId, isApproved, groups, values }) => {
@@ -5886,8 +6368,8 @@ var tool77 = {
5886
6368
  });
5887
6369
  }
5888
6370
  };
5889
- var create_member_default = withStandardDecorators(tool77);
5890
- var inputSchema78 = {
6371
+ var create_member_default = withStandardDecorators(tool89);
6372
+ var inputSchema90 = {
5891
6373
  id: z.string().uuid().describe("The ID of the member to update"),
5892
6374
  name: z.string().optional().describe("The new display name for the member"),
5893
6375
  email: z.string().email().optional().describe("The new email address for the member"),
@@ -5902,17 +6384,17 @@ var inputSchema78 = {
5902
6384
  value: z.any().describe("The new property value")
5903
6385
  })).optional().describe("Custom property values to update")
5904
6386
  };
5905
- var outputSchema78 = z.object({
6387
+ var outputSchema90 = z.object({
5906
6388
  message: z.string(),
5907
6389
  id: z.string(),
5908
6390
  name: z.string(),
5909
6391
  email: z.string()
5910
6392
  });
5911
- var tool78 = {
6393
+ var tool90 = {
5912
6394
  name: "update-member",
5913
6395
  description: "Update a member's profile, credentials (username / password / 2FA toggle), approval status, groups, or custom properties. Call get-member first to see current values. Password resets require an extra confirmation.",
5914
- inputSchema: inputSchema78,
5915
- outputSchema: outputSchema78,
6396
+ inputSchema: inputSchema90,
6397
+ outputSchema: outputSchema90,
5916
6398
  slices: ["update"],
5917
6399
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
5918
6400
  handler: async ({ id, name, email, username, newPassword, isTwoFactorEnabled, isApproved, isLockedOut, groups, values }, extra) => {
@@ -5968,21 +6450,21 @@ var tool78 = {
5968
6450
  });
5969
6451
  }
5970
6452
  };
5971
- var update_member_default = withStandardDecorators(tool78);
5972
- var inputSchema79 = {
6453
+ var update_member_default = withStandardDecorators(tool90);
6454
+ var inputSchema91 = {
5973
6455
  id: z.string().uuid().describe("The ID of the member to permanently delete")
5974
6456
  };
5975
- var outputSchema79 = z.object({
6457
+ var outputSchema91 = z.object({
5976
6458
  message: z.string(),
5977
6459
  id: z.string(),
5978
6460
  name: z.string(),
5979
6461
  email: z.string()
5980
6462
  });
5981
- var tool79 = {
6463
+ var tool91 = {
5982
6464
  name: "delete-member",
5983
6465
  description: "Permanently delete a member. This cannot be undone \u2014 there is no recycle bin for members. You will be asked to confirm.",
5984
- inputSchema: inputSchema79,
5985
- outputSchema: outputSchema79,
6466
+ inputSchema: inputSchema91,
6467
+ outputSchema: outputSchema91,
5986
6468
  slices: ["delete"],
5987
6469
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
5988
6470
  handler: async ({ id }, extra) => {
@@ -6004,10 +6486,10 @@ var tool79 = {
6004
6486
  });
6005
6487
  }
6006
6488
  };
6007
- var delete_member_default = withStandardDecorators(tool79);
6489
+ var delete_member_default = withStandardDecorators(tool91);
6008
6490
 
6009
6491
  // src/umbraco-api/tools/member/index.ts
6010
- var collection14 = {
6492
+ var collection15 = {
6011
6493
  metadata: {
6012
6494
  name: "member",
6013
6495
  displayName: "Members",
@@ -6015,23 +6497,23 @@ var collection14 = {
6015
6497
  },
6016
6498
  tools: () => [search_members_default, get_member_default, list_member_types_default, create_member_default, update_member_default, delete_member_default]
6017
6499
  };
6018
- var member_default = collection14;
6019
- var inputSchema80 = {
6500
+ var member_default = collection15;
6501
+ var inputSchema92 = {
6020
6502
  take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
6021
6503
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
6022
6504
  };
6023
- var outputSchema80 = z.object({
6505
+ var outputSchema92 = z.object({
6024
6506
  items: z.array(z.object({
6025
6507
  id: z.string(),
6026
6508
  name: z.string()
6027
6509
  })).describe("Member groups"),
6028
6510
  total: z.number().describe("Total number of member groups")
6029
6511
  });
6030
- var tool80 = {
6512
+ var tool92 = {
6031
6513
  name: "list-member-groups",
6032
6514
  description: "List all member groups. Use group names when creating or updating members to assign them to groups.",
6033
- inputSchema: inputSchema80,
6034
- outputSchema: outputSchema80,
6515
+ inputSchema: inputSchema92,
6516
+ outputSchema: outputSchema92,
6035
6517
  slices: ["list"],
6036
6518
  annotations: { readOnlyHint: true },
6037
6519
  handler: async ({ take, skip }) => {
@@ -6047,20 +6529,20 @@ var tool80 = {
6047
6529
  });
6048
6530
  }
6049
6531
  };
6050
- var list_member_groups_default = withStandardDecorators(tool80);
6051
- var inputSchema81 = {
6532
+ var list_member_groups_default = withStandardDecorators(tool92);
6533
+ var inputSchema93 = {
6052
6534
  name: z.string().describe("The name of the new member group")
6053
6535
  };
6054
- var outputSchema81 = z.object({
6536
+ var outputSchema93 = z.object({
6055
6537
  message: z.string(),
6056
6538
  id: z.string(),
6057
6539
  name: z.string()
6058
6540
  });
6059
- var tool81 = {
6541
+ var tool93 = {
6060
6542
  name: "create-member-group",
6061
6543
  description: "Create a new member group. Groups are referenced by name when assigning members via create-member or update-member. Use list-member-groups to check existing groups first.",
6062
- inputSchema: inputSchema81,
6063
- outputSchema: outputSchema81,
6544
+ inputSchema: inputSchema93,
6545
+ outputSchema: outputSchema93,
6064
6546
  slices: ["create"],
6065
6547
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
6066
6548
  handler: async ({ name }) => {
@@ -6073,20 +6555,20 @@ var tool81 = {
6073
6555
  });
6074
6556
  }
6075
6557
  };
6076
- var create_member_group_default = withStandardDecorators(tool81);
6077
- var inputSchema82 = {
6558
+ var create_member_group_default = withStandardDecorators(tool93);
6559
+ var inputSchema94 = {
6078
6560
  id: z.string().uuid().describe("The ID of the member group to delete")
6079
6561
  };
6080
- var outputSchema82 = z.object({
6562
+ var outputSchema94 = z.object({
6081
6563
  message: z.string(),
6082
6564
  id: z.string(),
6083
6565
  name: z.string()
6084
6566
  });
6085
- var tool82 = {
6567
+ var tool94 = {
6086
6568
  name: "delete-member-group",
6087
6569
  description: "Delete a member group. Members in this group will lose the group assignment. You will be asked to confirm.",
6088
- inputSchema: inputSchema82,
6089
- outputSchema: outputSchema82,
6570
+ inputSchema: inputSchema94,
6571
+ outputSchema: outputSchema94,
6090
6572
  slices: ["delete"],
6091
6573
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
6092
6574
  handler: async ({ id }, extra) => {
@@ -6107,10 +6589,10 @@ var tool82 = {
6107
6589
  });
6108
6590
  }
6109
6591
  };
6110
- var delete_member_group_default = withStandardDecorators(tool82);
6592
+ var delete_member_group_default = withStandardDecorators(tool94);
6111
6593
 
6112
6594
  // src/umbraco-api/tools/member-group/index.ts
6113
- var collection15 = {
6595
+ var collection16 = {
6114
6596
  metadata: {
6115
6597
  name: "member-group",
6116
6598
  displayName: "Member Groups",
@@ -6118,74 +6600,82 @@ var collection15 = {
6118
6600
  },
6119
6601
  tools: () => [list_member_groups_default, create_member_group_default, delete_member_group_default]
6120
6602
  };
6121
- var member_group_default = collection15;
6122
- var inputSchema83 = {};
6123
- var outputSchema83 = z.object({
6124
- totalMembers: z.number().describe("Total number of members across all types and groups"),
6603
+ var member_group_default = collection16;
6604
+ var inputSchema95 = {};
6605
+ var outputSchema95 = z.object({
6606
+ totalMembers: z.number().describe("Total number of members across all types and groups (exact, server-reported \u2014 not capped by the sample)."),
6125
6607
  byType: z.array(z.object({
6126
6608
  memberType: z.string().describe("Member type alias or name"),
6127
6609
  count: z.number()
6128
- })).describe("Member counts grouped by member type. Maps naturally to a pie or bar chart."),
6610
+ })).describe("Member counts grouped by member type, computed from a sample of up to 500 members \u2014 may undercount byType on larger sites (byType counts can sum to less than totalMembers). Maps naturally to a pie or bar chart."),
6129
6611
  byGroup: z.array(z.object({
6130
6612
  group: z.string().describe("Member group name"),
6131
6613
  count: z.number()
6132
- })).describe("Member counts grouped by member group. Members with no group are excluded.")
6614
+ })).describe("Member counts grouped by member group \u2014 exact, server-reported per-group totals (uncapped). Members with no group are excluded.")
6133
6615
  });
6134
6616
  var PAGE_SIZE = 100;
6135
6617
  var MEMBER_CAP = 500;
6136
- var tool83 = {
6618
+ var tool95 = {
6137
6619
  name: "report-member-count",
6138
- description: "Returns a breakdown of member counts by type and group. Analyses up to 500 members \u2014 results may be incomplete on larger sites. Data maps naturally to pie or bar charts.",
6139
- inputSchema: inputSchema83,
6140
- outputSchema: outputSchema83,
6620
+ description: "Returns a breakdown of member counts by type and group. totalMembers and the byGroup counts are exact (server-reported, uncapped); the byType breakdown is computed from a sample of up to 500 members, so it may undercount on larger sites. Data maps naturally to pie or bar charts.",
6621
+ inputSchema: inputSchema95,
6622
+ outputSchema: outputSchema95,
6141
6623
  slices: ["read"],
6142
6624
  annotations: { readOnlyHint: true },
6143
6625
  handler: async () => {
6144
- const allMembers = [];
6626
+ const sampledMembers = [];
6627
+ let totalMembers = 0;
6145
6628
  let cursor = encodeCursor({ s: 0, t: PAGE_SIZE });
6146
- while (allMembers.length < MEMBER_CAP) {
6629
+ while (sampledMembers.length < MEMBER_CAP) {
6147
6630
  const result = await chainCms("find-member", { cursor, orderBy: "username" });
6148
6631
  if (!result.ok) return result.errorResult;
6149
6632
  const data = result.data;
6150
6633
  const items = data.items ?? [];
6151
- allMembers.push(...items);
6634
+ if (typeof data.total === "number") totalMembers = data.total;
6635
+ sampledMembers.push(...items);
6152
6636
  const nextCursor = data.nextCursor;
6153
6637
  if (!nextCursor || items.length === 0) break;
6154
6638
  cursor = nextCursor;
6155
6639
  }
6640
+ if (totalMembers === 0 && sampledMembers.length > 0) totalMembers = sampledMembers.length;
6156
6641
  const typeCounts = /* @__PURE__ */ new Map();
6157
- for (const member of allMembers) {
6642
+ for (const member of sampledMembers) {
6158
6643
  const memberType = memberTypeToString(member.memberType);
6159
6644
  typeCounts.set(memberType, (typeCounts.get(memberType) ?? 0) + 1);
6160
6645
  }
6161
6646
  const groupResult = await chainCms("get-all-member-groups", {});
6162
6647
  if (!groupResult.ok) return groupResult.errorResult;
6163
6648
  const allGroups = groupResult.data.items ?? [];
6649
+ const named = allGroups.filter((g) => typeof g.name === "string");
6650
+ const perGroupResults = await Promise.all(
6651
+ named.map(
6652
+ (g) => chainCms("find-member", {
6653
+ memberGroupName: g.name,
6654
+ cursor: encodeCursor({ s: 0, t: 1 }),
6655
+ orderBy: "username"
6656
+ })
6657
+ )
6658
+ );
6164
6659
  const byGroup = [];
6165
- for (const group of allGroups) {
6166
- if (!group.name) continue;
6167
- const countResult = await chainCms("find-member", {
6168
- memberGroupName: group.name,
6169
- cursor: encodeCursor({ s: 0, t: 1 }),
6170
- orderBy: "username"
6171
- });
6172
- if (!countResult.ok) return countResult.errorResult;
6173
- byGroup.push({ group: group.name, count: countResult.data.total ?? 0 });
6660
+ for (let i = 0; i < named.length; i++) {
6661
+ const r = perGroupResults[i];
6662
+ if (!r.ok) return r.errorResult;
6663
+ byGroup.push({ group: named[i].name, count: r.data.total ?? 0 });
6174
6664
  }
6175
6665
  return createToolResult({
6176
- totalMembers: allMembers.length,
6666
+ totalMembers,
6177
6667
  byType: Array.from(typeCounts.entries()).map(([memberType, count]) => ({ memberType, count })).sort((a, b) => b.count - a.count),
6178
6668
  byGroup: byGroup.sort((a, b) => b.count - a.count)
6179
6669
  });
6180
6670
  }
6181
6671
  };
6182
- var report_member_count_default = withStandardDecorators(tool83);
6183
- var inputSchema84 = {
6672
+ var report_member_count_default = withStandardDecorators(tool95);
6673
+ var inputSchema96 = {
6184
6674
  groupName: z.string().describe("The name of the member group to filter by. Use list-member-groups to find valid group names."),
6185
6675
  take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
6186
6676
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination (default 0)")
6187
6677
  };
6188
- var outputSchema84 = z.object({
6678
+ var outputSchema96 = z.object({
6189
6679
  groupName: z.string().describe("The group name used for this query"),
6190
6680
  items: z.array(z.object({
6191
6681
  id: z.string(),
@@ -6196,11 +6686,11 @@ var outputSchema84 = z.object({
6196
6686
  })).describe("Members belonging to the specified group"),
6197
6687
  total: z.number().describe("Total number of members in this group")
6198
6688
  });
6199
- var tool84 = {
6689
+ var tool96 = {
6200
6690
  name: "report-members-by-group",
6201
6691
  description: "List members belonging to a specific group. Use list-member-groups to find valid group names.",
6202
- inputSchema: inputSchema84,
6203
- outputSchema: outputSchema84,
6692
+ inputSchema: inputSchema96,
6693
+ outputSchema: outputSchema96,
6204
6694
  slices: ["read"],
6205
6695
  annotations: { readOnlyHint: true },
6206
6696
  handler: async ({ groupName, take, skip }) => {
@@ -6216,8 +6706,9 @@ var tool84 = {
6216
6706
  detail: `No member group named "${groupName}". Use list-member-groups to see existing group names.`
6217
6707
  });
6218
6708
  }
6709
+ const canonicalGroupName = groupMatch.name ?? groupName;
6219
6710
  const result = await chainCms("find-member", {
6220
- memberGroupName: groupMatch.name,
6711
+ memberGroupName: canonicalGroupName,
6221
6712
  cursor: buildChainedCursor(skip, take),
6222
6713
  orderBy: "username"
6223
6714
  });
@@ -6236,13 +6727,13 @@ var tool84 = {
6236
6727
  });
6237
6728
  }
6238
6729
  };
6239
- var report_members_by_group_default = withStandardDecorators(tool84);
6240
- var inputSchema85 = {
6730
+ var report_members_by_group_default = withStandardDecorators(tool96);
6731
+ var inputSchema97 = {
6241
6732
  inactiveDays: z.number().optional().default(90).describe("Number of days without a login before a member is considered inactive (default 90)"),
6242
6733
  take: z.number().optional().default(50).describe("Number of results to return after filtering (default 50)"),
6243
6734
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination (default 0)")
6244
6735
  };
6245
- var outputSchema85 = z.object({
6736
+ var outputSchema97 = z.object({
6246
6737
  items: z.array(z.object({
6247
6738
  id: z.string(),
6248
6739
  name: z.string(),
@@ -6257,11 +6748,11 @@ var outputSchema85 = z.object({
6257
6748
  });
6258
6749
  var PAGE_SIZE2 = 100;
6259
6750
  var MEMBER_CAP2 = 500;
6260
- var tool85 = {
6751
+ var tool97 = {
6261
6752
  name: "report-member-activity",
6262
6753
  description: "Find members who haven't logged in within a given number of days. Default threshold is 90 days. Members who have never logged in are always included. Analyses up to 500 members. Useful for identifying inactive accounts.",
6263
- inputSchema: inputSchema85,
6264
- outputSchema: outputSchema85,
6754
+ inputSchema: inputSchema97,
6755
+ outputSchema: outputSchema97,
6265
6756
  slices: ["read"],
6266
6757
  annotations: { readOnlyHint: true },
6267
6758
  handler: async ({ inactiveDays, take, skip }) => {
@@ -6315,10 +6806,10 @@ var tool85 = {
6315
6806
  });
6316
6807
  }
6317
6808
  };
6318
- var report_member_activity_default = withStandardDecorators(tool85);
6809
+ var report_member_activity_default = withStandardDecorators(tool97);
6319
6810
 
6320
6811
  // src/umbraco-api/tools/member-reporting/index.ts
6321
- var collection16 = {
6812
+ var collection17 = {
6322
6813
  metadata: {
6323
6814
  name: "member-reporting",
6324
6815
  displayName: "Member Reporting",
@@ -6326,22 +6817,22 @@ var collection16 = {
6326
6817
  },
6327
6818
  tools: () => [report_member_count_default, report_members_by_group_default, report_member_activity_default]
6328
6819
  };
6329
- var member_reporting_default = collection16;
6330
- var inputSchema86 = {
6820
+ var member_reporting_default = collection17;
6821
+ var inputSchema98 = {
6331
6822
  id: z.string().uuid().describe("The ID of the page to check publish status for")
6332
6823
  };
6333
- var outputSchema86 = z.object({
6824
+ var outputSchema98 = z.object({
6334
6825
  id: z.string(),
6335
6826
  name: z.string(),
6336
6827
  isPublished: z.boolean(),
6337
6828
  state: z.string(),
6338
6829
  variants: z.array(publishStatusVariantSchema)
6339
6830
  });
6340
- var tool86 = {
6831
+ var tool98 = {
6341
6832
  name: "get-publish-status",
6342
6833
  description: "View a page's current publish state including any scheduled publish or unpublish dates. Shows per-variant status for multilingual sites. Returns empty variants for unpublished pages.",
6343
- inputSchema: inputSchema86,
6344
- outputSchema: outputSchema86,
6834
+ inputSchema: inputSchema98,
6835
+ outputSchema: outputSchema98,
6345
6836
  slices: ["read"],
6346
6837
  annotations: { readOnlyHint: true },
6347
6838
  handler: async ({ id }) => {
@@ -6357,24 +6848,24 @@ var tool86 = {
6357
6848
  });
6358
6849
  }
6359
6850
  };
6360
- var get_publish_status_default = withStandardDecorators(tool86);
6361
- var inputSchema87 = {
6851
+ var get_publish_status_default = withStandardDecorators(tool98);
6852
+ var inputSchema99 = {
6362
6853
  id: z.string().uuid().describe("The ID of the page to schedule for publish"),
6363
6854
  publishDate: z.string().datetime().describe("The date and time to publish the page (ISO 8601 format, must be in the future)"),
6364
6855
  culture: z.string().optional().describe("Culture code for variant-specific scheduling (e.g. 'en-US'). Omit for invariant content.")
6365
6856
  };
6366
- var outputSchema87 = z.object({
6857
+ var outputSchema99 = z.object({
6367
6858
  message: z.string(),
6368
6859
  id: z.string(),
6369
6860
  name: z.string(),
6370
6861
  scheduledDate: z.string(),
6371
6862
  previewUrl: previewUrlSchema
6372
6863
  });
6373
- var tool87 = {
6864
+ var tool99 = {
6374
6865
  name: "schedule-publish",
6375
6866
  description: "Schedule a page to publish at a future date. Provide the date in ISO 8601 format (must be in the future). Optionally specify a culture for variant-specific scheduling. You will be asked to confirm.",
6376
- inputSchema: inputSchema87,
6377
- outputSchema: outputSchema87,
6867
+ inputSchema: inputSchema99,
6868
+ outputSchema: outputSchema99,
6378
6869
  slices: ["publish"],
6379
6870
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
6380
6871
  handler: async ({ id, publishDate, culture }, extra) => {
@@ -6399,22 +6890,22 @@ var tool87 = {
6399
6890
  });
6400
6891
  }
6401
6892
  };
6402
- var schedule_publish_default = withStandardDecorators(tool87);
6403
- var inputSchema88 = {
6893
+ var schedule_publish_default = withStandardDecorators(tool99);
6894
+ var inputSchema100 = {
6404
6895
  id: z.string().uuid().describe("The ID of the page whose scheduled publish should be cancelled"),
6405
6896
  culture: z.string().optional().describe("Culture code to check for a scheduled variant (e.g. 'en-US'). Omit for invariant content.")
6406
6897
  };
6407
- var outputSchema88 = z.object({
6898
+ var outputSchema100 = z.object({
6408
6899
  message: z.string(),
6409
6900
  id: z.string(),
6410
6901
  name: z.string(),
6411
6902
  previewUrl: previewUrlSchema
6412
6903
  });
6413
- var tool88 = {
6904
+ var tool100 = {
6414
6905
  name: "cancel-schedule",
6415
6906
  description: "Cancel a pending scheduled publish for a page. Use get-publish-status to verify the page has a pending schedule. You will be asked to confirm.",
6416
- inputSchema: inputSchema88,
6417
- outputSchema: outputSchema88,
6907
+ inputSchema: inputSchema100,
6908
+ outputSchema: outputSchema100,
6418
6909
  slices: ["publish"],
6419
6910
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
6420
6911
  handler: async ({ id, culture }, extra) => {
@@ -6452,10 +6943,10 @@ var tool88 = {
6452
6943
  });
6453
6944
  }
6454
6945
  };
6455
- var cancel_schedule_default = withStandardDecorators(tool88);
6946
+ var cancel_schedule_default = withStandardDecorators(tool100);
6456
6947
 
6457
6948
  // src/umbraco-api/tools/scheduling/index.ts
6458
- var collection17 = {
6949
+ var collection18 = {
6459
6950
  metadata: {
6460
6951
  name: "scheduling",
6461
6952
  displayName: "Scheduling",
@@ -6463,13 +6954,13 @@ var collection17 = {
6463
6954
  },
6464
6955
  tools: () => [get_publish_status_default, schedule_publish_default, cancel_schedule_default]
6465
6956
  };
6466
- var scheduling_default = collection17;
6467
- var inputSchema89 = {
6957
+ var scheduling_default = collection18;
6958
+ var inputSchema101 = {
6468
6959
  take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
6469
6960
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination"),
6470
6961
  filter: z.string().optional().describe("Filter redirects by URL")
6471
6962
  };
6472
- var outputSchema89 = z.object({
6963
+ var outputSchema101 = z.object({
6473
6964
  items: z.array(
6474
6965
  z.object({
6475
6966
  id: z.string(),
@@ -6481,11 +6972,11 @@ var outputSchema89 = z.object({
6481
6972
  ).describe("URL redirects"),
6482
6973
  total: z.number().describe("Total number of redirects")
6483
6974
  });
6484
- var tool89 = {
6975
+ var tool101 = {
6485
6976
  name: "list-redirects",
6486
6977
  description: "List URL redirects configured on the site. Optionally filter by URL. Shows the original URL, destination, and whether the redirect was created automatically by Umbraco.",
6487
- inputSchema: inputSchema89,
6488
- outputSchema: outputSchema89,
6978
+ inputSchema: inputSchema101,
6979
+ outputSchema: outputSchema101,
6489
6980
  slices: ["list"],
6490
6981
  annotations: { readOnlyHint: true },
6491
6982
  handler: async ({ take, skip, filter }) => {
@@ -6507,11 +6998,11 @@ var tool89 = {
6507
6998
  });
6508
6999
  }
6509
7000
  };
6510
- var list_redirects_default = withStandardDecorators(tool89);
6511
- var inputSchema90 = {
7001
+ var list_redirects_default = withStandardDecorators(tool101);
7002
+ var inputSchema102 = {
6512
7003
  id: z.string().uuid().describe("The ID of the redirect to retrieve")
6513
7004
  };
6514
- var outputSchema90 = z.object({
7005
+ var outputSchema102 = z.object({
6515
7006
  id: z.string(),
6516
7007
  originalUrl: z.string(),
6517
7008
  destinationUrl: z.string(),
@@ -6519,11 +7010,11 @@ var outputSchema90 = z.object({
6519
7010
  isAutomatic: z.boolean(),
6520
7011
  createDate: z.string()
6521
7012
  });
6522
- var tool90 = {
7013
+ var tool102 = {
6523
7014
  name: "get-redirect",
6524
7015
  description: "View the full details of a URL redirect including when it was created and whether it was automatic. Use list-redirects to find redirect IDs.",
6525
- inputSchema: inputSchema90,
6526
- outputSchema: outputSchema90,
7016
+ inputSchema: inputSchema102,
7017
+ outputSchema: outputSchema102,
6527
7018
  slices: ["read"],
6528
7019
  annotations: { readOnlyHint: true },
6529
7020
  handler: async ({ id }) => {
@@ -6540,17 +7031,17 @@ var tool90 = {
6540
7031
  });
6541
7032
  }
6542
7033
  };
6543
- var get_redirect_default = withStandardDecorators(tool90);
6544
- var inputSchema91 = {};
6545
- var outputSchema91 = z.object({
7034
+ var get_redirect_default = withStandardDecorators(tool102);
7035
+ var inputSchema103 = {};
7036
+ var outputSchema103 = z.object({
6546
7037
  isEnabled: z.boolean(),
6547
7038
  message: z.string()
6548
7039
  });
6549
- var tool91 = {
7040
+ var tool103 = {
6550
7041
  name: "get-redirect-status",
6551
7042
  description: "Check whether automatic URL redirect tracking is enabled on the site. When enabled, Umbraco automatically creates redirects when pages are moved or renamed.",
6552
- inputSchema: inputSchema91,
6553
- outputSchema: outputSchema91,
7043
+ inputSchema: inputSchema103,
7044
+ outputSchema: outputSchema103,
6554
7045
  slices: ["read"],
6555
7046
  annotations: { readOnlyHint: true },
6556
7047
  handler: async () => {
@@ -6563,20 +7054,20 @@ var tool91 = {
6563
7054
  });
6564
7055
  }
6565
7056
  };
6566
- var get_redirect_status_default = withStandardDecorators(tool91);
6567
- var inputSchema92 = {
7057
+ var get_redirect_status_default = withStandardDecorators(tool103);
7058
+ var inputSchema104 = {
6568
7059
  id: z.string().uuid().describe("The ID of the redirect to delete")
6569
7060
  };
6570
- var outputSchema92 = z.object({
7061
+ var outputSchema104 = z.object({
6571
7062
  message: z.string(),
6572
7063
  id: z.string(),
6573
7064
  originalUrl: z.string()
6574
7065
  });
6575
- var tool92 = {
7066
+ var tool104 = {
6576
7067
  name: "delete-redirect",
6577
7068
  description: "Delete a URL redirect. Visitors following the original URL will get a 404 error. You will be asked to confirm.",
6578
- inputSchema: inputSchema92,
6579
- outputSchema: outputSchema92,
7069
+ inputSchema: inputSchema104,
7070
+ outputSchema: outputSchema104,
6580
7071
  slices: ["delete"],
6581
7072
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
6582
7073
  handler: async ({ id }, extra) => {
@@ -6607,10 +7098,10 @@ var tool92 = {
6607
7098
  });
6608
7099
  }
6609
7100
  };
6610
- var delete_redirect_default = withStandardDecorators(tool92);
7101
+ var delete_redirect_default = withStandardDecorators(tool104);
6611
7102
 
6612
7103
  // src/umbraco-api/tools/redirect/index.ts
6613
- var collection18 = {
7104
+ var collection19 = {
6614
7105
  metadata: {
6615
7106
  name: "redirect",
6616
7107
  displayName: "Redirects",
@@ -6618,12 +7109,12 @@ var collection18 = {
6618
7109
  },
6619
7110
  tools: () => [list_redirects_default, get_redirect_default, get_redirect_status_default, delete_redirect_default]
6620
7111
  };
6621
- var redirect_default = collection18;
6622
- var inputSchema93 = {
7112
+ var redirect_default = collection19;
7113
+ var inputSchema105 = {
6623
7114
  id: z.string().uuid().describe("The ID of the content page or media item to look up references for"),
6624
7115
  type: z.enum(["document", "media"]).describe("Whether the ID refers to a content document or a media item")
6625
7116
  };
6626
- var outputSchema93 = z.object({
7117
+ var outputSchema105 = z.object({
6627
7118
  id: z.string(),
6628
7119
  name: z.string(),
6629
7120
  url: z.string(),
@@ -6658,11 +7149,11 @@ async function buildReferencedBy(refItems) {
6658
7149
  };
6659
7150
  });
6660
7151
  }
6661
- var tool93 = {
7152
+ var tool105 = {
6662
7153
  name: "report-content-references",
6663
7154
  description: "Find which pages reference a given content page or media item. Useful before deleting or restructuring content to understand the impact.",
6664
- inputSchema: inputSchema93,
6665
- outputSchema: outputSchema93,
7155
+ inputSchema: inputSchema105,
7156
+ outputSchema: outputSchema105,
6666
7157
  slices: ["read"],
6667
7158
  annotations: { readOnlyHint: true },
6668
7159
  handler: async ({ id, type }) => {
@@ -6712,18 +7203,18 @@ var tool93 = {
6712
7203
  }
6713
7204
  }
6714
7205
  };
6715
- var report_content_references_default = withStandardDecorators(tool93);
7206
+ var report_content_references_default = withStandardDecorators(tool105);
6716
7207
 
6717
7208
  // src/umbraco-api/tools/helpers/link-extractor.ts
6718
7209
  var UUID_REGEX = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;
6719
- function isBlockListOrGridValue4(value) {
7210
+ function isBlockListOrGridValue3(value) {
6720
7211
  return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
6721
7212
  }
6722
- function isRteWithBlocks4(value) {
7213
+ function isRteWithBlocks3(value) {
6723
7214
  return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && value.blocks !== null && typeof value.blocks === "object" && Array.isArray(value.blocks?.contentData);
6724
7215
  }
6725
7216
  function isPlainRteValue(value) {
6726
- return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && !isRteWithBlocks4(value);
7217
+ return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && !isRteWithBlocks3(value);
6727
7218
  }
6728
7219
  function extractHrefUrls(html) {
6729
7220
  const urls = [];
@@ -6833,7 +7324,7 @@ function extractLinksFromValues(values) {
6833
7324
  return;
6834
7325
  }
6835
7326
  if (typeof val === "object") {
6836
- if (isRteWithBlocks4(val)) {
7327
+ if (isRteWithBlocks3(val)) {
6837
7328
  processHtml(val.markup);
6838
7329
  const blockValues = extractBlockValues(val.blocks.contentData);
6839
7330
  for (const bv of blockValues) processValue(bv);
@@ -6843,7 +7334,7 @@ function extractLinksFromValues(values) {
6843
7334
  processHtml(val.markup);
6844
7335
  return;
6845
7336
  }
6846
- if (isBlockListOrGridValue4(val)) {
7337
+ if (isBlockListOrGridValue3(val)) {
6847
7338
  const blockValues = extractBlockValues(val.contentData);
6848
7339
  for (const bv of blockValues) processValue(bv);
6849
7340
  return;
@@ -6910,10 +7401,10 @@ async function resolveOutboundIds(candidateIds, excludeId) {
6910
7401
  }
6911
7402
 
6912
7403
  // src/umbraco-api/tools/relationships/get/report-outbound-links.ts
6913
- var inputSchema94 = {
7404
+ var inputSchema106 = {
6914
7405
  id: z.string().uuid().describe("The ID of the page to analyze for outbound links")
6915
7406
  };
6916
- var outputSchema94 = z.object({
7407
+ var outputSchema106 = z.object({
6917
7408
  id: z.string(),
6918
7409
  name: z.string(),
6919
7410
  url: z.string(),
@@ -6945,11 +7436,11 @@ var outputSchema94 = z.object({
6945
7436
  totalLinks: z.number()
6946
7437
  })
6947
7438
  });
6948
- var tool94 = {
7439
+ var tool106 = {
6949
7440
  name: "report-outbound-links",
6950
7441
  description: "Show everything a page links to \u2014 internal content pages, media items, and external URLs. Extracts references from content pickers, media pickers, rich text links, and block content. Use this to understand a page's dependencies before restructuring.",
6951
- inputSchema: inputSchema94,
6952
- outputSchema: outputSchema94,
7442
+ inputSchema: inputSchema106,
7443
+ outputSchema: outputSchema106,
6953
7444
  slices: ["read"],
6954
7445
  annotations: { readOnlyHint: true },
6955
7446
  handler: async ({ id }) => {
@@ -6978,10 +7469,10 @@ var tool94 = {
6978
7469
  });
6979
7470
  }
6980
7471
  };
6981
- var report_outbound_links_default = withStandardDecorators(tool94);
7472
+ var report_outbound_links_default = withStandardDecorators(tool106);
6982
7473
 
6983
7474
  // src/umbraco-api/tools/relationships/index.ts
6984
- var collection19 = {
7475
+ var collection20 = {
6985
7476
  metadata: {
6986
7477
  name: "relationships",
6987
7478
  displayName: "Content Relationships",
@@ -6989,11 +7480,11 @@ var collection19 = {
6989
7480
  },
6990
7481
  tools: () => [report_content_references_default, report_outbound_links_default]
6991
7482
  };
6992
- var relationships_default = collection19;
6993
- var inputSchema95 = {
7483
+ var relationships_default = collection20;
7484
+ var inputSchema107 = {
6994
7485
  id: z.string().uuid().describe("The ID of the content page to read public access settings for")
6995
7486
  };
6996
- var outputSchema95 = z.object({
7487
+ var outputSchema107 = z.object({
6997
7488
  hasRestrictions: z.boolean().describe("True if the page has public access rules configured"),
6998
7489
  memberGroups: z.array(z.object({
6999
7490
  id: z.string(),
@@ -7004,11 +7495,11 @@ var outputSchema95 = z.object({
7004
7495
  errorPageId: z.string().nullable().describe("The ID of the page shown when an authenticated visitor is denied access"),
7005
7496
  message: z.string().describe("Human-readable summary of the access rules")
7006
7497
  });
7007
- var tool95 = {
7498
+ var tool107 = {
7008
7499
  name: "get-public-access",
7009
7500
  description: "Read the public access (member-group restriction) settings for a content page. Returns the member groups, members, login page, and error page configured via the 'Public Access\u2026' entity action. If the page has no restrictions, returns hasRestrictions: false.",
7010
- inputSchema: inputSchema95,
7011
- outputSchema: outputSchema95,
7501
+ inputSchema: inputSchema107,
7502
+ outputSchema: outputSchema107,
7012
7503
  slices: ["read"],
7013
7504
  annotations: { readOnlyHint: true },
7014
7505
  handler: async ({ id }) => {
@@ -7041,15 +7532,15 @@ var tool95 = {
7041
7532
  });
7042
7533
  }
7043
7534
  };
7044
- var get_public_access_default = withStandardDecorators(tool95);
7045
- var inputSchema96 = {
7535
+ var get_public_access_default = withStandardDecorators(tool107);
7536
+ var inputSchema108 = {
7046
7537
  id: z.string().uuid().describe("The ID of the content page to restrict"),
7047
7538
  memberGroupNames: z.array(z.string()).describe("Names of member groups allowed to view the page. Use list-member-groups to look up existing groups."),
7048
7539
  loginPageId: z.string().uuid().describe("The ID of the page visitors are redirected to when login is required"),
7049
7540
  errorPageId: z.string().uuid().describe("The ID of the page shown when an authenticated visitor is denied access"),
7050
7541
  memberUserNames: z.array(z.string()).optional().describe("Optional: specific member usernames allowed to view the page (in addition to group members)")
7051
7542
  };
7052
- var outputSchema96 = z.object({
7543
+ var outputSchema108 = z.object({
7053
7544
  message: z.string(),
7054
7545
  id: z.string(),
7055
7546
  memberGroupNames: z.array(z.string()),
@@ -7057,11 +7548,11 @@ var outputSchema96 = z.object({
7057
7548
  loginPageId: z.string(),
7058
7549
  errorPageId: z.string()
7059
7550
  });
7060
- var tool96 = {
7551
+ var tool108 = {
7061
7552
  name: "set-public-access",
7062
7553
  description: "Restrict a content page to members of specific groups (or specific members), redirecting unauthenticated visitors to a login page. Equivalent to the 'Public Access\u2026' entity action in the Umbraco backoffice. Creates new rules on first call, updates them on subsequent calls. You will be asked to confirm.",
7063
- inputSchema: inputSchema96,
7064
- outputSchema: outputSchema96,
7554
+ inputSchema: inputSchema108,
7555
+ outputSchema: outputSchema108,
7065
7556
  slices: ["update"],
7066
7557
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
7067
7558
  handler: async ({ id, memberGroupNames, loginPageId, errorPageId, memberUserNames }, extra) => {
@@ -7099,19 +7590,19 @@ var tool96 = {
7099
7590
  });
7100
7591
  }
7101
7592
  };
7102
- var set_public_access_default = withStandardDecorators(tool96);
7103
- var inputSchema97 = {
7593
+ var set_public_access_default = withStandardDecorators(tool108);
7594
+ var inputSchema109 = {
7104
7595
  id: z.string().uuid().describe("The ID of the content page to remove public access restrictions from")
7105
7596
  };
7106
- var outputSchema97 = z.object({
7597
+ var outputSchema109 = z.object({
7107
7598
  message: z.string(),
7108
7599
  id: z.string()
7109
7600
  });
7110
- var tool97 = {
7601
+ var tool109 = {
7111
7602
  name: "remove-public-access",
7112
7603
  description: "Remove all public access restrictions from a content page, making it publicly viewable again. You will be asked to confirm.",
7113
- inputSchema: inputSchema97,
7114
- outputSchema: outputSchema97,
7604
+ inputSchema: inputSchema109,
7605
+ outputSchema: outputSchema109,
7115
7606
  slices: ["delete"],
7116
7607
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
7117
7608
  handler: async ({ id }, extra) => {
@@ -7126,10 +7617,10 @@ var tool97 = {
7126
7617
  });
7127
7618
  }
7128
7619
  };
7129
- var remove_public_access_default = withStandardDecorators(tool97);
7620
+ var remove_public_access_default = withStandardDecorators(tool109);
7130
7621
 
7131
7622
  // src/umbraco-api/tools/public-access/index.ts
7132
- var collection20 = {
7623
+ var collection21 = {
7133
7624
  metadata: {
7134
7625
  name: "public-access",
7135
7626
  displayName: "Public Access",
@@ -7137,7 +7628,7 @@ var collection20 = {
7137
7628
  },
7138
7629
  tools: () => [get_public_access_default, set_public_access_default, remove_public_access_default]
7139
7630
  };
7140
- var public_access_default = collection20;
7631
+ var public_access_default = collection21;
7141
7632
 
7142
7633
  // src/umbraco-api/tools/helpers/runtime.ts
7143
7634
  var isHostedRuntime = () => {
@@ -7147,7 +7638,7 @@ var isHostedRuntime = () => {
7147
7638
  };
7148
7639
 
7149
7640
  // src/umbraco-api/tools/notifications/get/get-content-notifications.ts
7150
- var inputSchema98 = {
7641
+ var inputSchema110 = {
7151
7642
  id: z.string().uuid().describe("UUID of the content page to read notification subscriptions for")
7152
7643
  };
7153
7644
  var subscriptionSchema = z.object({
@@ -7155,16 +7646,16 @@ var subscriptionSchema = z.object({
7155
7646
  alias: z.string().describe("Human-readable action alias (e.g. publish, unpublish, save, delete)"),
7156
7647
  subscribed: z.boolean().describe("True if the current user is subscribed to this action")
7157
7648
  });
7158
- var outputSchema98 = z.object({
7649
+ var outputSchema110 = z.object({
7159
7650
  id: z.string(),
7160
7651
  subscriptions: z.array(subscriptionSchema),
7161
7652
  subscribedActionIds: z.array(z.string()).describe("Convenience list of actionIds the current user is already subscribed to \u2014 pass back into set-content-notifications to preserve or modify")
7162
7653
  });
7163
- var tool98 = {
7654
+ var tool110 = {
7164
7655
  name: "get-content-notifications",
7165
7656
  description: "Get the current OAuth user's email notification subscriptions for a content page. Returns the full list of available actions (publish, unpublish, save, delete, etc.) with the user's subscribed/unsubscribed state for each. Hosted-only \u2014 not available in stdio mode because the static API user has no real inbox.",
7166
- inputSchema: inputSchema98,
7167
- outputSchema: outputSchema98,
7657
+ inputSchema: inputSchema110,
7658
+ outputSchema: outputSchema110,
7168
7659
  slices: ["read"],
7169
7660
  annotations: { readOnlyHint: true },
7170
7661
  enabled: isHostedRuntime,
@@ -7180,21 +7671,21 @@ var tool98 = {
7180
7671
  return createToolResult({ id, subscriptions, subscribedActionIds });
7181
7672
  }
7182
7673
  };
7183
- var get_content_notifications_default = withStandardDecorators(tool98);
7184
- var inputSchema99 = {
7674
+ var get_content_notifications_default = withStandardDecorators(tool110);
7675
+ var inputSchema111 = {
7185
7676
  id: z.string().uuid().describe("UUID of the content page to update notification subscriptions for"),
7186
7677
  subscribedActionIds: z.array(z.string()).describe("Complete list of action IDs the current user should be subscribed to. Replaces existing subscriptions \u2014 pass an empty array to unsubscribe from all. Call get-content-notifications first to see available actionIds and preserve any you don't want to change.")
7187
7678
  };
7188
- var outputSchema99 = z.object({
7679
+ var outputSchema111 = z.object({
7189
7680
  message: z.string(),
7190
7681
  id: z.string(),
7191
7682
  subscribedActionIds: z.array(z.string())
7192
7683
  });
7193
- var tool99 = {
7684
+ var tool111 = {
7194
7685
  name: "set-content-notifications",
7195
7686
  description: "Replace the current OAuth user's email notification subscriptions for a content page. Full overwrite \u2014 any action ID not in the list will be unsubscribed. Hosted-only \u2014 not available in stdio mode because the static API user has no real inbox.",
7196
- inputSchema: inputSchema99,
7197
- outputSchema: outputSchema99,
7687
+ inputSchema: inputSchema111,
7688
+ outputSchema: outputSchema111,
7198
7689
  slices: ["update"],
7199
7690
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
7200
7691
  enabled: isHostedRuntime,
@@ -7212,10 +7703,10 @@ var tool99 = {
7212
7703
  });
7213
7704
  }
7214
7705
  };
7215
- var set_content_notifications_default = withStandardDecorators(tool99);
7706
+ var set_content_notifications_default = withStandardDecorators(tool111);
7216
7707
 
7217
7708
  // src/umbraco-api/tools/notifications/index.ts
7218
- var collection21 = {
7709
+ var collection22 = {
7219
7710
  metadata: {
7220
7711
  name: "notifications",
7221
7712
  displayName: "Content Notifications",
@@ -7223,7 +7714,7 @@ var collection21 = {
7223
7714
  },
7224
7715
  tools: () => isHostedRuntime() ? [get_content_notifications_default, set_content_notifications_default] : []
7225
7716
  };
7226
- var notifications_default = collection21;
7717
+ var notifications_default = collection22;
7227
7718
  var mediaTools = {
7228
7719
  listRoot: "get-recycle-bin-media-root",
7229
7720
  listChildren: "get-recycle-bin-media-children",
@@ -7286,13 +7777,13 @@ function formatNamePreview(names, total) {
7286
7777
  }
7287
7778
 
7288
7779
  // src/umbraco-api/tools/recycle-bin/get/list-recycle-bin.ts
7289
- var inputSchema100 = {
7780
+ var inputSchema112 = {
7290
7781
  type: z.enum(["content", "media"]).describe("Which recycle bin to list: content (pages) or media."),
7291
7782
  parentId: z.string().uuid().optional().describe("When omitted, lists the bin root. When given, lists the children of that trashed folder \u2014 the recycle bin is a tree and this drills into nested trashed content."),
7292
7783
  take: z.number().optional().default(20).describe("Number of results to return (default 20)"),
7293
7784
  skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
7294
7785
  };
7295
- var outputSchema100 = z.object({
7786
+ var outputSchema112 = z.object({
7296
7787
  items: z.array(z.object({
7297
7788
  id: z.string(),
7298
7789
  name: z.string(),
@@ -7301,11 +7792,11 @@ var outputSchema100 = z.object({
7301
7792
  })).describe("Trashed items at this level of the recycle bin"),
7302
7793
  total: z.number().describe("Total number of trashed items at this level (before pagination)")
7303
7794
  });
7304
- var tool100 = {
7795
+ var tool112 = {
7305
7796
  name: "list-recycle-bin",
7306
7797
  description: "List items in the content or media recycle bin. Returns one level at a time \u2014 when a trashed item has hasChildren=true it is a trashed folder; pass its id as parentId on a follow-up call to drill into its contents. Read-only.",
7307
- inputSchema: inputSchema100,
7308
- outputSchema: outputSchema100,
7798
+ inputSchema: inputSchema112,
7799
+ outputSchema: outputSchema112,
7309
7800
  slices: ["list", "tree"],
7310
7801
  annotations: { readOnlyHint: true },
7311
7802
  handler: async ({ type, parentId, take, skip }) => {
@@ -7328,22 +7819,22 @@ var tool100 = {
7328
7819
  });
7329
7820
  }
7330
7821
  };
7331
- var list_recycle_bin_default = withStandardDecorators(tool100);
7332
- var inputSchema101 = {
7822
+ var list_recycle_bin_default = withStandardDecorators(tool112);
7823
+ var inputSchema113 = {
7333
7824
  id: z.string().uuid().describe("ID of the trashed item to permanently delete."),
7334
7825
  type: z.enum(["content", "media"]).describe("Which recycle bin the item is in.")
7335
7826
  };
7336
- var outputSchema101 = z.object({
7827
+ var outputSchema113 = z.object({
7337
7828
  message: z.string(),
7338
7829
  id: z.string(),
7339
7830
  name: z.string(),
7340
7831
  descendantCount: z.number().optional().describe("Descendants also deleted when the item was a folder")
7341
7832
  });
7342
- var tool101 = {
7833
+ var tool113 = {
7343
7834
  name: "permanent-delete-recycle-bin-item",
7344
7835
  description: "Permanently delete a single item from the content or media recycle bin. Deleting a trashed folder deletes its entire subtree. This cannot be undone. Always elicits confirmation with an itemised preview before deleting.",
7345
- inputSchema: inputSchema101,
7346
- outputSchema: outputSchema101,
7836
+ inputSchema: inputSchema113,
7837
+ outputSchema: outputSchema113,
7347
7838
  slices: ["delete"],
7348
7839
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
7349
7840
  handler: async ({ id, type }, extra) => {
@@ -7390,20 +7881,20 @@ var tool101 = {
7390
7881
  });
7391
7882
  }
7392
7883
  };
7393
- var permanent_delete_recycle_bin_item_default = withStandardDecorators(tool101);
7394
- var inputSchema102 = {
7884
+ var permanent_delete_recycle_bin_item_default = withStandardDecorators(tool113);
7885
+ var inputSchema114 = {
7395
7886
  type: z.enum(["content", "media"]).describe("Which recycle bin to empty.")
7396
7887
  };
7397
- var outputSchema102 = z.object({
7888
+ var outputSchema114 = z.object({
7398
7889
  message: z.string(),
7399
7890
  type: z.enum(["content", "media"]),
7400
7891
  topLevelCount: z.number().describe("Number of top-level items that were in the bin before emptying (descendants are not counted).")
7401
7892
  });
7402
- var tool102 = {
7893
+ var tool114 = {
7403
7894
  name: "empty-recycle-bin",
7404
7895
  description: "Empty the entire content or media recycle bin \u2014 permanently deletes every trashed item including the contents of any trashed folders. This cannot be undone. Always elicits two successive confirmations before executing.",
7405
- inputSchema: inputSchema102,
7406
- outputSchema: outputSchema102,
7896
+ inputSchema: inputSchema114,
7897
+ outputSchema: outputSchema114,
7407
7898
  slices: ["delete"],
7408
7899
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
7409
7900
  handler: async ({ type }, extra) => {
@@ -7448,10 +7939,10 @@ var tool102 = {
7448
7939
  });
7449
7940
  }
7450
7941
  };
7451
- var empty_recycle_bin_default = withStandardDecorators(tool102);
7942
+ var empty_recycle_bin_default = withStandardDecorators(tool114);
7452
7943
 
7453
7944
  // src/umbraco-api/tools/recycle-bin/index.ts
7454
- var collection22 = {
7945
+ var collection23 = {
7455
7946
  metadata: {
7456
7947
  name: "recycle-bin",
7457
7948
  displayName: "Recycle Bin",
@@ -7459,9 +7950,9 @@ var collection22 = {
7459
7950
  },
7460
7951
  tools: () => [list_recycle_bin_default, permanent_delete_recycle_bin_item_default, empty_recycle_bin_default]
7461
7952
  };
7462
- var recycle_bin_default = collection22;
7463
- var inputSchema103 = {};
7464
- var outputSchema103 = z.object({
7953
+ var recycle_bin_default = collection23;
7954
+ var inputSchema115 = {};
7955
+ var outputSchema115 = z.object({
7465
7956
  id: z.string(),
7466
7957
  name: z.string(),
7467
7958
  userName: z.string(),
@@ -7483,11 +7974,11 @@ var outputSchema103 = z.object({
7483
7974
  documentStartNodeIds: z.array(z.string()).describe("Content node IDs the user is restricted to. Empty when hasDocumentRootAccess is true."),
7484
7975
  mediaStartNodeIds: z.array(z.string()).describe("Media node IDs the user is restricted to. Empty when hasMediaRootAccess is true.")
7485
7976
  });
7486
- var tool103 = {
7977
+ var tool115 = {
7487
7978
  name: "get-current-user",
7488
7979
  description: "Identify which Umbraco backoffice user the MCP server is authenticated as. Returns the user's name, email, admin flag, and resolved user-group names. Use this to confirm identity when permissions behave unexpectedly \u2014 e.g. an action fails or returns different data than expected, before assuming the API is broken.",
7489
- inputSchema: inputSchema103,
7490
- outputSchema: outputSchema103,
7980
+ inputSchema: inputSchema115,
7981
+ outputSchema: outputSchema115,
7491
7982
  slices: ["read"],
7492
7983
  annotations: { readOnlyHint: true },
7493
7984
  handler: async () => {
@@ -7526,10 +8017,10 @@ var tool103 = {
7526
8017
  });
7527
8018
  }
7528
8019
  };
7529
- var get_current_user_default = withStandardDecorators(tool103);
8020
+ var get_current_user_default = withStandardDecorators(tool115);
7530
8021
 
7531
8022
  // src/umbraco-api/tools/account/index.ts
7532
- var collection23 = {
8023
+ var collection24 = {
7533
8024
  metadata: {
7534
8025
  name: "account",
7535
8026
  displayName: "Account",
@@ -7537,7 +8028,7 @@ var collection23 = {
7537
8028
  },
7538
8029
  tools: () => [get_current_user_default]
7539
8030
  };
7540
- var account_default = collection23;
8031
+ var account_default = collection24;
7541
8032
 
7542
8033
  // src/config/mode-registry.ts
7543
8034
  var toolModes = [
@@ -7553,6 +8044,12 @@ var toolModes = [
7553
8044
  description: "Browse, search, upload, and manage media files and folders",
7554
8045
  collections: ["media", "media-management"]
7555
8046
  },
8047
+ {
8048
+ name: "library",
8049
+ displayName: "Library Elements",
8050
+ description: "Browse, view, and manage reusable Library elements (Umbraco 18 Library section)",
8051
+ collections: ["element"]
8052
+ },
7556
8053
  {
7557
8054
  name: "blueprints",
7558
8055
  displayName: "Blueprints",
@@ -7663,6 +8160,7 @@ var collections = [
7663
8160
  versioning_default,
7664
8161
  media_default,
7665
8162
  media_management_default,
8163
+ element_default,
7666
8164
  blueprint_default,
7667
8165
  language_default,
7668
8166
  translation_default,