@umbraco-cms/mcp-editor 17.6.0-beta.5 → 18.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/collections.js +1194 -602
- package/dist/collections.js.map +1 -1
- package/dist/index.js +1419 -823
- package/dist/index.js.map +1 -1
- package/package.json +10 -6
package/dist/collections.js
CHANGED
|
@@ -8,8 +8,7 @@ import { randomUUID } from 'crypto';
|
|
|
8
8
|
|
|
9
9
|
// src/config/mcp-servers.ts
|
|
10
10
|
async function buildServers() {
|
|
11
|
-
|
|
12
|
-
if (isWorkersRuntime || typeof process === "undefined" || !process.env) return [];
|
|
11
|
+
if (typeof process === "undefined" || !process.env) return [];
|
|
13
12
|
const useMockChain = process.env.USE_MOCK_MCP_CHAIN === "true";
|
|
14
13
|
if (useMockChain) {
|
|
15
14
|
const path2 = await import('path');
|
|
@@ -99,21 +98,7 @@ function extractInnerProblemDetails(result) {
|
|
|
99
98
|
};
|
|
100
99
|
}
|
|
101
100
|
async function chainCms(toolName, args) {
|
|
102
|
-
|
|
103
|
-
try {
|
|
104
|
-
result = await mcpClientManager.callTool("cms", toolName, args);
|
|
105
|
-
} catch (error) {
|
|
106
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
107
|
-
return {
|
|
108
|
-
ok: false,
|
|
109
|
-
errorResult: createToolResultError({
|
|
110
|
-
type: "Error",
|
|
111
|
-
title: "Chained tool call failed",
|
|
112
|
-
status: 500,
|
|
113
|
-
detail: `Chained CMS tool "${toolName}" failed: ${message}`
|
|
114
|
-
})
|
|
115
|
-
};
|
|
116
|
-
}
|
|
101
|
+
const result = await mcpClientManager.callTool("cms", toolName, args);
|
|
117
102
|
if (result.isError) {
|
|
118
103
|
const inner = extractInnerProblemDetails(result);
|
|
119
104
|
return { ok: false, errorResult: createToolResultError(inner) };
|
|
@@ -608,43 +593,151 @@ var tool5 = {
|
|
|
608
593
|
}
|
|
609
594
|
};
|
|
610
595
|
var get_document_type_default = withStandardDecorators(tool5);
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
596
|
+
|
|
597
|
+
// src/umbraco-api/tools/helpers/block-builder.ts
|
|
598
|
+
async function resolveBlockEditorAliases(contentTypeKey) {
|
|
599
|
+
const docTypeResult = await chainCms("get-document-type-by-id", { id: contentTypeKey });
|
|
600
|
+
if (!docTypeResult.ok) return { ok: false, errorResult: docTypeResult.errorResult };
|
|
601
|
+
const dataTypeIds = Array.from(new Set(docTypeResult.data.properties.map((p) => p.dataType.id)));
|
|
602
|
+
if (dataTypeIds.length === 0) {
|
|
603
|
+
return { ok: true, editorAliasByAlias: /* @__PURE__ */ new Map() };
|
|
604
|
+
}
|
|
605
|
+
const dataTypesResult = await chainCms("get-data-types-by-id-array", { id: dataTypeIds });
|
|
606
|
+
if (!dataTypesResult.ok) return { ok: false, errorResult: dataTypesResult.errorResult };
|
|
607
|
+
const editorAliasByDataTypeId = new Map(
|
|
608
|
+
dataTypesResult.data.items.map((dt) => [dt.id, dt.editorAlias])
|
|
609
|
+
);
|
|
610
|
+
const editorAliasByAlias = /* @__PURE__ */ new Map();
|
|
611
|
+
for (const prop of docTypeResult.data.properties) {
|
|
612
|
+
const editorAlias = editorAliasByDataTypeId.get(prop.dataType.id);
|
|
613
|
+
if (editorAlias) editorAliasByAlias.set(prop.alias, editorAlias);
|
|
614
|
+
}
|
|
615
|
+
return { ok: true, editorAliasByAlias };
|
|
616
|
+
}
|
|
617
|
+
function buildBlockEntry(contentKey, contentTypeKey, values, editorAliasByAlias, culture, segment) {
|
|
618
|
+
return {
|
|
619
|
+
key: contentKey,
|
|
620
|
+
contentTypeKey,
|
|
621
|
+
values: values.map((v) => ({
|
|
622
|
+
editorAlias: editorAliasByAlias.get(v.alias) ?? "",
|
|
623
|
+
culture,
|
|
624
|
+
segment,
|
|
625
|
+
alias: v.alias,
|
|
626
|
+
value: v.value
|
|
627
|
+
}))
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
function insertAtPosition(list, item, position, matchAnchor) {
|
|
631
|
+
if (position.mode === "append") return { ok: true, list: [...list, item] };
|
|
632
|
+
if (position.mode === "prepend") return { ok: true, list: [item, ...list] };
|
|
633
|
+
const anchorIndex = list.findIndex(matchAnchor);
|
|
634
|
+
if (anchorIndex === -1) return { ok: false, reason: "anchor-not-found" };
|
|
635
|
+
const insertIndex = position.mode === "before" ? anchorIndex : anchorIndex + 1;
|
|
636
|
+
const next = [...list];
|
|
637
|
+
next.splice(insertIndex, 0, item);
|
|
638
|
+
return { ok: true, list: next };
|
|
639
|
+
}
|
|
640
|
+
function isBlockListOrGridValue(value) {
|
|
641
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
|
|
642
|
+
}
|
|
643
|
+
function isRteWithBlocks(value) {
|
|
644
|
+
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);
|
|
645
|
+
}
|
|
646
|
+
function exposeEntry(contentKey, culture, segment) {
|
|
647
|
+
return { contentKey, culture, segment };
|
|
648
|
+
}
|
|
649
|
+
function removeBlockFromContainer(container, contentKey, layoutKey, newLayoutList, doomedSettingsKey) {
|
|
650
|
+
return {
|
|
651
|
+
...container,
|
|
652
|
+
layout: { ...container.layout ?? {}, [layoutKey]: [...newLayoutList] },
|
|
653
|
+
contentData: (container.contentData ?? []).filter((entry) => entry.key !== contentKey),
|
|
654
|
+
settingsData: doomedSettingsKey ? (container.settingsData ?? []).filter((entry) => entry.key !== doomedSettingsKey) : container.settingsData ?? [],
|
|
655
|
+
expose: (container.expose ?? []).filter((entry) => entry.contentKey !== contentKey)
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
// src/umbraco-api/tools/helpers/block-inspector.ts
|
|
660
|
+
function blockPropertiesSchema(editTool) {
|
|
661
|
+
return z.array(z.object({
|
|
662
|
+
propertyAlias: z.string().describe("The property containing these blocks"),
|
|
621
663
|
editorAlias: z.string().optional(),
|
|
622
664
|
blocks: z.array(z.object({
|
|
623
|
-
contentKey: z.string().describe(
|
|
665
|
+
contentKey: z.string().describe(`The block's unique key \u2014 use this with ${editTool}`),
|
|
624
666
|
contentTypeKey: z.string().describe("The block's element type ID"),
|
|
667
|
+
settingsKey: z.string().optional().describe("The key of the block's settings entry. Absent when the block has no settings."),
|
|
625
668
|
properties: z.array(z.object({
|
|
626
669
|
alias: z.string(),
|
|
627
670
|
value: z.any()
|
|
628
671
|
}))
|
|
629
672
|
}))
|
|
630
|
-
}))
|
|
631
|
-
});
|
|
632
|
-
function isBlockListOrGridValue(value) {
|
|
633
|
-
return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
|
|
634
|
-
}
|
|
635
|
-
function isRteWithBlocks(value) {
|
|
636
|
-
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);
|
|
673
|
+
}));
|
|
637
674
|
}
|
|
638
675
|
function extractBlocks(contentData) {
|
|
639
676
|
return contentData.map((block) => ({
|
|
640
|
-
contentKey: block
|
|
641
|
-
contentTypeKey: block
|
|
642
|
-
properties: Array.isArray(block
|
|
677
|
+
contentKey: block?.key ?? "",
|
|
678
|
+
contentTypeKey: block?.contentTypeKey ?? "",
|
|
679
|
+
properties: Array.isArray(block?.values) ? block.values.map((v) => ({ alias: v?.alias ?? "", value: v?.value })) : []
|
|
643
680
|
}));
|
|
644
681
|
}
|
|
682
|
+
function findSettingsKey(container, contentKey) {
|
|
683
|
+
const layout = container?.layout;
|
|
684
|
+
if (!layout || typeof layout !== "object") return void 0;
|
|
685
|
+
return searchLayout(Object.values(layout), contentKey);
|
|
686
|
+
}
|
|
687
|
+
function searchLayout(entries, contentKey) {
|
|
688
|
+
for (const entry of entries) {
|
|
689
|
+
if (Array.isArray(entry)) {
|
|
690
|
+
const found = searchLayout(entry, contentKey);
|
|
691
|
+
if (found) return found;
|
|
692
|
+
continue;
|
|
693
|
+
}
|
|
694
|
+
if (!entry || typeof entry !== "object") continue;
|
|
695
|
+
const candidate = entry;
|
|
696
|
+
if (candidate.contentKey === contentKey) {
|
|
697
|
+
return typeof candidate.settingsKey === "string" && candidate.settingsKey.length > 0 ? candidate.settingsKey : void 0;
|
|
698
|
+
}
|
|
699
|
+
for (const nested of [candidate.areas, candidate.items]) {
|
|
700
|
+
if (Array.isArray(nested)) {
|
|
701
|
+
const found = searchLayout(nested, contentKey);
|
|
702
|
+
if (found) return found;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
return void 0;
|
|
707
|
+
}
|
|
708
|
+
function collectBlockProperties(values, propertyAlias) {
|
|
709
|
+
const filtered = propertyAlias ? values.filter((v) => v.alias === propertyAlias) : values;
|
|
710
|
+
return filtered.filter((v) => isBlockListOrGridValue(v.value) || isRteWithBlocks(v.value)).map((v) => {
|
|
711
|
+
const value = v.value;
|
|
712
|
+
const container = isRteWithBlocks(value) ? value.blocks : value;
|
|
713
|
+
return {
|
|
714
|
+
propertyAlias: v.alias,
|
|
715
|
+
editorAlias: isRteWithBlocks(value) ? "Umbraco.RichText" : v.editorAlias ?? void 0,
|
|
716
|
+
blocks: withSettingsKeys(extractBlocks(container.contentData), container)
|
|
717
|
+
};
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
function withSettingsKeys(blocks, container) {
|
|
721
|
+
return blocks.map((block) => {
|
|
722
|
+
const settingsKey = findSettingsKey(container, block.contentKey);
|
|
723
|
+
return settingsKey ? { ...block, settingsKey } : block;
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
// src/umbraco-api/tools/content/get/inspect-blocks.ts
|
|
728
|
+
var inputSchema6 = {
|
|
729
|
+
id: z.string().uuid().describe("The ID of the page to inspect"),
|
|
730
|
+
propertyAlias: z.string().optional().describe("Specific property alias to inspect. If omitted, all block-based properties are shown.")
|
|
731
|
+
};
|
|
732
|
+
var outputSchema6 = z.object({
|
|
733
|
+
id: z.string(),
|
|
734
|
+
name: z.string(),
|
|
735
|
+
previewUrl: previewUrlSchema,
|
|
736
|
+
blockProperties: blockPropertiesSchema("edit-block")
|
|
737
|
+
});
|
|
645
738
|
var tool6 = {
|
|
646
739
|
name: "inspect-blocks",
|
|
647
|
-
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.",
|
|
740
|
+
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.",
|
|
648
741
|
inputSchema: inputSchema6,
|
|
649
742
|
outputSchema: outputSchema6,
|
|
650
743
|
slices: ["read"],
|
|
@@ -653,28 +746,11 @@ var tool6 = {
|
|
|
653
746
|
const result = await chainCms("get-document-by-id", { id });
|
|
654
747
|
if (!result.ok) return result.errorResult;
|
|
655
748
|
const doc = result.data;
|
|
656
|
-
const allValues = doc.values ?? [];
|
|
657
|
-
const filtered = propertyAlias ? allValues.filter((v) => v.alias === propertyAlias) : allValues;
|
|
658
|
-
const blockProperties = filtered.filter((v) => isBlockListOrGridValue(v.value) || isRteWithBlocks(v.value)).map((v) => {
|
|
659
|
-
const value = v.value;
|
|
660
|
-
if (isRteWithBlocks(value)) {
|
|
661
|
-
return {
|
|
662
|
-
propertyAlias: v.alias,
|
|
663
|
-
editorAlias: "Umbraco.RichText",
|
|
664
|
-
blocks: extractBlocks(value.blocks.contentData)
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
return {
|
|
668
|
-
propertyAlias: v.alias,
|
|
669
|
-
editorAlias: v.editorAlias ?? void 0,
|
|
670
|
-
blocks: extractBlocks(value.contentData)
|
|
671
|
-
};
|
|
672
|
-
});
|
|
673
749
|
return createToolResult({
|
|
674
750
|
id: doc.id,
|
|
675
751
|
name: doc.variants?.[0]?.name ?? "Unknown",
|
|
676
752
|
previewUrl: buildPreviewUrl(doc.id),
|
|
677
|
-
blockProperties
|
|
753
|
+
blockProperties: collectBlockProperties(doc.values ?? [], propertyAlias)
|
|
678
754
|
});
|
|
679
755
|
}
|
|
680
756
|
};
|
|
@@ -1002,7 +1078,8 @@ ${aliases.join("\n")}`
|
|
|
1002
1078
|
const schemaResult = await chainCms("get-data-type-schema", { id: match.id });
|
|
1003
1079
|
if (!schemaResult.ok) return schemaResult.errorResult;
|
|
1004
1080
|
return createToolResult({
|
|
1005
|
-
message:
|
|
1081
|
+
message: `Value-shape template for ${editorAlias}:
|
|
1082
|
+
${JSON.stringify(schemaResult.data, null, 2)}`,
|
|
1006
1083
|
editorAlias
|
|
1007
1084
|
});
|
|
1008
1085
|
}
|
|
@@ -1052,13 +1129,13 @@ async function validateDocumentState(id, doc) {
|
|
|
1052
1129
|
culture: v.culture ?? null,
|
|
1053
1130
|
segment: v.segment ?? null
|
|
1054
1131
|
}));
|
|
1055
|
-
const
|
|
1056
|
-
const parent =
|
|
1132
|
+
const itemResult = await chainCms("get-item-document", { id: [id] });
|
|
1133
|
+
const parent = itemResult.ok ? itemResult.data.items[0]?.parent ?? null : null;
|
|
1057
1134
|
const result = await chainCms("validate-document", {
|
|
1058
1135
|
id,
|
|
1059
1136
|
documentType: { id: target.documentType.id },
|
|
1060
1137
|
template: target.template ? { id: target.template.id } : null,
|
|
1061
|
-
parent,
|
|
1138
|
+
parent: parent ? { id: parent.id } : null,
|
|
1062
1139
|
values,
|
|
1063
1140
|
variants
|
|
1064
1141
|
});
|
|
@@ -1329,70 +1406,6 @@ var tool13 = {
|
|
|
1329
1406
|
}
|
|
1330
1407
|
};
|
|
1331
1408
|
var duplicate_page_default = withStandardDecorators(tool13);
|
|
1332
|
-
|
|
1333
|
-
// src/umbraco-api/tools/helpers/block-builder.ts
|
|
1334
|
-
async function resolveBlockEditorAliases(contentTypeKey) {
|
|
1335
|
-
const docTypeResult = await chainCms("get-document-type-by-id", { id: contentTypeKey });
|
|
1336
|
-
if (!docTypeResult.ok) return { ok: false, errorResult: docTypeResult.errorResult };
|
|
1337
|
-
const dataTypeIds = Array.from(new Set(docTypeResult.data.properties.map((p) => p.dataType.id)));
|
|
1338
|
-
if (dataTypeIds.length === 0) {
|
|
1339
|
-
return { ok: true, editorAliasByAlias: /* @__PURE__ */ new Map() };
|
|
1340
|
-
}
|
|
1341
|
-
const dataTypesResult = await chainCms("get-data-types-by-id-array", { id: dataTypeIds });
|
|
1342
|
-
if (!dataTypesResult.ok) return { ok: false, errorResult: dataTypesResult.errorResult };
|
|
1343
|
-
const editorAliasByDataTypeId = new Map(
|
|
1344
|
-
dataTypesResult.data.items.map((dt) => [dt.id, dt.editorAlias])
|
|
1345
|
-
);
|
|
1346
|
-
const editorAliasByAlias = /* @__PURE__ */ new Map();
|
|
1347
|
-
for (const prop of docTypeResult.data.properties) {
|
|
1348
|
-
const editorAlias = editorAliasByDataTypeId.get(prop.dataType.id);
|
|
1349
|
-
if (editorAlias) editorAliasByAlias.set(prop.alias, editorAlias);
|
|
1350
|
-
}
|
|
1351
|
-
return { ok: true, editorAliasByAlias };
|
|
1352
|
-
}
|
|
1353
|
-
function buildBlockEntry(contentKey, contentTypeKey, values, editorAliasByAlias, culture, segment) {
|
|
1354
|
-
return {
|
|
1355
|
-
key: contentKey,
|
|
1356
|
-
contentTypeKey,
|
|
1357
|
-
values: values.map((v) => ({
|
|
1358
|
-
editorAlias: editorAliasByAlias.get(v.alias) ?? "",
|
|
1359
|
-
culture,
|
|
1360
|
-
segment,
|
|
1361
|
-
alias: v.alias,
|
|
1362
|
-
value: v.value
|
|
1363
|
-
}))
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
function insertAtPosition(list, item, position, matchAnchor) {
|
|
1367
|
-
if (position.mode === "append") return { ok: true, list: [...list, item] };
|
|
1368
|
-
if (position.mode === "prepend") return { ok: true, list: [item, ...list] };
|
|
1369
|
-
const anchorIndex = list.findIndex(matchAnchor);
|
|
1370
|
-
if (anchorIndex === -1) return { ok: false, reason: "anchor-not-found" };
|
|
1371
|
-
const insertIndex = position.mode === "before" ? anchorIndex : anchorIndex + 1;
|
|
1372
|
-
const next = [...list];
|
|
1373
|
-
next.splice(insertIndex, 0, item);
|
|
1374
|
-
return { ok: true, list: next };
|
|
1375
|
-
}
|
|
1376
|
-
function isBlockListOrGridValue2(value) {
|
|
1377
|
-
return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
|
|
1378
|
-
}
|
|
1379
|
-
function isRteWithBlocks2(value) {
|
|
1380
|
-
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);
|
|
1381
|
-
}
|
|
1382
|
-
function exposeEntry(contentKey, culture, segment) {
|
|
1383
|
-
return { contentKey, culture, segment };
|
|
1384
|
-
}
|
|
1385
|
-
function removeBlockFromContainer(container, contentKey, layoutKey, newLayoutList, doomedSettingsKey) {
|
|
1386
|
-
return {
|
|
1387
|
-
...container,
|
|
1388
|
-
layout: { ...container.layout ?? {}, [layoutKey]: [...newLayoutList] },
|
|
1389
|
-
contentData: (container.contentData ?? []).filter((entry) => entry.key !== contentKey),
|
|
1390
|
-
settingsData: doomedSettingsKey ? (container.settingsData ?? []).filter((entry) => entry.key !== doomedSettingsKey) : container.settingsData ?? [],
|
|
1391
|
-
expose: (container.expose ?? []).filter((entry) => entry.contentKey !== contentKey)
|
|
1392
|
-
};
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
// src/umbraco-api/tools/content/post/add-blocklist-block.ts
|
|
1396
1409
|
var positionSchema = z.object({
|
|
1397
1410
|
mode: z.enum(["append", "prepend", "before", "after"]).describe("Where to place the new block relative to existing blocks"),
|
|
1398
1411
|
anchorContentKey: z.string().uuid().optional().describe("Required for 'before' or 'after' \u2014 the contentKey of the anchor block")
|
|
@@ -1451,7 +1464,7 @@ var tool14 = {
|
|
|
1451
1464
|
settingsData: [],
|
|
1452
1465
|
expose: []
|
|
1453
1466
|
};
|
|
1454
|
-
if (existingProp && (!
|
|
1467
|
+
if (existingProp && (!isBlockListOrGridValue(propValue) || existingProp.editorAlias !== "Umbraco.BlockList")) {
|
|
1455
1468
|
return createToolResultError({ content: [{ type: "text", text: `Property '${propertyAlias}' on '${pageName}' is not a BlockList. Use inspect-blocks to confirm the editor type, or add-rte-block / add-blockgrid-block as appropriate.` }], isError: true });
|
|
1456
1469
|
}
|
|
1457
1470
|
const contentEditorAliases = await resolveBlockEditorAliases(contentTypeKey);
|
|
@@ -1571,7 +1584,7 @@ var tool15 = {
|
|
|
1571
1584
|
settingsData: [],
|
|
1572
1585
|
expose: []
|
|
1573
1586
|
};
|
|
1574
|
-
if (existingProp && (!
|
|
1587
|
+
if (existingProp && (!isBlockListOrGridValue(propValue) || existingProp.editorAlias !== "Umbraco.BlockGrid")) {
|
|
1575
1588
|
return createToolResultError({ content: [{ type: "text", text: `Property '${propertyAlias}' on '${pageName}' is not a BlockGrid. Use inspect-blocks to confirm the editor type, or add-blocklist-block / add-rte-block as appropriate.` }], isError: true });
|
|
1576
1589
|
}
|
|
1577
1590
|
const contentEditorAliases = await resolveBlockEditorAliases(contentTypeKey);
|
|
@@ -1738,7 +1751,7 @@ var tool16 = {
|
|
|
1738
1751
|
markup: "",
|
|
1739
1752
|
blocks: { layout: {}, contentData: [], settingsData: [], expose: [] }
|
|
1740
1753
|
};
|
|
1741
|
-
if (existingProp && !
|
|
1754
|
+
if (existingProp && !isRteWithBlocks(propValue)) {
|
|
1742
1755
|
return createToolResultError({ content: [{ type: "text", text: `Property '${propertyAlias}' on '${pageName}' is not a rich text with blocks. Use inspect-blocks to confirm the editor type, or add-blocklist-block / add-blockgrid-block as appropriate.` }], isError: true });
|
|
1743
1756
|
}
|
|
1744
1757
|
const contentEditorAliases = await resolveBlockEditorAliases(contentTypeKey);
|
|
@@ -1876,7 +1889,7 @@ var outputSchema18 = z.object({
|
|
|
1876
1889
|
});
|
|
1877
1890
|
var tool18 = {
|
|
1878
1891
|
name: "edit-block",
|
|
1879
|
-
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.",
|
|
1892
|
+
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.",
|
|
1880
1893
|
inputSchema: inputSchema18,
|
|
1881
1894
|
outputSchema: outputSchema18,
|
|
1882
1895
|
slices: ["update"],
|
|
@@ -1944,7 +1957,8 @@ var tool19 = {
|
|
|
1944
1957
|
const targetCulture = culture ?? null;
|
|
1945
1958
|
const docResult = await chainCms("get-document-by-id", { id });
|
|
1946
1959
|
if (!docResult.ok) return docResult.errorResult;
|
|
1947
|
-
const
|
|
1960
|
+
const doc = docResult.data;
|
|
1961
|
+
const variants = doc.variants ?? [];
|
|
1948
1962
|
const targetVariant = variants.find((v) => matchesCulture(v, targetCulture));
|
|
1949
1963
|
if (!targetVariant) {
|
|
1950
1964
|
if (targetCulture) {
|
|
@@ -1979,8 +1993,8 @@ var tool19 = {
|
|
|
1979
1993
|
previewUrl: buildPreviewUrl(id)
|
|
1980
1994
|
});
|
|
1981
1995
|
}
|
|
1982
|
-
const
|
|
1983
|
-
if (!
|
|
1996
|
+
const updateResult = await chainCms("update-document-name", { id, name, culture: targetCulture });
|
|
1997
|
+
if (!updateResult.ok) return updateResult.errorResult;
|
|
1984
1998
|
return createToolResult({
|
|
1985
1999
|
message: `Renamed page${cultureLabel} from "${previousName}" to "${name}" (saved, not published)`,
|
|
1986
2000
|
id,
|
|
@@ -2278,7 +2292,7 @@ function findAndRemoveGridItem(items, contentKey) {
|
|
|
2278
2292
|
function planRemoval(propValue, editorAlias, propertyAlias, contentKey, pageName) {
|
|
2279
2293
|
const notFound = { ok: false, errorText: `Block '${contentKey}' was not found in property '${propertyAlias}'.` };
|
|
2280
2294
|
const draftSuffix = "Will be saved as a draft, not published.";
|
|
2281
|
-
if (
|
|
2295
|
+
if (isBlockListOrGridValue(propValue) && editorAlias === "Umbraco.BlockList") {
|
|
2282
2296
|
const layoutKey = "Umbraco.BlockList";
|
|
2283
2297
|
const layoutList = propValue.layout?.[layoutKey] ?? [];
|
|
2284
2298
|
const doomed = layoutList.find((e) => e.contentKey === contentKey);
|
|
@@ -2289,7 +2303,7 @@ function planRemoval(propValue, editorAlias, propertyAlias, contentKey, pageName
|
|
|
2289
2303
|
confirmMessage: `Remove block ${contentKey} from "${pageName}" (BlockList ${propertyAlias})? ${draftSuffix}`
|
|
2290
2304
|
};
|
|
2291
2305
|
}
|
|
2292
|
-
if (
|
|
2306
|
+
if (isBlockListOrGridValue(propValue) && editorAlias === "Umbraco.BlockGrid") {
|
|
2293
2307
|
const layoutKey = "Umbraco.BlockGrid";
|
|
2294
2308
|
const removed = findAndRemoveGridItem(propValue.layout?.[layoutKey] ?? [], contentKey);
|
|
2295
2309
|
if (!removed.found) return notFound;
|
|
@@ -2299,7 +2313,7 @@ function planRemoval(propValue, editorAlias, propertyAlias, contentKey, pageName
|
|
|
2299
2313
|
confirmMessage: `Remove block ${contentKey} from "${pageName}" (BlockGrid ${propertyAlias})? ${draftSuffix}`
|
|
2300
2314
|
};
|
|
2301
2315
|
}
|
|
2302
|
-
if (
|
|
2316
|
+
if (isRteWithBlocks(propValue)) {
|
|
2303
2317
|
const layoutKey = "Umbraco.RichText";
|
|
2304
2318
|
const blocks = propValue.blocks;
|
|
2305
2319
|
const layoutList = blocks.layout?.[layoutKey] ?? [];
|
|
@@ -2509,17 +2523,36 @@ var outputSchema27 = z.object({
|
|
|
2509
2523
|
updatedFields: z.array(z.string()),
|
|
2510
2524
|
publishedUrls: publishedUrlsSchema
|
|
2511
2525
|
});
|
|
2512
|
-
function
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2526
|
+
function valueKey2(value) {
|
|
2527
|
+
return `${value.alias}|${value.culture ?? ""}|${value.segment ?? ""}`;
|
|
2528
|
+
}
|
|
2529
|
+
function normaliseValue(value) {
|
|
2530
|
+
return {
|
|
2531
|
+
alias: value.alias,
|
|
2532
|
+
value: value.value,
|
|
2533
|
+
culture: value.culture ?? null,
|
|
2534
|
+
segment: value.segment ?? null
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2537
|
+
function mergeValues(current, incoming) {
|
|
2538
|
+
const merged = current.map(normaliseValue);
|
|
2539
|
+
const indexByKey = new Map(merged.map((value, index) => [valueKey2(value), index]));
|
|
2540
|
+
for (const value of incoming) {
|
|
2541
|
+
const next = normaliseValue(value);
|
|
2542
|
+
const key = valueKey2(next);
|
|
2543
|
+
const existingIndex = indexByKey.get(key);
|
|
2544
|
+
if (existingIndex !== void 0) {
|
|
2545
|
+
merged[existingIndex] = next;
|
|
2546
|
+
} else {
|
|
2547
|
+
indexByKey.set(key, merged.length);
|
|
2548
|
+
merged.push(next);
|
|
2549
|
+
}
|
|
2517
2550
|
}
|
|
2518
|
-
return
|
|
2551
|
+
return merged;
|
|
2519
2552
|
}
|
|
2520
2553
|
var tool27 = {
|
|
2521
2554
|
name: "save-and-publish",
|
|
2522
|
-
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
|
|
2555
|
+
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.",
|
|
2523
2556
|
inputSchema: inputSchema27,
|
|
2524
2557
|
outputSchema: outputSchema27,
|
|
2525
2558
|
slices: ["publish", "update"],
|
|
@@ -2530,6 +2563,7 @@ var tool27 = {
|
|
|
2530
2563
|
const doc = docResult.data;
|
|
2531
2564
|
const pageName = doc.variants?.[0]?.name ?? "Unknown";
|
|
2532
2565
|
const fieldNames = (values ?? []).map((v) => v.alias);
|
|
2566
|
+
const hasValues = (values?.length ?? 0) > 0;
|
|
2533
2567
|
if (includeDescendants) {
|
|
2534
2568
|
if (!await requestApproval(extra, `Publish "${pageName}" and all its descendants?`)) {
|
|
2535
2569
|
return createToolResult({
|
|
@@ -2544,9 +2578,9 @@ var tool27 = {
|
|
|
2544
2578
|
}
|
|
2545
2579
|
}
|
|
2546
2580
|
const variantCultures = (doc.variants ?? []).length ? doc.variants.map((v) => v.culture ?? null) : [null];
|
|
2547
|
-
const saved = !!(values && values.length > 0);
|
|
2548
2581
|
if (includeDescendants) {
|
|
2549
|
-
|
|
2582
|
+
let saved = false;
|
|
2583
|
+
if (hasValues) {
|
|
2550
2584
|
const properties = values.map((v) => ({
|
|
2551
2585
|
alias: v.alias,
|
|
2552
2586
|
value: v.value,
|
|
@@ -2555,6 +2589,7 @@ var tool27 = {
|
|
|
2555
2589
|
}));
|
|
2556
2590
|
const updateResult = await chainCms("update-document-properties", { id, properties });
|
|
2557
2591
|
if (!updateResult.ok) return updateResult.errorResult;
|
|
2592
|
+
saved = true;
|
|
2558
2593
|
}
|
|
2559
2594
|
const publishResult = await chainCms("publish-document-with-descendants", {
|
|
2560
2595
|
id,
|
|
@@ -2577,52 +2612,74 @@ var tool27 = {
|
|
|
2577
2612
|
}
|
|
2578
2613
|
return publishResult.errorResult;
|
|
2579
2614
|
}
|
|
2580
|
-
|
|
2581
|
-
|
|
2615
|
+
const savedPart2 = saved ? `Saved ${fieldNames.length} field(s) and ` : "";
|
|
2616
|
+
return createToolResult({
|
|
2617
|
+
message: `${savedPart2}published "${pageName}" and all descendants`,
|
|
2618
|
+
id,
|
|
2619
|
+
name: pageName,
|
|
2620
|
+
saved,
|
|
2621
|
+
published: true,
|
|
2622
|
+
updatedFields: fieldNames,
|
|
2623
|
+
publishedUrls: await fetchPublishedUrls(id)
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
if (hasValues) {
|
|
2582
2627
|
const updateAndPublishResult = await chainCms("update-and-publish-document", {
|
|
2583
2628
|
id,
|
|
2584
2629
|
data: {
|
|
2585
|
-
|
|
2630
|
+
culturesToPublish: [...new Set(variantCultures.filter((c) => c !== null))],
|
|
2631
|
+
template: doc.template ?? null,
|
|
2632
|
+
values: mergeValues(doc.values ?? [], values),
|
|
2586
2633
|
variants: (doc.variants ?? []).map((v) => ({
|
|
2587
2634
|
culture: v.culture ?? null,
|
|
2588
2635
|
segment: v.segment ?? null,
|
|
2589
2636
|
name: v.name
|
|
2590
|
-
}))
|
|
2591
|
-
template: doc.template ?? null,
|
|
2592
|
-
culturesToPublish: variantCultures.filter((c) => c !== null)
|
|
2637
|
+
}))
|
|
2593
2638
|
}
|
|
2594
2639
|
});
|
|
2595
|
-
if (!updateAndPublishResult.ok)
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
const verifyError = await verifyDocumentPublished(id, variantCultures);
|
|
2599
|
-
if (verifyError) {
|
|
2600
|
-
if (saved) {
|
|
2601
|
-
return createToolResult({
|
|
2602
|
-
message: `Saved ${fieldNames.length} field(s) on "${pageName}" but publish did not take effect: ${verifyError}`,
|
|
2603
|
-
id,
|
|
2604
|
-
name: pageName,
|
|
2605
|
-
saved: true,
|
|
2606
|
-
published: false,
|
|
2607
|
-
updatedFields: fieldNames,
|
|
2608
|
-
publishedUrls: []
|
|
2609
|
-
});
|
|
2610
|
-
}
|
|
2640
|
+
if (!updateAndPublishResult.ok) {
|
|
2641
|
+
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.`;
|
|
2642
|
+
const problem = updateAndPublishResult.errorResult.structuredContent;
|
|
2611
2643
|
return createToolResultError({
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2644
|
+
...problem,
|
|
2645
|
+
status: typeof problem?.status === "number" ? problem.status : 500,
|
|
2646
|
+
title: "Save and publish failed",
|
|
2647
|
+
detail: problem?.detail ? `${String(problem.detail)} ${rolledBack}` : rolledBack
|
|
2648
|
+
});
|
|
2649
|
+
}
|
|
2650
|
+
} else {
|
|
2651
|
+
const publishResult = await chainCms("publish-document", {
|
|
2652
|
+
id,
|
|
2653
|
+
data: { publishSchedules: variantCultures.map((c) => ({ culture: c })) }
|
|
2654
|
+
});
|
|
2655
|
+
if (!publishResult.ok) return publishResult.errorResult;
|
|
2656
|
+
}
|
|
2657
|
+
const verifyError = await verifyDocumentPublished(id, variantCultures);
|
|
2658
|
+
if (verifyError) {
|
|
2659
|
+
if (hasValues) {
|
|
2660
|
+
return createToolResult({
|
|
2661
|
+
message: `Saved ${fieldNames.length} field(s) on "${pageName}" but publish did not take effect: ${verifyError}`,
|
|
2662
|
+
id,
|
|
2663
|
+
name: pageName,
|
|
2664
|
+
saved: true,
|
|
2665
|
+
published: false,
|
|
2666
|
+
updatedFields: fieldNames,
|
|
2667
|
+
publishedUrls: []
|
|
2615
2668
|
});
|
|
2616
2669
|
}
|
|
2670
|
+
return createToolResultError({
|
|
2671
|
+
status: 500,
|
|
2672
|
+
title: "Publish did not take effect",
|
|
2673
|
+
detail: `"${pageName}": ${verifyError}`
|
|
2674
|
+
});
|
|
2617
2675
|
}
|
|
2618
2676
|
const publishedUrls = await fetchPublishedUrls(id);
|
|
2619
|
-
const savedPart =
|
|
2620
|
-
const descPart = includeDescendants ? " and all descendants" : "";
|
|
2677
|
+
const savedPart = hasValues ? `Saved ${fieldNames.length} field(s) and ` : "";
|
|
2621
2678
|
return createToolResult({
|
|
2622
|
-
message: `${savedPart}published "${pageName}"
|
|
2679
|
+
message: `${savedPart}published "${pageName}"`,
|
|
2623
2680
|
id,
|
|
2624
2681
|
name: pageName,
|
|
2625
|
-
saved,
|
|
2682
|
+
saved: hasValues,
|
|
2626
2683
|
published: true,
|
|
2627
2684
|
updatedFields: fieldNames,
|
|
2628
2685
|
publishedUrls
|
|
@@ -3698,46 +3755,565 @@ var collection5 = {
|
|
|
3698
3755
|
};
|
|
3699
3756
|
var media_management_default = collection5;
|
|
3700
3757
|
var inputSchema46 = {
|
|
3701
|
-
|
|
3702
|
-
take: z.number().optional().default(50).describe("Number of results to return"),
|
|
3703
|
-
skip: z.number().optional().default(0).describe("Number of results to skip")
|
|
3758
|
+
id: z.string().uuid().describe("The unique ID of the element to retrieve")
|
|
3704
3759
|
};
|
|
3705
3760
|
var outputSchema46 = z.object({
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
})).describe("
|
|
3711
|
-
total: z.number()
|
|
3761
|
+
id: z.string(),
|
|
3762
|
+
name: z.string(),
|
|
3763
|
+
elementType: z.object({ id: z.string() }).describe("The element type (document type) this element is based on"),
|
|
3764
|
+
values: z.array(z.object({ alias: z.string(), value: z.any() }).passthrough()).describe("Property field values"),
|
|
3765
|
+
variants: z.array(z.object({ name: z.string() }).passthrough()).describe("Language/culture variants")
|
|
3712
3766
|
});
|
|
3713
3767
|
var tool46 = {
|
|
3714
|
-
name: "
|
|
3715
|
-
description: "
|
|
3768
|
+
name: "get-element",
|
|
3769
|
+
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.",
|
|
3716
3770
|
inputSchema: inputSchema46,
|
|
3717
3771
|
outputSchema: outputSchema46,
|
|
3718
|
-
slices: ["
|
|
3772
|
+
slices: ["read"],
|
|
3719
3773
|
annotations: { readOnlyHint: true },
|
|
3720
|
-
handler: async ({
|
|
3721
|
-
const
|
|
3722
|
-
const result = parentId ? await chainCms("get-document-blueprint-children", { parentId, cursor }) : await chainCms("get-document-blueprint-root", { cursor });
|
|
3774
|
+
handler: async ({ id }) => {
|
|
3775
|
+
const result = await chainCms("get-element-by-id", { id });
|
|
3723
3776
|
if (!result.ok) return result.errorResult;
|
|
3777
|
+
const el = result.data;
|
|
3724
3778
|
return createToolResult({
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
total: result.data.total ?? 0
|
|
3779
|
+
id: el.id,
|
|
3780
|
+
name: el.variants?.[0]?.name ?? "Unknown",
|
|
3781
|
+
elementType: { id: el.documentType?.id ?? el.elementType?.id ?? "" },
|
|
3782
|
+
values: el.values ?? [],
|
|
3783
|
+
variants: el.variants ?? []
|
|
3731
3784
|
});
|
|
3732
3785
|
}
|
|
3733
3786
|
};
|
|
3734
|
-
var
|
|
3787
|
+
var get_element_default = withStandardDecorators(tool46);
|
|
3735
3788
|
var inputSchema47 = {
|
|
3736
|
-
|
|
3789
|
+
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)."),
|
|
3790
|
+
take: z.number().optional().default(20).describe("Number of results to return"),
|
|
3791
|
+
skip: z.number().optional().default(0).describe("Number of results to skip")
|
|
3737
3792
|
};
|
|
3738
3793
|
var outputSchema47 = z.object({
|
|
3739
|
-
|
|
3740
|
-
|
|
3794
|
+
items: z.array(z.object({
|
|
3795
|
+
id: z.string(),
|
|
3796
|
+
name: z.string(),
|
|
3797
|
+
isFolder: z.boolean().describe("True if this node is a folder that organises elements, false if it is an element item"),
|
|
3798
|
+
hasChildren: z.boolean()
|
|
3799
|
+
})).describe("Child folders and elements"),
|
|
3800
|
+
total: z.number().describe("Total number of children")
|
|
3801
|
+
});
|
|
3802
|
+
var tool47 = {
|
|
3803
|
+
name: "list-element-children",
|
|
3804
|
+
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.",
|
|
3805
|
+
inputSchema: inputSchema47,
|
|
3806
|
+
outputSchema: outputSchema47,
|
|
3807
|
+
slices: ["tree"],
|
|
3808
|
+
annotations: { readOnlyHint: true },
|
|
3809
|
+
handler: async ({ parentId, take, skip }) => {
|
|
3810
|
+
const cursor = buildChainedCursor(skip, take);
|
|
3811
|
+
const result = parentId ? await chainCms("get-element-children", { parentId, cursor }) : await chainCms("get-element-root", { cursor });
|
|
3812
|
+
if (!result.ok) return result.errorResult;
|
|
3813
|
+
const data = result.data;
|
|
3814
|
+
const items = data.items ?? [];
|
|
3815
|
+
return createToolResult({
|
|
3816
|
+
items: items.map((item) => ({
|
|
3817
|
+
id: item.id,
|
|
3818
|
+
name: item.variants?.[0]?.name ?? item.name ?? "Unknown",
|
|
3819
|
+
isFolder: item.isFolder ?? false,
|
|
3820
|
+
hasChildren: item.hasChildren ?? false
|
|
3821
|
+
})),
|
|
3822
|
+
total: data.total ?? items.length
|
|
3823
|
+
});
|
|
3824
|
+
}
|
|
3825
|
+
};
|
|
3826
|
+
var list_element_children_default = withStandardDecorators(tool47);
|
|
3827
|
+
var inputSchema48 = {
|
|
3828
|
+
query: z.string().describe("Search term to find Library elements by name"),
|
|
3829
|
+
take: z.number().optional().default(10).describe("Number of results to return (default 10)"),
|
|
3830
|
+
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
3831
|
+
};
|
|
3832
|
+
var outputSchema48 = z.object({
|
|
3833
|
+
items: z.array(z.object({
|
|
3834
|
+
id: z.string(),
|
|
3835
|
+
name: z.string()
|
|
3836
|
+
})).describe("Matching Library elements"),
|
|
3837
|
+
total: z.number().describe("Total number of matches")
|
|
3838
|
+
});
|
|
3839
|
+
var tool48 = {
|
|
3840
|
+
name: "search-elements",
|
|
3841
|
+
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).",
|
|
3842
|
+
inputSchema: inputSchema48,
|
|
3843
|
+
outputSchema: outputSchema48,
|
|
3844
|
+
slices: ["search"],
|
|
3845
|
+
annotations: { readOnlyHint: true },
|
|
3846
|
+
handler: async ({ query, take, skip }) => {
|
|
3847
|
+
const result = await chainCms("search-element", { query, cursor: buildChainedCursor(skip, take) });
|
|
3848
|
+
if (!result.ok) return result.errorResult;
|
|
3849
|
+
const data = result.data;
|
|
3850
|
+
const items = data.items ?? [];
|
|
3851
|
+
return createToolResult({
|
|
3852
|
+
items: items.map((item) => ({
|
|
3853
|
+
id: item.id,
|
|
3854
|
+
name: item.variants?.[0]?.name ?? item.name ?? "Unknown"
|
|
3855
|
+
})),
|
|
3856
|
+
total: data.total ?? items.length
|
|
3857
|
+
});
|
|
3858
|
+
}
|
|
3859
|
+
};
|
|
3860
|
+
var search_elements_default = withStandardDecorators(tool48);
|
|
3861
|
+
var inputSchema49 = {
|
|
3862
|
+
id: z.string().uuid().describe("The ID of the Library element to inspect"),
|
|
3863
|
+
propertyAlias: z.string().optional().describe("Specific property alias to inspect. If omitted, all block-based properties are shown.")
|
|
3864
|
+
};
|
|
3865
|
+
var outputSchema49 = z.object({
|
|
3866
|
+
id: z.string(),
|
|
3867
|
+
name: z.string(),
|
|
3868
|
+
blockProperties: blockPropertiesSchema("edit-element-block")
|
|
3869
|
+
});
|
|
3870
|
+
var tool49 = {
|
|
3871
|
+
name: "inspect-element-blocks",
|
|
3872
|
+
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).",
|
|
3873
|
+
inputSchema: inputSchema49,
|
|
3874
|
+
outputSchema: outputSchema49,
|
|
3875
|
+
slices: ["read"],
|
|
3876
|
+
annotations: { readOnlyHint: true },
|
|
3877
|
+
handler: async ({ id, propertyAlias }) => {
|
|
3878
|
+
const result = await chainCms("get-element-by-id", { id });
|
|
3879
|
+
if (!result.ok) return result.errorResult;
|
|
3880
|
+
const element = result.data;
|
|
3881
|
+
return createToolResult({
|
|
3882
|
+
id: element.id,
|
|
3883
|
+
name: element.variants?.[0]?.name ?? "Unknown",
|
|
3884
|
+
blockProperties: collectBlockProperties(element.values ?? [], propertyAlias)
|
|
3885
|
+
});
|
|
3886
|
+
}
|
|
3887
|
+
};
|
|
3888
|
+
var inspect_element_blocks_default = withStandardDecorators(tool49);
|
|
3889
|
+
var inputSchema50 = {
|
|
3890
|
+
name: z.string().describe("The name of the element to create"),
|
|
3891
|
+
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."),
|
|
3892
|
+
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."),
|
|
3893
|
+
values: z.array(z.object({
|
|
3894
|
+
alias: z.string().describe("The property alias"),
|
|
3895
|
+
value: z.any().describe("The property value"),
|
|
3896
|
+
culture: z.string().nullable().optional().describe("The culture code for variant content"),
|
|
3897
|
+
segment: z.string().nullable().optional().describe("The segment for segmented content")
|
|
3898
|
+
})).optional().describe("Initial property values to set on the new element")
|
|
3899
|
+
};
|
|
3900
|
+
var outputSchema50 = z.object({
|
|
3901
|
+
message: z.string(),
|
|
3902
|
+
id: z.string(),
|
|
3903
|
+
name: z.string()
|
|
3904
|
+
});
|
|
3905
|
+
var tool50 = {
|
|
3906
|
+
name: "create-element",
|
|
3907
|
+
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.",
|
|
3908
|
+
inputSchema: inputSchema50,
|
|
3909
|
+
outputSchema: outputSchema50,
|
|
3910
|
+
slices: ["create"],
|
|
3911
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
3912
|
+
handler: async ({ name, elementTypeId, parentId, values }) => {
|
|
3913
|
+
const editorAliasByPropertyAlias = /* @__PURE__ */ new Map();
|
|
3914
|
+
if (values && values.length > 0) {
|
|
3915
|
+
const typeResult = await chainCms("get-document-type-by-id", { id: elementTypeId });
|
|
3916
|
+
if (!typeResult.ok) return typeResult.errorResult;
|
|
3917
|
+
const dataTypeIds = Array.from(new Set(typeResult.data.properties.map((p) => p.dataType.id)));
|
|
3918
|
+
const dataTypesResult = await chainCms("get-data-types-by-id-array", { id: dataTypeIds });
|
|
3919
|
+
if (!dataTypesResult.ok) return dataTypesResult.errorResult;
|
|
3920
|
+
const editorAliasByDataTypeId = new Map(
|
|
3921
|
+
dataTypesResult.data.items.map((dt) => [dt.id, dt.editorAlias])
|
|
3922
|
+
);
|
|
3923
|
+
for (const prop of typeResult.data.properties) {
|
|
3924
|
+
const editorAlias = editorAliasByDataTypeId.get(prop.dataType.id);
|
|
3925
|
+
if (editorAlias) editorAliasByPropertyAlias.set(prop.alias, editorAlias);
|
|
3926
|
+
}
|
|
3927
|
+
}
|
|
3928
|
+
const createResult = await chainCms("create-element", {
|
|
3929
|
+
documentTypeId: elementTypeId,
|
|
3930
|
+
name,
|
|
3931
|
+
values: (values ?? []).map((v) => ({
|
|
3932
|
+
alias: v.alias,
|
|
3933
|
+
value: v.value,
|
|
3934
|
+
culture: v.culture ?? null,
|
|
3935
|
+
segment: v.segment ?? null,
|
|
3936
|
+
editorAlias: editorAliasByPropertyAlias.get(v.alias) ?? ""
|
|
3937
|
+
})),
|
|
3938
|
+
...parentId ? { parentId } : {}
|
|
3939
|
+
});
|
|
3940
|
+
if (!createResult.ok) return createResult.errorResult;
|
|
3941
|
+
return createToolResult({
|
|
3942
|
+
message: `Created draft element "${name}"`,
|
|
3943
|
+
id: createResult.data.id ?? "",
|
|
3944
|
+
name
|
|
3945
|
+
});
|
|
3946
|
+
}
|
|
3947
|
+
};
|
|
3948
|
+
var create_element_default = withStandardDecorators(tool50);
|
|
3949
|
+
var inputSchema51 = {
|
|
3950
|
+
name: z.string().describe("The name of the element to create"),
|
|
3951
|
+
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."),
|
|
3952
|
+
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."),
|
|
3953
|
+
values: z.array(z.object({
|
|
3954
|
+
alias: z.string().describe("The property alias"),
|
|
3955
|
+
value: z.any().describe("The property value"),
|
|
3956
|
+
culture: z.string().nullable().optional().describe("The culture code for variant content"),
|
|
3957
|
+
segment: z.string().nullable().optional().describe("The segment for segmented content")
|
|
3958
|
+
})).optional().describe("Initial property values to set on the new element")
|
|
3959
|
+
};
|
|
3960
|
+
var outputSchema51 = z.object({
|
|
3961
|
+
message: z.string(),
|
|
3962
|
+
id: z.string(),
|
|
3963
|
+
name: z.string()
|
|
3964
|
+
});
|
|
3965
|
+
var tool51 = {
|
|
3966
|
+
name: "create-and-publish-element",
|
|
3967
|
+
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.",
|
|
3968
|
+
inputSchema: inputSchema51,
|
|
3969
|
+
outputSchema: outputSchema51,
|
|
3970
|
+
slices: ["create", "publish"],
|
|
3971
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
3972
|
+
handler: async ({ name, elementTypeId, parentId, values }) => {
|
|
3973
|
+
const createResult = await chainCms("create-and-publish-element", {
|
|
3974
|
+
documentTypeId: elementTypeId,
|
|
3975
|
+
name,
|
|
3976
|
+
values: (values ?? []).map((v) => ({
|
|
3977
|
+
alias: v.alias,
|
|
3978
|
+
value: v.value,
|
|
3979
|
+
culture: v.culture ?? null,
|
|
3980
|
+
segment: v.segment ?? null
|
|
3981
|
+
})),
|
|
3982
|
+
...parentId ? { parentId } : {}
|
|
3983
|
+
});
|
|
3984
|
+
if (!createResult.ok) return createResult.errorResult;
|
|
3985
|
+
return createToolResult({
|
|
3986
|
+
message: `Created and published element "${name}"`,
|
|
3987
|
+
id: createResult.data.id ?? "",
|
|
3988
|
+
name
|
|
3989
|
+
});
|
|
3990
|
+
}
|
|
3991
|
+
};
|
|
3992
|
+
var create_and_publish_element_default = withStandardDecorators(tool51);
|
|
3993
|
+
var inputSchema52 = {
|
|
3994
|
+
name: z.string().describe("Name of the new folder"),
|
|
3995
|
+
parentId: z.string().uuid().optional().describe("ID of the parent folder in the Library (omit to create at the root)")
|
|
3996
|
+
};
|
|
3997
|
+
var outputSchema52 = z.object({
|
|
3998
|
+
message: z.string(),
|
|
3999
|
+
id: z.string(),
|
|
4000
|
+
name: z.string()
|
|
4001
|
+
});
|
|
4002
|
+
var tool52 = {
|
|
4003
|
+
name: "create-element-folder",
|
|
4004
|
+
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.",
|
|
4005
|
+
inputSchema: inputSchema52,
|
|
4006
|
+
outputSchema: outputSchema52,
|
|
4007
|
+
slices: ["create"],
|
|
4008
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
4009
|
+
handler: async ({ name, parentId }) => {
|
|
4010
|
+
const createResult = await chainCms("create-element-folder", { name, parent: parentId ? { id: parentId } : null });
|
|
4011
|
+
if (!createResult.ok) return createResult.errorResult;
|
|
4012
|
+
let createdId = createResult.data?.id ?? "";
|
|
4013
|
+
let location = "at the root";
|
|
4014
|
+
if (!createdId) {
|
|
4015
|
+
const listResult = parentId ? await chainCms("get-element-children", { parentId }) : await chainCms("get-element-root", {});
|
|
4016
|
+
if (listResult.ok) {
|
|
4017
|
+
const match = (listResult.data.items ?? []).filter((i) => i.isFolder).find((i) => (i.variants?.[0]?.name ?? i.name) === name);
|
|
4018
|
+
if (match) createdId = match.id;
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
if (parentId) {
|
|
4022
|
+
const folderResult = await chainCms("get-element-folder", { id: parentId });
|
|
4023
|
+
if (folderResult.ok) location = `under "${folderResult.data.name ?? "Unknown"}"`;
|
|
4024
|
+
}
|
|
4025
|
+
return createToolResult({
|
|
4026
|
+
message: `Created Library folder "${name}" ${location}`,
|
|
4027
|
+
id: createdId,
|
|
4028
|
+
name
|
|
4029
|
+
});
|
|
4030
|
+
}
|
|
4031
|
+
};
|
|
4032
|
+
var create_element_folder_default = withStandardDecorators(tool52);
|
|
4033
|
+
var inputSchema53 = {
|
|
4034
|
+
id: z.string().uuid().describe("The ID of the element to publish")
|
|
4035
|
+
};
|
|
4036
|
+
var outputSchema53 = z.object({
|
|
4037
|
+
message: z.string(),
|
|
4038
|
+
id: z.string(),
|
|
4039
|
+
name: z.string()
|
|
4040
|
+
});
|
|
4041
|
+
var tool53 = {
|
|
4042
|
+
name: "publish-element",
|
|
4043
|
+
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.",
|
|
4044
|
+
inputSchema: inputSchema53,
|
|
4045
|
+
outputSchema: outputSchema53,
|
|
4046
|
+
slices: ["publish"],
|
|
4047
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
4048
|
+
handler: async ({ id }) => {
|
|
4049
|
+
const elResult = await chainCms("get-element-by-id", { id });
|
|
4050
|
+
if (!elResult.ok) return elResult.errorResult;
|
|
4051
|
+
const el = elResult.data;
|
|
4052
|
+
const elementName = el.variants?.[0]?.name ?? "Unknown";
|
|
4053
|
+
const variantCultures = (el.variants ?? []).length ? el.variants.map((v) => v.culture ?? null) : [null];
|
|
4054
|
+
const publishResult = await chainCms("publish-element", {
|
|
4055
|
+
id,
|
|
4056
|
+
data: { publishSchedules: variantCultures.map((c) => ({ culture: c })) }
|
|
4057
|
+
});
|
|
4058
|
+
if (!publishResult.ok) return publishResult.errorResult;
|
|
4059
|
+
return createToolResult({
|
|
4060
|
+
message: `Published element "${elementName}"`,
|
|
4061
|
+
id,
|
|
4062
|
+
name: elementName
|
|
4063
|
+
});
|
|
4064
|
+
}
|
|
4065
|
+
};
|
|
4066
|
+
var publish_element_default = withStandardDecorators(tool53);
|
|
4067
|
+
var inputSchema54 = {
|
|
4068
|
+
id: z.string().uuid().describe("The ID of the element to unpublish")
|
|
4069
|
+
};
|
|
4070
|
+
var outputSchema54 = z.object({
|
|
4071
|
+
message: z.string(),
|
|
4072
|
+
id: z.string(),
|
|
4073
|
+
name: z.string()
|
|
4074
|
+
});
|
|
4075
|
+
var tool54 = {
|
|
4076
|
+
name: "unpublish-element",
|
|
4077
|
+
description: "Unpublish a Library element, taking it offline. The element still exists as a draft. You will be asked to confirm before unpublishing.",
|
|
4078
|
+
inputSchema: inputSchema54,
|
|
4079
|
+
outputSchema: outputSchema54,
|
|
4080
|
+
slices: ["publish"],
|
|
4081
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
4082
|
+
handler: async ({ id }, extra) => {
|
|
4083
|
+
const elResult = await chainCms("get-element-by-id", { id });
|
|
4084
|
+
if (!elResult.ok) return elResult.errorResult;
|
|
4085
|
+
const el = elResult.data;
|
|
4086
|
+
const elementName = el.variants?.[0]?.name ?? "Unknown";
|
|
4087
|
+
if (!await requestApproval(extra, `Unpublish element "${elementName}"? This will take it offline.`)) {
|
|
4088
|
+
return createToolResult({ message: "Unpublish cancelled", id, name: elementName });
|
|
4089
|
+
}
|
|
4090
|
+
const cultures = (el.variants ?? []).filter((v) => v.culture).map((v) => v.culture);
|
|
4091
|
+
const result = await chainCms("unpublish-element", {
|
|
4092
|
+
id,
|
|
4093
|
+
data: { cultures: cultures.length > 0 ? cultures : null }
|
|
4094
|
+
});
|
|
4095
|
+
if (!result.ok) return result.errorResult;
|
|
4096
|
+
return createToolResult({ message: `Unpublished element "${elementName}" \u2014 it is now a draft only`, id, name: elementName });
|
|
4097
|
+
}
|
|
4098
|
+
};
|
|
4099
|
+
var unpublish_element_default = withStandardDecorators(tool54);
|
|
4100
|
+
var inputSchema55 = {
|
|
4101
|
+
id: z.string().uuid().describe("The ID of the element to edit"),
|
|
4102
|
+
values: z.array(z.object({
|
|
4103
|
+
alias: z.string().describe("The property alias"),
|
|
4104
|
+
value: z.any().describe("The new property value"),
|
|
4105
|
+
culture: z.string().nullable().optional().describe("The culture code for variant content"),
|
|
4106
|
+
segment: z.string().nullable().optional().describe("The segment for segmented content")
|
|
4107
|
+
})).describe("Property values to update on the element")
|
|
4108
|
+
};
|
|
4109
|
+
var outputSchema55 = z.object({
|
|
4110
|
+
message: z.string(),
|
|
4111
|
+
id: z.string(),
|
|
4112
|
+
name: z.string(),
|
|
4113
|
+
updatedFields: z.array(z.string())
|
|
4114
|
+
});
|
|
4115
|
+
var tool55 = {
|
|
4116
|
+
name: "edit-element",
|
|
4117
|
+
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).",
|
|
4118
|
+
inputSchema: inputSchema55,
|
|
4119
|
+
outputSchema: outputSchema55,
|
|
4120
|
+
slices: ["update"],
|
|
4121
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
4122
|
+
handler: async ({ id, values }) => {
|
|
4123
|
+
const elResult = await chainCms("get-element-by-id", { id });
|
|
4124
|
+
if (!elResult.ok) return elResult.errorResult;
|
|
4125
|
+
const elementName = elResult.data.variants?.[0]?.name ?? "Unknown";
|
|
4126
|
+
const fieldNames = values.map((v) => v.alias);
|
|
4127
|
+
const properties = values.map((v) => ({
|
|
4128
|
+
alias: v.alias,
|
|
4129
|
+
value: v.value,
|
|
4130
|
+
culture: v.culture ?? null,
|
|
4131
|
+
segment: v.segment ?? null
|
|
4132
|
+
}));
|
|
4133
|
+
const updateResult = await chainCms("update-element-properties", { id, properties });
|
|
4134
|
+
if (!updateResult.ok) return updateResult.errorResult;
|
|
4135
|
+
return createToolResult({
|
|
4136
|
+
message: `Updated ${fieldNames.length} field(s) on element "${elementName}" (saved, not published)`,
|
|
4137
|
+
id,
|
|
4138
|
+
name: elementName,
|
|
4139
|
+
updatedFields: fieldNames
|
|
4140
|
+
});
|
|
4141
|
+
}
|
|
4142
|
+
};
|
|
4143
|
+
var edit_element_default = withStandardDecorators(tool55);
|
|
4144
|
+
var inputSchema56 = {
|
|
4145
|
+
id: z.string().uuid().describe("The ID of the Library element containing the block"),
|
|
4146
|
+
propertyAlias: z.string().describe("The element property alias containing the blocks (e.g. 'mainContent'). Use inspect-element-blocks to find this."),
|
|
4147
|
+
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'."),
|
|
4148
|
+
values: z.array(z.object({
|
|
4149
|
+
alias: z.string().describe("The property alias within the block"),
|
|
4150
|
+
value: z.any().describe("The new value for the property")
|
|
4151
|
+
})).min(1).describe("Properties to update within the block"),
|
|
4152
|
+
blockType: z.enum(["content", "settings"]).optional().describe("Whether to update the block's content or its settings. Defaults to 'content'."),
|
|
4153
|
+
culture: z.string().nullable().optional().describe("Culture code if the element property is variant"),
|
|
4154
|
+
segment: z.string().nullable().optional().describe("Segment if the element property is variant")
|
|
4155
|
+
};
|
|
4156
|
+
var outputSchema56 = z.object({
|
|
4157
|
+
message: z.string(),
|
|
4158
|
+
id: z.string(),
|
|
4159
|
+
name: z.string(),
|
|
4160
|
+
contentKey: z.string(),
|
|
4161
|
+
updatedFields: z.array(z.string()),
|
|
4162
|
+
warnings: z.array(z.string()).optional()
|
|
4163
|
+
});
|
|
4164
|
+
var tool56 = {
|
|
4165
|
+
name: "edit-element-block",
|
|
4166
|
+
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).",
|
|
4167
|
+
inputSchema: inputSchema56,
|
|
4168
|
+
outputSchema: outputSchema56,
|
|
4169
|
+
slices: ["update"],
|
|
4170
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
4171
|
+
handler: async ({ id, propertyAlias, contentKey, values, blockType, culture, segment }) => {
|
|
4172
|
+
const elResult = await chainCms("get-element-by-id", { id });
|
|
4173
|
+
if (!elResult.ok) return elResult.errorResult;
|
|
4174
|
+
const elementName = elResult.data.variants?.[0]?.name ?? "Unknown";
|
|
4175
|
+
const fieldNames = values.map((v) => v.alias);
|
|
4176
|
+
const resolvedBlockType = blockType ?? "content";
|
|
4177
|
+
let targetKey = contentKey;
|
|
4178
|
+
if (resolvedBlockType === "settings") {
|
|
4179
|
+
const rawValue = (elResult.data.values ?? []).find(
|
|
4180
|
+
(v) => v.alias === propertyAlias && (v.culture ?? null) === (culture ?? null) && (v.segment ?? null) === (segment ?? null)
|
|
4181
|
+
)?.value;
|
|
4182
|
+
const container = isRteWithBlocks(rawValue) ? rawValue.blocks : rawValue;
|
|
4183
|
+
const settingsKey = findSettingsKey(container, contentKey);
|
|
4184
|
+
if (!settingsKey) {
|
|
4185
|
+
return createToolResultError(
|
|
4186
|
+
`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.`
|
|
4187
|
+
);
|
|
4188
|
+
}
|
|
4189
|
+
targetKey = settingsKey;
|
|
4190
|
+
}
|
|
4191
|
+
const propsTuple = values.map((v) => ({ alias: v.alias, value: v.value }));
|
|
4192
|
+
const updateResult = await chainCms("update-element-block-property", {
|
|
4193
|
+
elementId: id,
|
|
4194
|
+
propertyAlias,
|
|
4195
|
+
culture: culture ?? null,
|
|
4196
|
+
segment: segment ?? null,
|
|
4197
|
+
updates: [{
|
|
4198
|
+
contentKey: targetKey,
|
|
4199
|
+
blockType: resolvedBlockType,
|
|
4200
|
+
properties: propsTuple
|
|
4201
|
+
}]
|
|
4202
|
+
});
|
|
4203
|
+
if (!updateResult.ok) return updateResult.errorResult;
|
|
4204
|
+
const failed = (updateResult.data.results ?? []).filter((r) => r.success === false);
|
|
4205
|
+
if (failed.length > 0) {
|
|
4206
|
+
const detail = failed.flatMap((r) => r.errors?.length ? r.errors : [r.message]).join("; ");
|
|
4207
|
+
return createToolResultError(
|
|
4208
|
+
`Block update failed: ${detail || updateResult.data.message || "no detail returned"}`
|
|
4209
|
+
);
|
|
4210
|
+
}
|
|
4211
|
+
const target = resolvedBlockType === "settings" ? "settings" : "content";
|
|
4212
|
+
const warnings = (updateResult.data.results ?? []).flatMap((r) => r.warnings ?? []);
|
|
4213
|
+
return createToolResult({
|
|
4214
|
+
message: `Updated ${fieldNames.length} field(s) in block ${target} on element "${elementName}" (saved, not published)`,
|
|
4215
|
+
id,
|
|
4216
|
+
name: elementName,
|
|
4217
|
+
contentKey,
|
|
4218
|
+
updatedFields: fieldNames,
|
|
4219
|
+
...warnings.length ? { warnings } : {}
|
|
4220
|
+
});
|
|
4221
|
+
}
|
|
4222
|
+
};
|
|
4223
|
+
var edit_element_block_default = withStandardDecorators(tool56);
|
|
4224
|
+
var inputSchema57 = {
|
|
4225
|
+
id: z.string().uuid().describe("The ID of the element to delete")
|
|
4226
|
+
};
|
|
4227
|
+
var outputSchema57 = z.object({
|
|
4228
|
+
message: z.string(),
|
|
4229
|
+
id: z.string(),
|
|
4230
|
+
name: z.string()
|
|
4231
|
+
});
|
|
4232
|
+
var tool57 = {
|
|
4233
|
+
name: "delete-element",
|
|
4234
|
+
description: "Move a Library element to the recycle bin. It can be restored later. You will be asked to confirm before deleting.",
|
|
4235
|
+
inputSchema: inputSchema57,
|
|
4236
|
+
outputSchema: outputSchema57,
|
|
4237
|
+
slices: ["delete"],
|
|
4238
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
4239
|
+
handler: async ({ id }, extra) => {
|
|
4240
|
+
const elResult = await chainCms("get-element-by-id", { id });
|
|
4241
|
+
if (!elResult.ok) return elResult.errorResult;
|
|
4242
|
+
const elementName = elResult.data.variants?.[0]?.name ?? "Unknown";
|
|
4243
|
+
if (!await requestApproval(extra, `WARNING: Move element "${elementName}" to the recycle bin? This will remove it from the Library.`)) {
|
|
4244
|
+
return createToolResult({ message: "Delete cancelled", id, name: elementName });
|
|
4245
|
+
}
|
|
4246
|
+
const deleteResult = await chainCms("move-element-to-recycle-bin", { id });
|
|
4247
|
+
if (!deleteResult.ok) return deleteResult.errorResult;
|
|
4248
|
+
return createToolResult({ message: `Moved element "${elementName}" to the recycle bin`, id, name: elementName });
|
|
4249
|
+
}
|
|
4250
|
+
};
|
|
4251
|
+
var delete_element_default = withStandardDecorators(tool57);
|
|
4252
|
+
|
|
4253
|
+
// src/umbraco-api/tools/element/index.ts
|
|
4254
|
+
var collection6 = {
|
|
4255
|
+
metadata: {
|
|
4256
|
+
name: "element",
|
|
4257
|
+
displayName: "Library Elements",
|
|
4258
|
+
description: "Browse, view, edit (including blocks), publish, and organise reusable Library elements (Umbraco 18 Library section)"
|
|
4259
|
+
},
|
|
4260
|
+
tools: () => [
|
|
4261
|
+
get_element_default,
|
|
4262
|
+
list_element_children_default,
|
|
4263
|
+
search_elements_default,
|
|
4264
|
+
inspect_element_blocks_default,
|
|
4265
|
+
create_element_default,
|
|
4266
|
+
create_and_publish_element_default,
|
|
4267
|
+
create_element_folder_default,
|
|
4268
|
+
edit_element_default,
|
|
4269
|
+
edit_element_block_default,
|
|
4270
|
+
publish_element_default,
|
|
4271
|
+
unpublish_element_default,
|
|
4272
|
+
delete_element_default
|
|
4273
|
+
]
|
|
4274
|
+
};
|
|
4275
|
+
var element_default = collection6;
|
|
4276
|
+
var inputSchema58 = {
|
|
4277
|
+
parentId: z.string().uuid().optional().describe("The ID of a blueprint folder to list children of. If omitted, lists root-level blueprints."),
|
|
4278
|
+
take: z.number().optional().default(50).describe("Number of results to return"),
|
|
4279
|
+
skip: z.number().optional().default(0).describe("Number of results to skip")
|
|
4280
|
+
};
|
|
4281
|
+
var outputSchema58 = z.object({
|
|
4282
|
+
items: z.array(z.object({
|
|
4283
|
+
id: z.string(),
|
|
4284
|
+
name: z.string(),
|
|
4285
|
+
documentType: z.string().optional().describe("The document type alias or name this blueprint is based on")
|
|
4286
|
+
})).describe("Available page blueprints"),
|
|
4287
|
+
total: z.number()
|
|
4288
|
+
});
|
|
4289
|
+
var tool58 = {
|
|
4290
|
+
name: "list-blueprints",
|
|
4291
|
+
description: "List available page blueprints (templates with pre-filled content). Use get-blueprint to view a blueprint's details and property values.",
|
|
4292
|
+
inputSchema: inputSchema58,
|
|
4293
|
+
outputSchema: outputSchema58,
|
|
4294
|
+
slices: ["list"],
|
|
4295
|
+
annotations: { readOnlyHint: true },
|
|
4296
|
+
handler: async ({ parentId, take, skip }) => {
|
|
4297
|
+
const cursor = buildChainedCursor(skip, take);
|
|
4298
|
+
const result = parentId ? await chainCms("get-document-blueprint-children", { parentId, cursor }) : await chainCms("get-document-blueprint-root", { cursor });
|
|
4299
|
+
if (!result.ok) return result.errorResult;
|
|
4300
|
+
return createToolResult({
|
|
4301
|
+
items: (result.data.items ?? []).map((item) => ({
|
|
4302
|
+
id: item.id,
|
|
4303
|
+
name: item.name ?? "Unknown",
|
|
4304
|
+
documentType: item.documentType?.id ?? void 0
|
|
4305
|
+
})),
|
|
4306
|
+
total: result.data.total ?? 0
|
|
4307
|
+
});
|
|
4308
|
+
}
|
|
4309
|
+
};
|
|
4310
|
+
var list_blueprints_default = withStandardDecorators(tool58);
|
|
4311
|
+
var inputSchema59 = {
|
|
4312
|
+
id: z.string().uuid().describe("The ID of the blueprint to retrieve")
|
|
4313
|
+
};
|
|
4314
|
+
var outputSchema59 = z.object({
|
|
4315
|
+
id: z.string(),
|
|
4316
|
+
name: z.string(),
|
|
3741
4317
|
documentType: z.object({
|
|
3742
4318
|
id: z.string().optional(),
|
|
3743
4319
|
alias: z.string().optional(),
|
|
@@ -3755,11 +4331,11 @@ var outputSchema47 = z.object({
|
|
|
3755
4331
|
segment: z.string().nullable().optional()
|
|
3756
4332
|
})).optional().describe("Variant information")
|
|
3757
4333
|
});
|
|
3758
|
-
var
|
|
4334
|
+
var tool59 = {
|
|
3759
4335
|
name: "get-blueprint",
|
|
3760
4336
|
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.",
|
|
3761
|
-
inputSchema:
|
|
3762
|
-
outputSchema:
|
|
4337
|
+
inputSchema: inputSchema59,
|
|
4338
|
+
outputSchema: outputSchema59,
|
|
3763
4339
|
slices: ["read"],
|
|
3764
4340
|
annotations: { readOnlyHint: true },
|
|
3765
4341
|
handler: async ({ id }) => {
|
|
@@ -3782,21 +4358,21 @@ var tool47 = {
|
|
|
3782
4358
|
});
|
|
3783
4359
|
}
|
|
3784
4360
|
};
|
|
3785
|
-
var get_blueprint_default = withStandardDecorators(
|
|
3786
|
-
var
|
|
4361
|
+
var get_blueprint_default = withStandardDecorators(tool59);
|
|
4362
|
+
var inputSchema60 = {
|
|
3787
4363
|
pageId: z.string().uuid().describe("The ID of the source page to save as a blueprint"),
|
|
3788
4364
|
name: z.string().describe("The name for the new blueprint")
|
|
3789
4365
|
};
|
|
3790
|
-
var
|
|
4366
|
+
var outputSchema60 = z.object({
|
|
3791
4367
|
message: z.string(),
|
|
3792
4368
|
id: z.string(),
|
|
3793
4369
|
name: z.string()
|
|
3794
4370
|
});
|
|
3795
|
-
var
|
|
4371
|
+
var tool60 = {
|
|
3796
4372
|
name: "create-blueprint",
|
|
3797
4373
|
description: "Save an existing page as a reusable blueprint (template). The blueprint preserves the page's document type and property values.",
|
|
3798
|
-
inputSchema:
|
|
3799
|
-
outputSchema:
|
|
4374
|
+
inputSchema: inputSchema60,
|
|
4375
|
+
outputSchema: outputSchema60,
|
|
3800
4376
|
slices: ["create"],
|
|
3801
4377
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
3802
4378
|
handler: async ({ pageId, name }) => {
|
|
@@ -3828,10 +4404,10 @@ var tool48 = {
|
|
|
3828
4404
|
});
|
|
3829
4405
|
}
|
|
3830
4406
|
};
|
|
3831
|
-
var create_blueprint_default = withStandardDecorators(
|
|
4407
|
+
var create_blueprint_default = withStandardDecorators(tool60);
|
|
3832
4408
|
|
|
3833
4409
|
// src/umbraco-api/tools/blueprint/index.ts
|
|
3834
|
-
var
|
|
4410
|
+
var collection7 = {
|
|
3835
4411
|
metadata: {
|
|
3836
4412
|
name: "blueprint",
|
|
3837
4413
|
displayName: "Blueprints",
|
|
@@ -3839,12 +4415,12 @@ var collection6 = {
|
|
|
3839
4415
|
},
|
|
3840
4416
|
tools: () => [list_blueprints_default, get_blueprint_default, create_blueprint_default]
|
|
3841
4417
|
};
|
|
3842
|
-
var blueprint_default =
|
|
3843
|
-
var
|
|
4418
|
+
var blueprint_default = collection7;
|
|
4419
|
+
var inputSchema61 = {
|
|
3844
4420
|
take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
|
|
3845
4421
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
3846
4422
|
};
|
|
3847
|
-
var
|
|
4423
|
+
var outputSchema61 = z.object({
|
|
3848
4424
|
items: z.array(z.object({
|
|
3849
4425
|
isoCode: z.string().describe("ISO language code (e.g. en-US)"),
|
|
3850
4426
|
name: z.string().describe("Display name of the language"),
|
|
@@ -3853,11 +4429,11 @@ var outputSchema49 = z.object({
|
|
|
3853
4429
|
})).describe("List of configured languages"),
|
|
3854
4430
|
total: z.number().describe("Total number of languages")
|
|
3855
4431
|
});
|
|
3856
|
-
var
|
|
4432
|
+
var tool61 = {
|
|
3857
4433
|
name: "list-languages",
|
|
3858
4434
|
description: "List all languages configured on the Umbraco site. Shows the ISO code, name, and whether each language is the default or mandatory.",
|
|
3859
|
-
inputSchema:
|
|
3860
|
-
outputSchema:
|
|
4435
|
+
inputSchema: inputSchema61,
|
|
4436
|
+
outputSchema: outputSchema61,
|
|
3861
4437
|
slices: ["list"],
|
|
3862
4438
|
annotations: { readOnlyHint: true },
|
|
3863
4439
|
handler: async ({ take, skip }) => {
|
|
@@ -3875,22 +4451,22 @@ var tool49 = {
|
|
|
3875
4451
|
});
|
|
3876
4452
|
}
|
|
3877
4453
|
};
|
|
3878
|
-
var list_languages_default = withStandardDecorators(
|
|
3879
|
-
var
|
|
4454
|
+
var list_languages_default = withStandardDecorators(tool61);
|
|
4455
|
+
var inputSchema62 = {
|
|
3880
4456
|
isoCode: z.string().describe("ISO language code (e.g. en-US)")
|
|
3881
4457
|
};
|
|
3882
|
-
var
|
|
4458
|
+
var outputSchema62 = z.object({
|
|
3883
4459
|
isoCode: z.string().describe("ISO language code"),
|
|
3884
4460
|
name: z.string().describe("Display name of the language"),
|
|
3885
4461
|
isDefault: z.boolean().describe("Whether this is the default language"),
|
|
3886
4462
|
isMandatory: z.boolean().describe("Whether this language is mandatory"),
|
|
3887
4463
|
fallbackIsoCode: z.string().nullable().describe("ISO code of the fallback language, if set")
|
|
3888
4464
|
});
|
|
3889
|
-
var
|
|
4465
|
+
var tool62 = {
|
|
3890
4466
|
name: "get-language",
|
|
3891
4467
|
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.",
|
|
3892
|
-
inputSchema:
|
|
3893
|
-
outputSchema:
|
|
4468
|
+
inputSchema: inputSchema62,
|
|
4469
|
+
outputSchema: outputSchema62,
|
|
3894
4470
|
slices: ["read"],
|
|
3895
4471
|
annotations: { readOnlyHint: true },
|
|
3896
4472
|
handler: async ({ isoCode }) => {
|
|
@@ -3906,24 +4482,24 @@ var tool50 = {
|
|
|
3906
4482
|
});
|
|
3907
4483
|
}
|
|
3908
4484
|
};
|
|
3909
|
-
var get_language_default = withStandardDecorators(
|
|
3910
|
-
var
|
|
4485
|
+
var get_language_default = withStandardDecorators(tool62);
|
|
4486
|
+
var inputSchema63 = {
|
|
3911
4487
|
isoCode: z.string().describe("ISO language code to add (e.g. fr-FR)"),
|
|
3912
4488
|
name: z.string().optional().describe("Display name for the language (e.g. 'French'). Defaults to the ISO code if not provided."),
|
|
3913
4489
|
isDefault: z.boolean().optional().describe("Whether this language should be the default"),
|
|
3914
4490
|
isMandatory: z.boolean().optional().describe("Whether this language should be mandatory"),
|
|
3915
4491
|
fallbackIsoCode: z.string().optional().describe("ISO code of the fallback language")
|
|
3916
4492
|
};
|
|
3917
|
-
var
|
|
4493
|
+
var outputSchema63 = z.object({
|
|
3918
4494
|
message: z.string(),
|
|
3919
4495
|
isoCode: z.string(),
|
|
3920
4496
|
name: z.string()
|
|
3921
4497
|
});
|
|
3922
|
-
var
|
|
4498
|
+
var tool63 = {
|
|
3923
4499
|
name: "create-language",
|
|
3924
4500
|
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.",
|
|
3925
|
-
inputSchema:
|
|
3926
|
-
outputSchema:
|
|
4501
|
+
inputSchema: inputSchema63,
|
|
4502
|
+
outputSchema: outputSchema63,
|
|
3927
4503
|
slices: ["create"],
|
|
3928
4504
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
3929
4505
|
handler: async ({ isoCode, name: displayName, isDefault, isMandatory, fallbackIsoCode }) => {
|
|
@@ -3943,23 +4519,23 @@ var tool51 = {
|
|
|
3943
4519
|
});
|
|
3944
4520
|
}
|
|
3945
4521
|
};
|
|
3946
|
-
var create_language_default = withStandardDecorators(
|
|
3947
|
-
var
|
|
4522
|
+
var create_language_default = withStandardDecorators(tool63);
|
|
4523
|
+
var inputSchema64 = {
|
|
3948
4524
|
isoCode: z.string().describe("ISO language code of the language to update (e.g. en-US)"),
|
|
3949
4525
|
isDefault: z.boolean().optional().describe("Whether this language should be the default"),
|
|
3950
4526
|
isMandatory: z.boolean().optional().describe("Whether this language should be mandatory"),
|
|
3951
4527
|
fallbackIsoCode: z.string().optional().describe("ISO code of the fallback language")
|
|
3952
4528
|
};
|
|
3953
|
-
var
|
|
4529
|
+
var outputSchema64 = z.object({
|
|
3954
4530
|
message: z.string(),
|
|
3955
4531
|
isoCode: z.string(),
|
|
3956
4532
|
name: z.string()
|
|
3957
4533
|
});
|
|
3958
|
-
var
|
|
4534
|
+
var tool64 = {
|
|
3959
4535
|
name: "update-language",
|
|
3960
4536
|
description: "Update a language's settings (default, mandatory, fallback).",
|
|
3961
|
-
inputSchema:
|
|
3962
|
-
outputSchema:
|
|
4537
|
+
inputSchema: inputSchema64,
|
|
4538
|
+
outputSchema: outputSchema64,
|
|
3963
4539
|
slices: ["update"],
|
|
3964
4540
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
3965
4541
|
handler: async ({ isoCode, isDefault, isMandatory, fallbackIsoCode }) => {
|
|
@@ -3984,20 +4560,20 @@ var tool52 = {
|
|
|
3984
4560
|
});
|
|
3985
4561
|
}
|
|
3986
4562
|
};
|
|
3987
|
-
var update_language_default = withStandardDecorators(
|
|
3988
|
-
var
|
|
4563
|
+
var update_language_default = withStandardDecorators(tool64);
|
|
4564
|
+
var inputSchema65 = {
|
|
3989
4565
|
isoCode: z.string().describe("ISO language code of the language to delete (e.g. fr-FR)")
|
|
3990
4566
|
};
|
|
3991
|
-
var
|
|
4567
|
+
var outputSchema65 = z.object({
|
|
3992
4568
|
message: z.string(),
|
|
3993
4569
|
isoCode: z.string(),
|
|
3994
4570
|
name: z.string()
|
|
3995
4571
|
});
|
|
3996
|
-
var
|
|
4572
|
+
var tool65 = {
|
|
3997
4573
|
name: "delete-language",
|
|
3998
4574
|
description: "Remove a language from the site. Content variants in this language will become inaccessible. You will be asked to confirm before deleting.",
|
|
3999
|
-
inputSchema:
|
|
4000
|
-
outputSchema:
|
|
4575
|
+
inputSchema: inputSchema65,
|
|
4576
|
+
outputSchema: outputSchema65,
|
|
4001
4577
|
slices: ["delete"],
|
|
4002
4578
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
4003
4579
|
handler: async ({ isoCode }, extra) => {
|
|
@@ -4018,10 +4594,10 @@ var tool53 = {
|
|
|
4018
4594
|
});
|
|
4019
4595
|
}
|
|
4020
4596
|
};
|
|
4021
|
-
var delete_language_default = withStandardDecorators(
|
|
4597
|
+
var delete_language_default = withStandardDecorators(tool65);
|
|
4022
4598
|
|
|
4023
4599
|
// src/umbraco-api/tools/language/index.ts
|
|
4024
|
-
var
|
|
4600
|
+
var collection8 = {
|
|
4025
4601
|
metadata: {
|
|
4026
4602
|
name: "language",
|
|
4027
4603
|
displayName: "Languages",
|
|
@@ -4029,7 +4605,7 @@ var collection7 = {
|
|
|
4029
4605
|
},
|
|
4030
4606
|
tools: () => [list_languages_default, get_language_default, create_language_default, update_language_default, delete_language_default]
|
|
4031
4607
|
};
|
|
4032
|
-
var language_default =
|
|
4608
|
+
var language_default = collection8;
|
|
4033
4609
|
async function checkVariesByCulture(documentId) {
|
|
4034
4610
|
const docResult = await chainCms("get-document-by-id", { id: documentId });
|
|
4035
4611
|
if (!docResult.ok) return docResult.errorResult;
|
|
@@ -4049,7 +4625,7 @@ async function checkVariesByCulture(documentId) {
|
|
|
4049
4625
|
}
|
|
4050
4626
|
|
|
4051
4627
|
// src/umbraco-api/tools/translation/post/create-variant.ts
|
|
4052
|
-
var
|
|
4628
|
+
var inputSchema66 = {
|
|
4053
4629
|
id: z.string().uuid().describe("The ID of the page to add a language variant to"),
|
|
4054
4630
|
culture: z.string().describe("The target language ISO code (e.g. 'da-DK', 'fr-FR'). Call list-languages to find available cultures."),
|
|
4055
4631
|
values: z.array(z.object({
|
|
@@ -4059,7 +4635,7 @@ var inputSchema54 = {
|
|
|
4059
4635
|
segment: z.string().nullable().optional().describe("The segment for segmented content")
|
|
4060
4636
|
})).optional().describe("Optional property values to set on the new variant")
|
|
4061
4637
|
};
|
|
4062
|
-
var
|
|
4638
|
+
var outputSchema66 = z.object({
|
|
4063
4639
|
message: z.string(),
|
|
4064
4640
|
id: z.string(),
|
|
4065
4641
|
name: z.string(),
|
|
@@ -4067,11 +4643,11 @@ var outputSchema54 = z.object({
|
|
|
4067
4643
|
previewUrl: previewUrlSchema,
|
|
4068
4644
|
validation: validationResultSchema
|
|
4069
4645
|
});
|
|
4070
|
-
var
|
|
4646
|
+
var tool66 = {
|
|
4071
4647
|
name: "create-variant",
|
|
4072
4648
|
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.",
|
|
4073
|
-
inputSchema:
|
|
4074
|
-
outputSchema:
|
|
4649
|
+
inputSchema: inputSchema66,
|
|
4650
|
+
outputSchema: outputSchema66,
|
|
4075
4651
|
slices: ["create"],
|
|
4076
4652
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
4077
4653
|
handler: async ({ id, culture, values }) => {
|
|
@@ -4115,13 +4691,13 @@ var tool54 = {
|
|
|
4115
4691
|
});
|
|
4116
4692
|
}
|
|
4117
4693
|
};
|
|
4118
|
-
var create_variant_default = withStandardDecorators(
|
|
4119
|
-
var
|
|
4694
|
+
var create_variant_default = withStandardDecorators(tool66);
|
|
4695
|
+
var inputSchema67 = {
|
|
4120
4696
|
id: z.string().uuid().describe("The ID of the page to copy a variant on"),
|
|
4121
4697
|
sourceCulture: z.string().describe("The source language ISO code to copy content from (e.g. 'en-US')"),
|
|
4122
4698
|
targetCulture: z.string().describe("The target language ISO code to copy content to (e.g. 'da-DK')")
|
|
4123
4699
|
};
|
|
4124
|
-
var
|
|
4700
|
+
var outputSchema67 = z.object({
|
|
4125
4701
|
message: z.string(),
|
|
4126
4702
|
id: z.string(),
|
|
4127
4703
|
name: z.string(),
|
|
@@ -4131,11 +4707,11 @@ var outputSchema55 = z.object({
|
|
|
4131
4707
|
previewUrl: previewUrlSchema,
|
|
4132
4708
|
validation: validationResultSchema
|
|
4133
4709
|
});
|
|
4134
|
-
var
|
|
4710
|
+
var tool67 = {
|
|
4135
4711
|
name: "copy-variant",
|
|
4136
4712
|
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.",
|
|
4137
|
-
inputSchema:
|
|
4138
|
-
outputSchema:
|
|
4713
|
+
inputSchema: inputSchema67,
|
|
4714
|
+
outputSchema: outputSchema67,
|
|
4139
4715
|
slices: ["create"],
|
|
4140
4716
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
4141
4717
|
handler: async ({ id, sourceCulture, targetCulture }, extra) => {
|
|
@@ -4189,14 +4765,14 @@ var tool55 = {
|
|
|
4189
4765
|
});
|
|
4190
4766
|
}
|
|
4191
4767
|
};
|
|
4192
|
-
var copy_variant_default = withStandardDecorators(
|
|
4193
|
-
var
|
|
4768
|
+
var copy_variant_default = withStandardDecorators(tool67);
|
|
4769
|
+
var inputSchema68 = {
|
|
4194
4770
|
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."),
|
|
4195
4771
|
parentId: z.string().uuid().optional().describe("Parent page ID to search under. Omit to search root-level pages."),
|
|
4196
4772
|
take: z.number().optional().default(20).describe("Number of results to return"),
|
|
4197
4773
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
4198
4774
|
};
|
|
4199
|
-
var
|
|
4775
|
+
var outputSchema68 = z.object({
|
|
4200
4776
|
items: z.array(z.object({
|
|
4201
4777
|
id: z.string(),
|
|
4202
4778
|
name: z.string(),
|
|
@@ -4204,11 +4780,11 @@ var outputSchema56 = z.object({
|
|
|
4204
4780
|
})).describe("Pages that are missing the specified language variant"),
|
|
4205
4781
|
total: z.number().describe("Total number of pages missing the variant (before pagination)")
|
|
4206
4782
|
});
|
|
4207
|
-
var
|
|
4783
|
+
var tool68 = {
|
|
4208
4784
|
name: "list-untranslated",
|
|
4209
4785
|
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.",
|
|
4210
|
-
inputSchema:
|
|
4211
|
-
outputSchema:
|
|
4786
|
+
inputSchema: inputSchema68,
|
|
4787
|
+
outputSchema: outputSchema68,
|
|
4212
4788
|
slices: ["search"],
|
|
4213
4789
|
annotations: { readOnlyHint: true },
|
|
4214
4790
|
handler: async ({ culture, parentId, take, skip }) => {
|
|
@@ -4241,10 +4817,10 @@ var tool56 = {
|
|
|
4241
4817
|
return createToolResult({ items: paged, total });
|
|
4242
4818
|
}
|
|
4243
4819
|
};
|
|
4244
|
-
var list_untranslated_default = withStandardDecorators(
|
|
4820
|
+
var list_untranslated_default = withStandardDecorators(tool68);
|
|
4245
4821
|
|
|
4246
4822
|
// src/umbraco-api/tools/translation/index.ts
|
|
4247
|
-
var
|
|
4823
|
+
var collection9 = {
|
|
4248
4824
|
metadata: {
|
|
4249
4825
|
name: "translation",
|
|
4250
4826
|
displayName: "Translation",
|
|
@@ -4252,13 +4828,13 @@ var collection8 = {
|
|
|
4252
4828
|
},
|
|
4253
4829
|
tools: () => [create_variant_default, copy_variant_default, list_untranslated_default]
|
|
4254
4830
|
};
|
|
4255
|
-
var translation_default =
|
|
4256
|
-
var
|
|
4831
|
+
var translation_default = collection9;
|
|
4832
|
+
var inputSchema69 = {
|
|
4257
4833
|
parentId: z.string().uuid().optional().describe("UUID of the parent dictionary item, or omit to list root-level entries"),
|
|
4258
4834
|
take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
|
|
4259
4835
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
4260
4836
|
};
|
|
4261
|
-
var
|
|
4837
|
+
var outputSchema69 = z.object({
|
|
4262
4838
|
items: z.array(
|
|
4263
4839
|
z.object({
|
|
4264
4840
|
id: z.string(),
|
|
@@ -4268,11 +4844,11 @@ var outputSchema57 = z.object({
|
|
|
4268
4844
|
).describe("Dictionary items"),
|
|
4269
4845
|
total: z.number().describe("Total number of items")
|
|
4270
4846
|
});
|
|
4271
|
-
var
|
|
4847
|
+
var tool69 = {
|
|
4272
4848
|
name: "list-dictionary",
|
|
4273
4849
|
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.",
|
|
4274
|
-
inputSchema:
|
|
4275
|
-
outputSchema:
|
|
4850
|
+
inputSchema: inputSchema69,
|
|
4851
|
+
outputSchema: outputSchema69,
|
|
4276
4852
|
slices: ["list", "tree"],
|
|
4277
4853
|
annotations: { readOnlyHint: true },
|
|
4278
4854
|
handler: async ({ parentId, take, skip }) => {
|
|
@@ -4298,11 +4874,11 @@ var tool57 = {
|
|
|
4298
4874
|
});
|
|
4299
4875
|
}
|
|
4300
4876
|
};
|
|
4301
|
-
var list_dictionary_default = withStandardDecorators(
|
|
4302
|
-
var
|
|
4877
|
+
var list_dictionary_default = withStandardDecorators(tool69);
|
|
4878
|
+
var inputSchema70 = {
|
|
4303
4879
|
query: z.string().describe("Search term to match against dictionary item key names")
|
|
4304
4880
|
};
|
|
4305
|
-
var
|
|
4881
|
+
var outputSchema70 = z.object({
|
|
4306
4882
|
items: z.array(
|
|
4307
4883
|
z.object({
|
|
4308
4884
|
id: z.string(),
|
|
@@ -4311,11 +4887,11 @@ var outputSchema58 = z.object({
|
|
|
4311
4887
|
).describe("Matching dictionary items"),
|
|
4312
4888
|
total: z.number().describe("Total number of matching items")
|
|
4313
4889
|
});
|
|
4314
|
-
var
|
|
4890
|
+
var tool70 = {
|
|
4315
4891
|
name: "search-dictionary",
|
|
4316
4892
|
description: "Search for dictionary items by key name. Use get-dictionary to see all translations for a specific item.",
|
|
4317
|
-
inputSchema:
|
|
4318
|
-
outputSchema:
|
|
4893
|
+
inputSchema: inputSchema70,
|
|
4894
|
+
outputSchema: outputSchema70,
|
|
4319
4895
|
slices: ["search"],
|
|
4320
4896
|
annotations: { readOnlyHint: true },
|
|
4321
4897
|
handler: async ({ query }) => {
|
|
@@ -4330,11 +4906,11 @@ var tool58 = {
|
|
|
4330
4906
|
});
|
|
4331
4907
|
}
|
|
4332
4908
|
};
|
|
4333
|
-
var search_dictionary_default = withStandardDecorators(
|
|
4334
|
-
var
|
|
4909
|
+
var search_dictionary_default = withStandardDecorators(tool70);
|
|
4910
|
+
var inputSchema71 = {
|
|
4335
4911
|
id: z.string().uuid().describe("UUID of the dictionary item to retrieve")
|
|
4336
4912
|
};
|
|
4337
|
-
var
|
|
4913
|
+
var outputSchema71 = z.object({
|
|
4338
4914
|
id: z.string(),
|
|
4339
4915
|
name: z.string(),
|
|
4340
4916
|
translations: z.array(
|
|
@@ -4345,11 +4921,11 @@ var outputSchema59 = z.object({
|
|
|
4345
4921
|
})
|
|
4346
4922
|
).describe("All translations for this dictionary item")
|
|
4347
4923
|
});
|
|
4348
|
-
var
|
|
4924
|
+
var tool71 = {
|
|
4349
4925
|
name: "get-dictionary",
|
|
4350
4926
|
description: "Get a dictionary item with all its translations across languages. Shows the key name and each language's translation value.",
|
|
4351
|
-
inputSchema:
|
|
4352
|
-
outputSchema:
|
|
4927
|
+
inputSchema: inputSchema71,
|
|
4928
|
+
outputSchema: outputSchema71,
|
|
4353
4929
|
slices: ["read"],
|
|
4354
4930
|
annotations: { readOnlyHint: true },
|
|
4355
4931
|
handler: async ({ id }) => {
|
|
@@ -4371,8 +4947,8 @@ var tool59 = {
|
|
|
4371
4947
|
});
|
|
4372
4948
|
}
|
|
4373
4949
|
};
|
|
4374
|
-
var get_dictionary_default = withStandardDecorators(
|
|
4375
|
-
var
|
|
4950
|
+
var get_dictionary_default = withStandardDecorators(tool71);
|
|
4951
|
+
var inputSchema72 = {
|
|
4376
4952
|
name: z.string().describe("The dictionary key name"),
|
|
4377
4953
|
translations: z.array(
|
|
4378
4954
|
z.object({
|
|
@@ -4382,16 +4958,16 @@ var inputSchema60 = {
|
|
|
4382
4958
|
).describe("Translations to set for this dictionary item"),
|
|
4383
4959
|
parentId: z.string().uuid().optional().describe("UUID of the parent dictionary item, or omit to create at the root")
|
|
4384
4960
|
};
|
|
4385
|
-
var
|
|
4961
|
+
var outputSchema72 = z.object({
|
|
4386
4962
|
message: z.string(),
|
|
4387
4963
|
id: z.string(),
|
|
4388
4964
|
name: z.string()
|
|
4389
4965
|
});
|
|
4390
|
-
var
|
|
4966
|
+
var tool72 = {
|
|
4391
4967
|
name: "create-dictionary",
|
|
4392
4968
|
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.",
|
|
4393
|
-
inputSchema:
|
|
4394
|
-
outputSchema:
|
|
4969
|
+
inputSchema: inputSchema72,
|
|
4970
|
+
outputSchema: outputSchema72,
|
|
4395
4971
|
slices: ["create"],
|
|
4396
4972
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
4397
4973
|
handler: async ({ name, translations, parentId }) => {
|
|
@@ -4408,8 +4984,8 @@ var tool60 = {
|
|
|
4408
4984
|
});
|
|
4409
4985
|
}
|
|
4410
4986
|
};
|
|
4411
|
-
var create_dictionary_default = withStandardDecorators(
|
|
4412
|
-
var
|
|
4987
|
+
var create_dictionary_default = withStandardDecorators(tool72);
|
|
4988
|
+
var inputSchema73 = {
|
|
4413
4989
|
id: z.string().uuid().describe("UUID of the dictionary item to update"),
|
|
4414
4990
|
translations: z.array(
|
|
4415
4991
|
z.object({
|
|
@@ -4418,17 +4994,17 @@ var inputSchema61 = {
|
|
|
4418
4994
|
})
|
|
4419
4995
|
).describe("Translations to update. Languages not listed here will keep their existing translations.")
|
|
4420
4996
|
};
|
|
4421
|
-
var
|
|
4997
|
+
var outputSchema73 = z.object({
|
|
4422
4998
|
message: z.string(),
|
|
4423
4999
|
id: z.string(),
|
|
4424
5000
|
name: z.string(),
|
|
4425
5001
|
updatedLanguages: z.array(z.string()).describe("ISO codes of languages that were updated")
|
|
4426
5002
|
});
|
|
4427
|
-
var
|
|
5003
|
+
var tool73 = {
|
|
4428
5004
|
name: "update-dictionary",
|
|
4429
5005
|
description: "Update translations for a dictionary item. Call get-dictionary first to see existing translations.",
|
|
4430
|
-
inputSchema:
|
|
4431
|
-
outputSchema:
|
|
5006
|
+
inputSchema: inputSchema73,
|
|
5007
|
+
outputSchema: outputSchema73,
|
|
4432
5008
|
slices: ["update"],
|
|
4433
5009
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
4434
5010
|
handler: async ({ id, translations }) => {
|
|
@@ -4460,21 +5036,21 @@ var tool61 = {
|
|
|
4460
5036
|
});
|
|
4461
5037
|
}
|
|
4462
5038
|
};
|
|
4463
|
-
var update_dictionary_default = withStandardDecorators(
|
|
4464
|
-
var
|
|
5039
|
+
var update_dictionary_default = withStandardDecorators(tool73);
|
|
5040
|
+
var inputSchema74 = {
|
|
4465
5041
|
id: z.string().uuid().describe("UUID of the dictionary item to move"),
|
|
4466
5042
|
targetParentId: z.string().uuid().optional().describe("UUID of the destination parent dictionary item, or omit to move to the root")
|
|
4467
5043
|
};
|
|
4468
|
-
var
|
|
5044
|
+
var outputSchema74 = z.object({
|
|
4469
5045
|
message: z.string(),
|
|
4470
5046
|
id: z.string(),
|
|
4471
5047
|
name: z.string()
|
|
4472
5048
|
});
|
|
4473
|
-
var
|
|
5049
|
+
var tool74 = {
|
|
4474
5050
|
name: "move-dictionary",
|
|
4475
5051
|
description: "Move a dictionary item to a different parent in the dictionary tree, or to the root. You will be asked to confirm.",
|
|
4476
|
-
inputSchema:
|
|
4477
|
-
outputSchema:
|
|
5052
|
+
inputSchema: inputSchema74,
|
|
5053
|
+
outputSchema: outputSchema74,
|
|
4478
5054
|
slices: ["move"],
|
|
4479
5055
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
4480
5056
|
handler: async ({ id, targetParentId }, extra) => {
|
|
@@ -4505,10 +5081,10 @@ var tool62 = {
|
|
|
4505
5081
|
});
|
|
4506
5082
|
}
|
|
4507
5083
|
};
|
|
4508
|
-
var move_dictionary_default = withStandardDecorators(
|
|
5084
|
+
var move_dictionary_default = withStandardDecorators(tool74);
|
|
4509
5085
|
|
|
4510
5086
|
// src/umbraco-api/tools/dictionary/index.ts
|
|
4511
|
-
var
|
|
5087
|
+
var collection10 = {
|
|
4512
5088
|
metadata: {
|
|
4513
5089
|
name: "dictionary",
|
|
4514
5090
|
displayName: "Dictionary",
|
|
@@ -4516,13 +5092,13 @@ var collection9 = {
|
|
|
4516
5092
|
},
|
|
4517
5093
|
tools: () => [list_dictionary_default, search_dictionary_default, get_dictionary_default, create_dictionary_default, update_dictionary_default, move_dictionary_default]
|
|
4518
5094
|
};
|
|
4519
|
-
var dictionary_default =
|
|
4520
|
-
var
|
|
5095
|
+
var dictionary_default = collection10;
|
|
5096
|
+
var inputSchema75 = {
|
|
4521
5097
|
tagGroup: z.string().optional().describe("Filter tags by group name, or omit to list all tags"),
|
|
4522
5098
|
take: z.number().optional().default(50).describe("Number of tags to return"),
|
|
4523
5099
|
skip: z.number().optional().default(0).describe("Number of tags to skip for pagination")
|
|
4524
5100
|
};
|
|
4525
|
-
var
|
|
5101
|
+
var outputSchema75 = z.object({
|
|
4526
5102
|
items: z.array(
|
|
4527
5103
|
z.object({
|
|
4528
5104
|
id: z.number(),
|
|
@@ -4533,11 +5109,11 @@ var outputSchema63 = z.object({
|
|
|
4533
5109
|
).describe("Tags in use across the site"),
|
|
4534
5110
|
total: z.number().describe("Total number of tags")
|
|
4535
5111
|
});
|
|
4536
|
-
var
|
|
5112
|
+
var tool75 = {
|
|
4537
5113
|
name: "list-tags",
|
|
4538
5114
|
description: "List tags in use across the site. Optionally filter by tag group. Shows how many content items use each tag.",
|
|
4539
|
-
inputSchema:
|
|
4540
|
-
outputSchema:
|
|
5115
|
+
inputSchema: inputSchema75,
|
|
5116
|
+
outputSchema: outputSchema75,
|
|
4541
5117
|
slices: ["list"],
|
|
4542
5118
|
annotations: { readOnlyHint: true },
|
|
4543
5119
|
handler: async ({ tagGroup, take, skip }) => {
|
|
@@ -4554,10 +5130,10 @@ var tool63 = {
|
|
|
4554
5130
|
});
|
|
4555
5131
|
}
|
|
4556
5132
|
};
|
|
4557
|
-
var list_tags_default = withStandardDecorators(
|
|
5133
|
+
var list_tags_default = withStandardDecorators(tool75);
|
|
4558
5134
|
|
|
4559
5135
|
// src/umbraco-api/tools/tag/index.ts
|
|
4560
|
-
var
|
|
5136
|
+
var collection11 = {
|
|
4561
5137
|
metadata: {
|
|
4562
5138
|
name: "tag",
|
|
4563
5139
|
displayName: "Tags",
|
|
@@ -4565,13 +5141,13 @@ var collection10 = {
|
|
|
4565
5141
|
},
|
|
4566
5142
|
tools: () => [list_tags_default]
|
|
4567
5143
|
};
|
|
4568
|
-
var tag_default =
|
|
5144
|
+
var tag_default = collection11;
|
|
4569
5145
|
var TITLE_ALIASES = ["pageTitle", "title", "metaTitle", "seoTitle"];
|
|
4570
5146
|
var META_DESC_ALIASES = ["metaDescription", "seoMetaDescription", "description"];
|
|
4571
|
-
var
|
|
5147
|
+
var inputSchema76 = {
|
|
4572
5148
|
id: z.string().uuid().describe("The ID of the content page to audit")
|
|
4573
5149
|
};
|
|
4574
|
-
var
|
|
5150
|
+
var outputSchema76 = z.object({
|
|
4575
5151
|
id: z.string().describe("Page ID"),
|
|
4576
5152
|
name: z.string().describe("Page name"),
|
|
4577
5153
|
url: z.string().describe("Page URL"),
|
|
@@ -4588,11 +5164,11 @@ var outputSchema64 = z.object({
|
|
|
4588
5164
|
headings: z.array(z.object({ level: z.number(), text: z.string() })).describe("Headings found in body content"),
|
|
4589
5165
|
images: z.array(z.object({ src: z.string(), alt: z.string(), hasAlt: z.boolean() })).describe("Images found in body content with alt text status")
|
|
4590
5166
|
});
|
|
4591
|
-
var
|
|
5167
|
+
var tool76 = {
|
|
4592
5168
|
name: "audit-page-seo",
|
|
4593
5169
|
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.",
|
|
4594
|
-
inputSchema:
|
|
4595
|
-
outputSchema:
|
|
5170
|
+
inputSchema: inputSchema76,
|
|
5171
|
+
outputSchema: outputSchema76,
|
|
4596
5172
|
slices: ["read"],
|
|
4597
5173
|
annotations: { readOnlyHint: true },
|
|
4598
5174
|
handler: async ({ id }) => {
|
|
@@ -4636,13 +5212,13 @@ var tool64 = {
|
|
|
4636
5212
|
});
|
|
4637
5213
|
}
|
|
4638
5214
|
};
|
|
4639
|
-
var audit_page_seo_default = withStandardDecorators(
|
|
5215
|
+
var audit_page_seo_default = withStandardDecorators(tool76);
|
|
4640
5216
|
var META_DESC_ALIASES2 = ["metaDescription", "seoMetaDescription", "description"];
|
|
4641
5217
|
var BODY_CONTENT_MAX = 2e3;
|
|
4642
|
-
var
|
|
5218
|
+
var inputSchema77 = {
|
|
4643
5219
|
id: z.string().uuid().describe("The ID of the content page to audit")
|
|
4644
5220
|
};
|
|
4645
|
-
var
|
|
5221
|
+
var outputSchema77 = z.object({
|
|
4646
5222
|
id: z.string().describe("Page ID"),
|
|
4647
5223
|
name: z.string().describe("Page name"),
|
|
4648
5224
|
url: z.string().describe("Page URL"),
|
|
@@ -4653,11 +5229,11 @@ var outputSchema65 = z.object({
|
|
|
4653
5229
|
documentType: z.string().describe("The document type name"),
|
|
4654
5230
|
lastModified: z.string().describe("ISO date string of last modification")
|
|
4655
5231
|
});
|
|
4656
|
-
var
|
|
5232
|
+
var tool77 = {
|
|
4657
5233
|
name: "audit-page-content",
|
|
4658
5234
|
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.",
|
|
4659
|
-
inputSchema:
|
|
4660
|
-
outputSchema:
|
|
5235
|
+
inputSchema: inputSchema77,
|
|
5236
|
+
outputSchema: outputSchema77,
|
|
4661
5237
|
slices: ["read"],
|
|
4662
5238
|
annotations: { readOnlyHint: true },
|
|
4663
5239
|
handler: async ({ id }) => {
|
|
@@ -4694,10 +5270,10 @@ var tool65 = {
|
|
|
4694
5270
|
});
|
|
4695
5271
|
}
|
|
4696
5272
|
};
|
|
4697
|
-
var audit_page_content_default = withStandardDecorators(
|
|
5273
|
+
var audit_page_content_default = withStandardDecorators(tool77);
|
|
4698
5274
|
|
|
4699
5275
|
// src/umbraco-api/tools/content-health/index.ts
|
|
4700
|
-
var
|
|
5276
|
+
var collection12 = {
|
|
4701
5277
|
metadata: {
|
|
4702
5278
|
name: "content-health",
|
|
4703
5279
|
displayName: "Content Health",
|
|
@@ -4705,8 +5281,8 @@ var collection11 = {
|
|
|
4705
5281
|
},
|
|
4706
5282
|
tools: () => [audit_page_seo_default, audit_page_content_default]
|
|
4707
5283
|
};
|
|
4708
|
-
var content_health_default =
|
|
4709
|
-
var
|
|
5284
|
+
var content_health_default = collection12;
|
|
5285
|
+
var inputSchema78 = {
|
|
4710
5286
|
parentId: z.string().uuid().optional().describe("Scope to a subtree by parent page ID. Omit to start from root."),
|
|
4711
5287
|
maxDepth: z.number().optional().default(5).describe("How many levels deep to scan (default 5)")
|
|
4712
5288
|
};
|
|
@@ -4721,7 +5297,7 @@ var treeNodeSchema = z.lazy(
|
|
|
4721
5297
|
children: z.array(treeNodeSchema)
|
|
4722
5298
|
})
|
|
4723
5299
|
);
|
|
4724
|
-
var
|
|
5300
|
+
var outputSchema78 = z.object({
|
|
4725
5301
|
tree: z.array(treeNodeSchema).describe("Hierarchical site tree with children nested inside each node"),
|
|
4726
5302
|
totalPages: z.number().describe("Total number of pages found across all levels"),
|
|
4727
5303
|
maxDepthFound: z.number().describe("The deepest level actually found during the scan"),
|
|
@@ -4759,11 +5335,11 @@ async function buildTreeNodes(parentId, depth, maxDepth, pagesPerLevel, totalRef
|
|
|
4759
5335
|
}
|
|
4760
5336
|
return nodes;
|
|
4761
5337
|
}
|
|
4762
|
-
var
|
|
5338
|
+
var tool78 = {
|
|
4763
5339
|
name: "report-site-tree-summary",
|
|
4764
5340
|
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.",
|
|
4765
|
-
inputSchema:
|
|
4766
|
-
outputSchema:
|
|
5341
|
+
inputSchema: inputSchema78,
|
|
5342
|
+
outputSchema: outputSchema78,
|
|
4767
5343
|
slices: ["read"],
|
|
4768
5344
|
annotations: { readOnlyHint: true },
|
|
4769
5345
|
handler: async ({ parentId, maxDepth }) => {
|
|
@@ -4780,14 +5356,14 @@ var tool66 = {
|
|
|
4780
5356
|
});
|
|
4781
5357
|
}
|
|
4782
5358
|
};
|
|
4783
|
-
var report_site_tree_summary_default = withStandardDecorators(
|
|
4784
|
-
var
|
|
5359
|
+
var report_site_tree_summary_default = withStandardDecorators(tool78);
|
|
5360
|
+
var inputSchema79 = {
|
|
4785
5361
|
depthThreshold: z.number().optional().default(4).describe("Pages deeper than this level are reported (default 4)"),
|
|
4786
5362
|
parentId: z.string().uuid().optional().describe("Scope to a subtree by parent page ID. Omit to start from root."),
|
|
4787
5363
|
take: z.number().optional().default(50).describe("Number of results to return after filtering (default 50)"),
|
|
4788
5364
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination (default 0)")
|
|
4789
5365
|
};
|
|
4790
|
-
var
|
|
5366
|
+
var outputSchema79 = z.object({
|
|
4791
5367
|
items: z.array(
|
|
4792
5368
|
z.object({
|
|
4793
5369
|
id: z.string(),
|
|
@@ -4802,11 +5378,11 @@ var outputSchema67 = z.object({
|
|
|
4802
5378
|
scannedPages: z.number().describe("Total number of pages scanned during the walk"),
|
|
4803
5379
|
threshold: z.number().describe("The depth threshold used for this scan")
|
|
4804
5380
|
});
|
|
4805
|
-
var
|
|
5381
|
+
var tool79 = {
|
|
4806
5382
|
name: "report-deep-pages",
|
|
4807
5383
|
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.",
|
|
4808
|
-
inputSchema:
|
|
4809
|
-
outputSchema:
|
|
5384
|
+
inputSchema: inputSchema79,
|
|
5385
|
+
outputSchema: outputSchema79,
|
|
4810
5386
|
slices: ["read"],
|
|
4811
5387
|
annotations: { readOnlyHint: true },
|
|
4812
5388
|
handler: async ({ depthThreshold, parentId, take, skip }) => {
|
|
@@ -4850,10 +5426,10 @@ var tool67 = {
|
|
|
4850
5426
|
});
|
|
4851
5427
|
}
|
|
4852
5428
|
};
|
|
4853
|
-
var report_deep_pages_default = withStandardDecorators(
|
|
5429
|
+
var report_deep_pages_default = withStandardDecorators(tool79);
|
|
4854
5430
|
|
|
4855
5431
|
// src/umbraco-api/tools/site-structure/index.ts
|
|
4856
|
-
var
|
|
5432
|
+
var collection13 = {
|
|
4857
5433
|
metadata: {
|
|
4858
5434
|
name: "site-structure",
|
|
4859
5435
|
displayName: "Site Structure",
|
|
@@ -4861,12 +5437,12 @@ var collection12 = {
|
|
|
4861
5437
|
},
|
|
4862
5438
|
tools: () => [report_site_tree_summary_default, report_deep_pages_default]
|
|
4863
5439
|
};
|
|
4864
|
-
var site_structure_default =
|
|
4865
|
-
var
|
|
5440
|
+
var site_structure_default = collection13;
|
|
5441
|
+
var inputSchema80 = {
|
|
4866
5442
|
ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to publish (max 10)"),
|
|
4867
5443
|
includeDescendants: z.boolean().optional().default(false).describe("Whether to also publish all child pages of each page")
|
|
4868
5444
|
};
|
|
4869
|
-
var
|
|
5445
|
+
var outputSchema80 = z.object({
|
|
4870
5446
|
message: z.string(),
|
|
4871
5447
|
results: z.array(z.object({
|
|
4872
5448
|
id: z.string(),
|
|
@@ -4880,11 +5456,11 @@ var outputSchema68 = z.object({
|
|
|
4880
5456
|
failureCount: z.number(),
|
|
4881
5457
|
skippedCount: z.number()
|
|
4882
5458
|
});
|
|
4883
|
-
var
|
|
5459
|
+
var tool80 = {
|
|
4884
5460
|
name: "bulk-publish",
|
|
4885
5461
|
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.",
|
|
4886
|
-
inputSchema:
|
|
4887
|
-
outputSchema:
|
|
5462
|
+
inputSchema: inputSchema80,
|
|
5463
|
+
outputSchema: outputSchema80,
|
|
4888
5464
|
slices: ["publish"],
|
|
4889
5465
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
4890
5466
|
handler: async ({ ids, includeDescendants }, extra) => {
|
|
@@ -4936,11 +5512,11 @@ ${nameList}`;
|
|
|
4936
5512
|
return createToolResult(buildBulkOutput("Published", results));
|
|
4937
5513
|
}
|
|
4938
5514
|
};
|
|
4939
|
-
var bulk_publish_default = withStandardDecorators(
|
|
4940
|
-
var
|
|
5515
|
+
var bulk_publish_default = withStandardDecorators(tool80);
|
|
5516
|
+
var inputSchema81 = {
|
|
4941
5517
|
ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to unpublish (max 10)")
|
|
4942
5518
|
};
|
|
4943
|
-
var
|
|
5519
|
+
var outputSchema81 = z.object({
|
|
4944
5520
|
message: z.string(),
|
|
4945
5521
|
results: z.array(z.object({
|
|
4946
5522
|
id: z.string(),
|
|
@@ -4954,11 +5530,11 @@ var outputSchema69 = z.object({
|
|
|
4954
5530
|
failureCount: z.number(),
|
|
4955
5531
|
skippedCount: z.number()
|
|
4956
5532
|
});
|
|
4957
|
-
var
|
|
5533
|
+
var tool81 = {
|
|
4958
5534
|
name: "bulk-unpublish",
|
|
4959
5535
|
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.",
|
|
4960
|
-
inputSchema:
|
|
4961
|
-
outputSchema:
|
|
5536
|
+
inputSchema: inputSchema81,
|
|
5537
|
+
outputSchema: outputSchema81,
|
|
4962
5538
|
slices: ["publish"],
|
|
4963
5539
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
4964
5540
|
handler: async ({ ids }, extra) => {
|
|
@@ -5014,7 +5590,7 @@ ${nameList}`;
|
|
|
5014
5590
|
return createToolResult(buildBulkOutput("Unpublished", results));
|
|
5015
5591
|
}
|
|
5016
5592
|
};
|
|
5017
|
-
var bulk_unpublish_default = withStandardDecorators(
|
|
5593
|
+
var bulk_unpublish_default = withStandardDecorators(tool81);
|
|
5018
5594
|
|
|
5019
5595
|
// src/umbraco-api/tools/helpers/format-date.ts
|
|
5020
5596
|
function formatDate(iso) {
|
|
@@ -5028,11 +5604,11 @@ function formatDate(iso) {
|
|
|
5028
5604
|
}
|
|
5029
5605
|
|
|
5030
5606
|
// src/umbraco-api/tools/bulk-operations/post/bulk-schedule-publish.ts
|
|
5031
|
-
var
|
|
5607
|
+
var inputSchema82 = {
|
|
5032
5608
|
ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to schedule for publishing (max 10)"),
|
|
5033
5609
|
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.")
|
|
5034
5610
|
};
|
|
5035
|
-
var
|
|
5611
|
+
var outputSchema82 = z.object({
|
|
5036
5612
|
message: z.string(),
|
|
5037
5613
|
results: z.array(z.object({
|
|
5038
5614
|
id: z.string(),
|
|
@@ -5046,11 +5622,11 @@ var outputSchema70 = z.object({
|
|
|
5046
5622
|
failureCount: z.number(),
|
|
5047
5623
|
skippedCount: z.number()
|
|
5048
5624
|
});
|
|
5049
|
-
var
|
|
5625
|
+
var tool82 = {
|
|
5050
5626
|
name: "bulk-schedule-publish",
|
|
5051
5627
|
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.",
|
|
5052
|
-
inputSchema:
|
|
5053
|
-
outputSchema:
|
|
5628
|
+
inputSchema: inputSchema82,
|
|
5629
|
+
outputSchema: outputSchema82,
|
|
5054
5630
|
slices: ["publish"],
|
|
5055
5631
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
5056
5632
|
handler: async ({ ids, publishDate }, extra) => {
|
|
@@ -5095,15 +5671,15 @@ ${nameList}`;
|
|
|
5095
5671
|
return createToolResult(buildBulkOutput("Scheduled", results));
|
|
5096
5672
|
}
|
|
5097
5673
|
};
|
|
5098
|
-
var bulk_schedule_publish_default = withStandardDecorators(
|
|
5099
|
-
var
|
|
5674
|
+
var bulk_schedule_publish_default = withStandardDecorators(tool82);
|
|
5675
|
+
var inputSchema83 = {
|
|
5100
5676
|
ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to update (max 10)"),
|
|
5101
5677
|
alias: z.string().describe("The property alias to set (call get-page first to verify it exists on the document type)"),
|
|
5102
5678
|
value: z.any().describe("The value to set on the property"),
|
|
5103
5679
|
culture: z.string().optional().describe("The culture code for variant content (omit for invariant properties)"),
|
|
5104
5680
|
segment: z.string().optional().describe("The segment for segmented content (omit if not using segments)")
|
|
5105
5681
|
};
|
|
5106
|
-
var
|
|
5682
|
+
var outputSchema83 = z.object({
|
|
5107
5683
|
message: z.string(),
|
|
5108
5684
|
results: z.array(z.object({
|
|
5109
5685
|
id: z.string(),
|
|
@@ -5118,11 +5694,11 @@ var outputSchema71 = z.object({
|
|
|
5118
5694
|
failureCount: z.number(),
|
|
5119
5695
|
skippedCount: z.number()
|
|
5120
5696
|
});
|
|
5121
|
-
var
|
|
5697
|
+
var tool83 = {
|
|
5122
5698
|
name: "bulk-set-property",
|
|
5123
5699
|
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.",
|
|
5124
|
-
inputSchema:
|
|
5125
|
-
outputSchema:
|
|
5700
|
+
inputSchema: inputSchema83,
|
|
5701
|
+
outputSchema: outputSchema83,
|
|
5126
5702
|
slices: ["update"],
|
|
5127
5703
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
5128
5704
|
handler: async ({ ids, alias, value, culture, segment }, extra) => {
|
|
@@ -5169,12 +5745,12 @@ ${nameList}`;
|
|
|
5169
5745
|
return createToolResult(buildBulkOutput("Updated", results));
|
|
5170
5746
|
}
|
|
5171
5747
|
};
|
|
5172
|
-
var bulk_set_property_default = withStandardDecorators(
|
|
5173
|
-
var
|
|
5748
|
+
var bulk_set_property_default = withStandardDecorators(tool83);
|
|
5749
|
+
var inputSchema84 = {
|
|
5174
5750
|
ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to move (max 10)"),
|
|
5175
5751
|
targetParentId: z.string().uuid().describe("The ID of the destination parent page to move the pages into")
|
|
5176
5752
|
};
|
|
5177
|
-
var
|
|
5753
|
+
var outputSchema84 = z.object({
|
|
5178
5754
|
message: z.string(),
|
|
5179
5755
|
results: z.array(z.object({
|
|
5180
5756
|
id: z.string(),
|
|
@@ -5188,11 +5764,11 @@ var outputSchema72 = z.object({
|
|
|
5188
5764
|
failureCount: z.number(),
|
|
5189
5765
|
skippedCount: z.number()
|
|
5190
5766
|
});
|
|
5191
|
-
var
|
|
5767
|
+
var tool84 = {
|
|
5192
5768
|
name: "bulk-move",
|
|
5193
5769
|
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.",
|
|
5194
|
-
inputSchema:
|
|
5195
|
-
outputSchema:
|
|
5770
|
+
inputSchema: inputSchema84,
|
|
5771
|
+
outputSchema: outputSchema84,
|
|
5196
5772
|
slices: ["move"],
|
|
5197
5773
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
5198
5774
|
handler: async ({ ids, targetParentId }, extra) => {
|
|
@@ -5245,8 +5821,8 @@ ${nameList}`;
|
|
|
5245
5821
|
return createToolResult(buildBulkOutput("Moved", results));
|
|
5246
5822
|
}
|
|
5247
5823
|
};
|
|
5248
|
-
var bulk_move_default = withStandardDecorators(
|
|
5249
|
-
var
|
|
5824
|
+
var bulk_move_default = withStandardDecorators(tool84);
|
|
5825
|
+
var inputSchema85 = {
|
|
5250
5826
|
ids: z.array(z.string().uuid()).min(1).max(10).describe("The IDs of the pages to update (max 10)"),
|
|
5251
5827
|
contentTypeKey: z.string().uuid().describe("The block element type key to target. Use inspect-blocks to find this."),
|
|
5252
5828
|
propertyAlias: z.string().describe("The document property alias containing the blocks (e.g. 'contentRows'). Use inspect-blocks to find this."),
|
|
@@ -5257,7 +5833,7 @@ var inputSchema73 = {
|
|
|
5257
5833
|
culture: z.string().nullable().optional().describe("Culture code if the document property is variant"),
|
|
5258
5834
|
segment: z.string().nullable().optional().describe("Segment if the document property is variant")
|
|
5259
5835
|
};
|
|
5260
|
-
var
|
|
5836
|
+
var outputSchema85 = z.object({
|
|
5261
5837
|
message: z.string(),
|
|
5262
5838
|
results: z.array(z.object({
|
|
5263
5839
|
id: z.string(),
|
|
@@ -5274,10 +5850,10 @@ var outputSchema73 = z.object({
|
|
|
5274
5850
|
skippedCount: z.number(),
|
|
5275
5851
|
totalBlocksUpdated: z.number()
|
|
5276
5852
|
});
|
|
5277
|
-
function
|
|
5853
|
+
function isBlockListOrGridValue2(value) {
|
|
5278
5854
|
return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
|
|
5279
5855
|
}
|
|
5280
|
-
function
|
|
5856
|
+
function isRteWithBlocks2(value) {
|
|
5281
5857
|
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);
|
|
5282
5858
|
}
|
|
5283
5859
|
function findMatchingBlocks(doc, propertyAlias, contentTypeKey) {
|
|
@@ -5285,18 +5861,18 @@ function findMatchingBlocks(doc, propertyAlias, contentTypeKey) {
|
|
|
5285
5861
|
const prop = allValues.find((v) => v.alias === propertyAlias);
|
|
5286
5862
|
if (!prop) return [];
|
|
5287
5863
|
let contentData = [];
|
|
5288
|
-
if (
|
|
5864
|
+
if (isBlockListOrGridValue2(prop.value)) {
|
|
5289
5865
|
contentData = prop.value.contentData;
|
|
5290
|
-
} else if (
|
|
5866
|
+
} else if (isRteWithBlocks2(prop.value)) {
|
|
5291
5867
|
contentData = prop.value.blocks.contentData;
|
|
5292
5868
|
}
|
|
5293
5869
|
return contentData.filter((block) => block.contentTypeKey === contentTypeKey).map((block) => ({ contentKey: block.key ?? "" })).filter((b) => b.contentKey !== "");
|
|
5294
5870
|
}
|
|
5295
|
-
var
|
|
5871
|
+
var tool85 = {
|
|
5296
5872
|
name: "bulk-set-block-property",
|
|
5297
5873
|
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.",
|
|
5298
|
-
inputSchema:
|
|
5299
|
-
outputSchema:
|
|
5874
|
+
inputSchema: inputSchema85,
|
|
5875
|
+
outputSchema: outputSchema85,
|
|
5300
5876
|
slices: ["update"],
|
|
5301
5877
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
5302
5878
|
handler: async ({ ids, contentTypeKey, propertyAlias, values, culture, segment }, extra) => {
|
|
@@ -5434,10 +6010,10 @@ Changes will be saved but not published.`;
|
|
|
5434
6010
|
});
|
|
5435
6011
|
}
|
|
5436
6012
|
};
|
|
5437
|
-
var bulk_set_block_property_default = withStandardDecorators(
|
|
6013
|
+
var bulk_set_block_property_default = withStandardDecorators(tool85);
|
|
5438
6014
|
|
|
5439
6015
|
// src/umbraco-api/tools/bulk-operations/index.ts
|
|
5440
|
-
var
|
|
6016
|
+
var collection14 = {
|
|
5441
6017
|
metadata: {
|
|
5442
6018
|
name: "bulk-operations",
|
|
5443
6019
|
displayName: "Bulk Operations",
|
|
@@ -5445,7 +6021,7 @@ var collection13 = {
|
|
|
5445
6021
|
},
|
|
5446
6022
|
tools: () => [bulk_publish_default, bulk_unpublish_default, bulk_schedule_publish_default, bulk_set_property_default, bulk_move_default, bulk_set_block_property_default]
|
|
5447
6023
|
};
|
|
5448
|
-
var bulk_operations_default =
|
|
6024
|
+
var bulk_operations_default = collection14;
|
|
5449
6025
|
|
|
5450
6026
|
// src/umbraco-api/tools/member-reporting/get/member-type-helper.ts
|
|
5451
6027
|
function memberTypeToString(memberType) {
|
|
@@ -5459,12 +6035,12 @@ function memberTypeToString(memberType) {
|
|
|
5459
6035
|
}
|
|
5460
6036
|
|
|
5461
6037
|
// src/umbraco-api/tools/member/get/search-members.ts
|
|
5462
|
-
var
|
|
6038
|
+
var inputSchema86 = {
|
|
5463
6039
|
query: z.string().describe("Search term to find members by name or email address"),
|
|
5464
6040
|
take: z.number().optional().default(20).describe("Number of results to return (default 20)"),
|
|
5465
6041
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
5466
6042
|
};
|
|
5467
|
-
var
|
|
6043
|
+
var outputSchema86 = z.object({
|
|
5468
6044
|
items: z.array(z.object({
|
|
5469
6045
|
id: z.string(),
|
|
5470
6046
|
name: z.string(),
|
|
@@ -5475,11 +6051,11 @@ var outputSchema74 = z.object({
|
|
|
5475
6051
|
})).describe("Matching members"),
|
|
5476
6052
|
total: z.number().describe("Total number of matches")
|
|
5477
6053
|
});
|
|
5478
|
-
var
|
|
6054
|
+
var tool86 = {
|
|
5479
6055
|
name: "search-members",
|
|
5480
6056
|
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.",
|
|
5481
|
-
inputSchema:
|
|
5482
|
-
outputSchema:
|
|
6057
|
+
inputSchema: inputSchema86,
|
|
6058
|
+
outputSchema: outputSchema86,
|
|
5483
6059
|
slices: ["search"],
|
|
5484
6060
|
annotations: { readOnlyHint: true },
|
|
5485
6061
|
handler: async ({ query, take, skip }) => {
|
|
@@ -5499,7 +6075,7 @@ var tool74 = {
|
|
|
5499
6075
|
});
|
|
5500
6076
|
}
|
|
5501
6077
|
};
|
|
5502
|
-
var search_members_default = withStandardDecorators(
|
|
6078
|
+
var search_members_default = withStandardDecorators(tool86);
|
|
5503
6079
|
|
|
5504
6080
|
// src/umbraco-api/tools/member/sensitive-data-access.ts
|
|
5505
6081
|
var cachedAccess;
|
|
@@ -5511,10 +6087,10 @@ async function hasSensitiveDataAccess() {
|
|
|
5511
6087
|
}
|
|
5512
6088
|
|
|
5513
6089
|
// src/umbraco-api/tools/member/get/get-member.ts
|
|
5514
|
-
var
|
|
6090
|
+
var inputSchema87 = {
|
|
5515
6091
|
id: z.string().uuid().describe("The ID of the member to retrieve")
|
|
5516
6092
|
};
|
|
5517
|
-
var
|
|
6093
|
+
var outputSchema87 = z.object({
|
|
5518
6094
|
id: z.string(),
|
|
5519
6095
|
name: z.string(),
|
|
5520
6096
|
email: z.string(),
|
|
@@ -5534,11 +6110,11 @@ var outputSchema75 = z.object({
|
|
|
5534
6110
|
lastPasswordChangeDate: z.string().nullable(),
|
|
5535
6111
|
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.")
|
|
5536
6112
|
});
|
|
5537
|
-
var
|
|
6113
|
+
var tool87 = {
|
|
5538
6114
|
name: "get-member",
|
|
5539
6115
|
description: "Get the full profile of a member including their groups, properties, approval status, and login history.",
|
|
5540
|
-
inputSchema:
|
|
5541
|
-
outputSchema:
|
|
6116
|
+
inputSchema: inputSchema87,
|
|
6117
|
+
outputSchema: outputSchema87,
|
|
5542
6118
|
slices: ["read"],
|
|
5543
6119
|
annotations: { readOnlyHint: true },
|
|
5544
6120
|
handler: async ({ id }) => {
|
|
@@ -5563,12 +6139,12 @@ var tool75 = {
|
|
|
5563
6139
|
});
|
|
5564
6140
|
}
|
|
5565
6141
|
};
|
|
5566
|
-
var get_member_default = withStandardDecorators(
|
|
5567
|
-
var
|
|
6142
|
+
var get_member_default = withStandardDecorators(tool87);
|
|
6143
|
+
var inputSchema88 = {
|
|
5568
6144
|
take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
|
|
5569
6145
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
5570
6146
|
};
|
|
5571
|
-
var
|
|
6147
|
+
var outputSchema88 = z.object({
|
|
5572
6148
|
items: z.array(z.object({
|
|
5573
6149
|
id: z.string(),
|
|
5574
6150
|
alias: z.string(),
|
|
@@ -5576,11 +6152,11 @@ var outputSchema76 = z.object({
|
|
|
5576
6152
|
})).describe("Available member types"),
|
|
5577
6153
|
total: z.number().describe("Total number of member types")
|
|
5578
6154
|
});
|
|
5579
|
-
var
|
|
6155
|
+
var tool88 = {
|
|
5580
6156
|
name: "list-member-types",
|
|
5581
6157
|
description: "List available member types. Use this before create-member to find a valid member type ID.",
|
|
5582
|
-
inputSchema:
|
|
5583
|
-
outputSchema:
|
|
6158
|
+
inputSchema: inputSchema88,
|
|
6159
|
+
outputSchema: outputSchema88,
|
|
5584
6160
|
slices: ["list"],
|
|
5585
6161
|
annotations: { readOnlyHint: true },
|
|
5586
6162
|
handler: async ({ take, skip }) => {
|
|
@@ -5596,8 +6172,8 @@ var tool76 = {
|
|
|
5596
6172
|
});
|
|
5597
6173
|
}
|
|
5598
6174
|
};
|
|
5599
|
-
var list_member_types_default = withStandardDecorators(
|
|
5600
|
-
var
|
|
6175
|
+
var list_member_types_default = withStandardDecorators(tool88);
|
|
6176
|
+
var inputSchema89 = {
|
|
5601
6177
|
email: z.string().email().describe("The email address for the new member"),
|
|
5602
6178
|
username: z.string().describe("The username for the new member"),
|
|
5603
6179
|
name: z.string().describe("The display name for the new member"),
|
|
@@ -5610,17 +6186,17 @@ var inputSchema77 = {
|
|
|
5610
6186
|
value: z.any().describe("The property value")
|
|
5611
6187
|
})).optional().describe("Custom property values to set on the new member")
|
|
5612
6188
|
};
|
|
5613
|
-
var
|
|
6189
|
+
var outputSchema89 = z.object({
|
|
5614
6190
|
message: z.string(),
|
|
5615
6191
|
id: z.string(),
|
|
5616
6192
|
name: z.string(),
|
|
5617
6193
|
email: z.string()
|
|
5618
6194
|
});
|
|
5619
|
-
var
|
|
6195
|
+
var tool89 = {
|
|
5620
6196
|
name: "create-member",
|
|
5621
6197
|
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.",
|
|
5622
|
-
inputSchema:
|
|
5623
|
-
outputSchema:
|
|
6198
|
+
inputSchema: inputSchema89,
|
|
6199
|
+
outputSchema: outputSchema89,
|
|
5624
6200
|
slices: ["create"],
|
|
5625
6201
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
5626
6202
|
handler: async ({ email, username, name, password, memberTypeId, isApproved, groups, values }) => {
|
|
@@ -5674,8 +6250,8 @@ var tool77 = {
|
|
|
5674
6250
|
});
|
|
5675
6251
|
}
|
|
5676
6252
|
};
|
|
5677
|
-
var create_member_default = withStandardDecorators(
|
|
5678
|
-
var
|
|
6253
|
+
var create_member_default = withStandardDecorators(tool89);
|
|
6254
|
+
var inputSchema90 = {
|
|
5679
6255
|
id: z.string().uuid().describe("The ID of the member to update"),
|
|
5680
6256
|
name: z.string().optional().describe("The new display name for the member"),
|
|
5681
6257
|
email: z.string().email().optional().describe("The new email address for the member"),
|
|
@@ -5690,17 +6266,17 @@ var inputSchema78 = {
|
|
|
5690
6266
|
value: z.any().describe("The new property value")
|
|
5691
6267
|
})).optional().describe("Custom property values to update")
|
|
5692
6268
|
};
|
|
5693
|
-
var
|
|
6269
|
+
var outputSchema90 = z.object({
|
|
5694
6270
|
message: z.string(),
|
|
5695
6271
|
id: z.string(),
|
|
5696
6272
|
name: z.string(),
|
|
5697
6273
|
email: z.string()
|
|
5698
6274
|
});
|
|
5699
|
-
var
|
|
6275
|
+
var tool90 = {
|
|
5700
6276
|
name: "update-member",
|
|
5701
6277
|
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.",
|
|
5702
|
-
inputSchema:
|
|
5703
|
-
outputSchema:
|
|
6278
|
+
inputSchema: inputSchema90,
|
|
6279
|
+
outputSchema: outputSchema90,
|
|
5704
6280
|
slices: ["update"],
|
|
5705
6281
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
5706
6282
|
handler: async ({ id, name, email, username, newPassword, isTwoFactorEnabled, isApproved, isLockedOut, groups, values }, extra) => {
|
|
@@ -5752,21 +6328,21 @@ var tool78 = {
|
|
|
5752
6328
|
});
|
|
5753
6329
|
}
|
|
5754
6330
|
};
|
|
5755
|
-
var update_member_default = withStandardDecorators(
|
|
5756
|
-
var
|
|
6331
|
+
var update_member_default = withStandardDecorators(tool90);
|
|
6332
|
+
var inputSchema91 = {
|
|
5757
6333
|
id: z.string().uuid().describe("The ID of the member to permanently delete")
|
|
5758
6334
|
};
|
|
5759
|
-
var
|
|
6335
|
+
var outputSchema91 = z.object({
|
|
5760
6336
|
message: z.string(),
|
|
5761
6337
|
id: z.string(),
|
|
5762
6338
|
name: z.string(),
|
|
5763
6339
|
email: z.string()
|
|
5764
6340
|
});
|
|
5765
|
-
var
|
|
6341
|
+
var tool91 = {
|
|
5766
6342
|
name: "delete-member",
|
|
5767
6343
|
description: "Permanently delete a member. This cannot be undone \u2014 there is no recycle bin for members. You will be asked to confirm.",
|
|
5768
|
-
inputSchema:
|
|
5769
|
-
outputSchema:
|
|
6344
|
+
inputSchema: inputSchema91,
|
|
6345
|
+
outputSchema: outputSchema91,
|
|
5770
6346
|
slices: ["delete"],
|
|
5771
6347
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
5772
6348
|
handler: async ({ id }, extra) => {
|
|
@@ -5788,10 +6364,10 @@ var tool79 = {
|
|
|
5788
6364
|
});
|
|
5789
6365
|
}
|
|
5790
6366
|
};
|
|
5791
|
-
var delete_member_default = withStandardDecorators(
|
|
6367
|
+
var delete_member_default = withStandardDecorators(tool91);
|
|
5792
6368
|
|
|
5793
6369
|
// src/umbraco-api/tools/member/index.ts
|
|
5794
|
-
var
|
|
6370
|
+
var collection15 = {
|
|
5795
6371
|
metadata: {
|
|
5796
6372
|
name: "member",
|
|
5797
6373
|
displayName: "Members",
|
|
@@ -5799,23 +6375,23 @@ var collection14 = {
|
|
|
5799
6375
|
},
|
|
5800
6376
|
tools: () => [search_members_default, get_member_default, list_member_types_default, create_member_default, update_member_default, delete_member_default]
|
|
5801
6377
|
};
|
|
5802
|
-
var member_default =
|
|
5803
|
-
var
|
|
6378
|
+
var member_default = collection15;
|
|
6379
|
+
var inputSchema92 = {
|
|
5804
6380
|
take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
|
|
5805
6381
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
5806
6382
|
};
|
|
5807
|
-
var
|
|
6383
|
+
var outputSchema92 = z.object({
|
|
5808
6384
|
items: z.array(z.object({
|
|
5809
6385
|
id: z.string(),
|
|
5810
6386
|
name: z.string()
|
|
5811
6387
|
})).describe("Member groups"),
|
|
5812
6388
|
total: z.number().describe("Total number of member groups")
|
|
5813
6389
|
});
|
|
5814
|
-
var
|
|
6390
|
+
var tool92 = {
|
|
5815
6391
|
name: "list-member-groups",
|
|
5816
6392
|
description: "List all member groups. Use group names when creating or updating members to assign them to groups.",
|
|
5817
|
-
inputSchema:
|
|
5818
|
-
outputSchema:
|
|
6393
|
+
inputSchema: inputSchema92,
|
|
6394
|
+
outputSchema: outputSchema92,
|
|
5819
6395
|
slices: ["list"],
|
|
5820
6396
|
annotations: { readOnlyHint: true },
|
|
5821
6397
|
handler: async ({ take, skip }) => {
|
|
@@ -5831,20 +6407,20 @@ var tool80 = {
|
|
|
5831
6407
|
});
|
|
5832
6408
|
}
|
|
5833
6409
|
};
|
|
5834
|
-
var list_member_groups_default = withStandardDecorators(
|
|
5835
|
-
var
|
|
6410
|
+
var list_member_groups_default = withStandardDecorators(tool92);
|
|
6411
|
+
var inputSchema93 = {
|
|
5836
6412
|
name: z.string().describe("The name of the new member group")
|
|
5837
6413
|
};
|
|
5838
|
-
var
|
|
6414
|
+
var outputSchema93 = z.object({
|
|
5839
6415
|
message: z.string(),
|
|
5840
6416
|
id: z.string(),
|
|
5841
6417
|
name: z.string()
|
|
5842
6418
|
});
|
|
5843
|
-
var
|
|
6419
|
+
var tool93 = {
|
|
5844
6420
|
name: "create-member-group",
|
|
5845
6421
|
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.",
|
|
5846
|
-
inputSchema:
|
|
5847
|
-
outputSchema:
|
|
6422
|
+
inputSchema: inputSchema93,
|
|
6423
|
+
outputSchema: outputSchema93,
|
|
5848
6424
|
slices: ["create"],
|
|
5849
6425
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
5850
6426
|
handler: async ({ name }) => {
|
|
@@ -5857,20 +6433,20 @@ var tool81 = {
|
|
|
5857
6433
|
});
|
|
5858
6434
|
}
|
|
5859
6435
|
};
|
|
5860
|
-
var create_member_group_default = withStandardDecorators(
|
|
5861
|
-
var
|
|
6436
|
+
var create_member_group_default = withStandardDecorators(tool93);
|
|
6437
|
+
var inputSchema94 = {
|
|
5862
6438
|
id: z.string().uuid().describe("The ID of the member group to delete")
|
|
5863
6439
|
};
|
|
5864
|
-
var
|
|
6440
|
+
var outputSchema94 = z.object({
|
|
5865
6441
|
message: z.string(),
|
|
5866
6442
|
id: z.string(),
|
|
5867
6443
|
name: z.string()
|
|
5868
6444
|
});
|
|
5869
|
-
var
|
|
6445
|
+
var tool94 = {
|
|
5870
6446
|
name: "delete-member-group",
|
|
5871
6447
|
description: "Delete a member group. Members in this group will lose the group assignment. You will be asked to confirm.",
|
|
5872
|
-
inputSchema:
|
|
5873
|
-
outputSchema:
|
|
6448
|
+
inputSchema: inputSchema94,
|
|
6449
|
+
outputSchema: outputSchema94,
|
|
5874
6450
|
slices: ["delete"],
|
|
5875
6451
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
5876
6452
|
handler: async ({ id }, extra) => {
|
|
@@ -5891,10 +6467,10 @@ var tool82 = {
|
|
|
5891
6467
|
});
|
|
5892
6468
|
}
|
|
5893
6469
|
};
|
|
5894
|
-
var delete_member_group_default = withStandardDecorators(
|
|
6470
|
+
var delete_member_group_default = withStandardDecorators(tool94);
|
|
5895
6471
|
|
|
5896
6472
|
// src/umbraco-api/tools/member-group/index.ts
|
|
5897
|
-
var
|
|
6473
|
+
var collection16 = {
|
|
5898
6474
|
metadata: {
|
|
5899
6475
|
name: "member-group",
|
|
5900
6476
|
displayName: "Member Groups",
|
|
@@ -5902,74 +6478,82 @@ var collection15 = {
|
|
|
5902
6478
|
},
|
|
5903
6479
|
tools: () => [list_member_groups_default, create_member_group_default, delete_member_group_default]
|
|
5904
6480
|
};
|
|
5905
|
-
var member_group_default =
|
|
5906
|
-
var
|
|
5907
|
-
var
|
|
5908
|
-
totalMembers: z.number().describe("Total number of members across all types and groups"),
|
|
6481
|
+
var member_group_default = collection16;
|
|
6482
|
+
var inputSchema95 = {};
|
|
6483
|
+
var outputSchema95 = z.object({
|
|
6484
|
+
totalMembers: z.number().describe("Total number of members across all types and groups (exact, server-reported \u2014 not capped by the sample)."),
|
|
5909
6485
|
byType: z.array(z.object({
|
|
5910
6486
|
memberType: z.string().describe("Member type alias or name"),
|
|
5911
6487
|
count: z.number()
|
|
5912
|
-
})).describe("Member counts grouped by member type. Maps naturally to a pie or bar chart."),
|
|
6488
|
+
})).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."),
|
|
5913
6489
|
byGroup: z.array(z.object({
|
|
5914
6490
|
group: z.string().describe("Member group name"),
|
|
5915
6491
|
count: z.number()
|
|
5916
|
-
})).describe("Member counts grouped by member group. Members with no group are excluded.")
|
|
6492
|
+
})).describe("Member counts grouped by member group \u2014 exact, server-reported per-group totals (uncapped). Members with no group are excluded.")
|
|
5917
6493
|
});
|
|
5918
6494
|
var PAGE_SIZE = 100;
|
|
5919
6495
|
var MEMBER_CAP = 500;
|
|
5920
|
-
var
|
|
6496
|
+
var tool95 = {
|
|
5921
6497
|
name: "report-member-count",
|
|
5922
|
-
description: "Returns a breakdown of member counts by type and group.
|
|
5923
|
-
inputSchema:
|
|
5924
|
-
outputSchema:
|
|
6498
|
+
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.",
|
|
6499
|
+
inputSchema: inputSchema95,
|
|
6500
|
+
outputSchema: outputSchema95,
|
|
5925
6501
|
slices: ["read"],
|
|
5926
6502
|
annotations: { readOnlyHint: true },
|
|
5927
6503
|
handler: async () => {
|
|
5928
|
-
const
|
|
6504
|
+
const sampledMembers = [];
|
|
6505
|
+
let totalMembers = 0;
|
|
5929
6506
|
let cursor = encodeCursor({ s: 0, t: PAGE_SIZE });
|
|
5930
|
-
while (
|
|
6507
|
+
while (sampledMembers.length < MEMBER_CAP) {
|
|
5931
6508
|
const result = await chainCms("find-member", { cursor, orderBy: "username" });
|
|
5932
6509
|
if (!result.ok) return result.errorResult;
|
|
5933
6510
|
const data = result.data;
|
|
5934
6511
|
const items = data.items ?? [];
|
|
5935
|
-
|
|
6512
|
+
if (typeof data.total === "number") totalMembers = data.total;
|
|
6513
|
+
sampledMembers.push(...items);
|
|
5936
6514
|
const nextCursor = data.nextCursor;
|
|
5937
6515
|
if (!nextCursor || items.length === 0) break;
|
|
5938
6516
|
cursor = nextCursor;
|
|
5939
6517
|
}
|
|
6518
|
+
if (totalMembers === 0 && sampledMembers.length > 0) totalMembers = sampledMembers.length;
|
|
5940
6519
|
const typeCounts = /* @__PURE__ */ new Map();
|
|
5941
|
-
for (const member of
|
|
6520
|
+
for (const member of sampledMembers) {
|
|
5942
6521
|
const memberType = memberTypeToString(member.memberType);
|
|
5943
6522
|
typeCounts.set(memberType, (typeCounts.get(memberType) ?? 0) + 1);
|
|
5944
6523
|
}
|
|
5945
6524
|
const groupResult = await chainCms("get-all-member-groups", {});
|
|
5946
6525
|
if (!groupResult.ok) return groupResult.errorResult;
|
|
5947
6526
|
const allGroups = groupResult.data.items ?? [];
|
|
6527
|
+
const named = allGroups.filter((g) => typeof g.name === "string");
|
|
6528
|
+
const perGroupResults = await Promise.all(
|
|
6529
|
+
named.map(
|
|
6530
|
+
(g) => chainCms("find-member", {
|
|
6531
|
+
memberGroupName: g.name,
|
|
6532
|
+
cursor: encodeCursor({ s: 0, t: 1 }),
|
|
6533
|
+
orderBy: "username"
|
|
6534
|
+
})
|
|
6535
|
+
)
|
|
6536
|
+
);
|
|
5948
6537
|
const byGroup = [];
|
|
5949
|
-
for (
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
cursor: encodeCursor({ s: 0, t: 1 }),
|
|
5954
|
-
orderBy: "username"
|
|
5955
|
-
});
|
|
5956
|
-
if (!countResult.ok) return countResult.errorResult;
|
|
5957
|
-
byGroup.push({ group: group.name, count: countResult.data.total ?? 0 });
|
|
6538
|
+
for (let i = 0; i < named.length; i++) {
|
|
6539
|
+
const r = perGroupResults[i];
|
|
6540
|
+
if (!r.ok) return r.errorResult;
|
|
6541
|
+
byGroup.push({ group: named[i].name, count: r.data.total ?? 0 });
|
|
5958
6542
|
}
|
|
5959
6543
|
return createToolResult({
|
|
5960
|
-
totalMembers
|
|
6544
|
+
totalMembers,
|
|
5961
6545
|
byType: Array.from(typeCounts.entries()).map(([memberType, count]) => ({ memberType, count })).sort((a, b) => b.count - a.count),
|
|
5962
6546
|
byGroup: byGroup.sort((a, b) => b.count - a.count)
|
|
5963
6547
|
});
|
|
5964
6548
|
}
|
|
5965
6549
|
};
|
|
5966
|
-
var report_member_count_default = withStandardDecorators(
|
|
5967
|
-
var
|
|
6550
|
+
var report_member_count_default = withStandardDecorators(tool95);
|
|
6551
|
+
var inputSchema96 = {
|
|
5968
6552
|
groupName: z.string().describe("The name of the member group to filter by. Use list-member-groups to find valid group names."),
|
|
5969
6553
|
take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
|
|
5970
6554
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination (default 0)")
|
|
5971
6555
|
};
|
|
5972
|
-
var
|
|
6556
|
+
var outputSchema96 = z.object({
|
|
5973
6557
|
groupName: z.string().describe("The group name used for this query"),
|
|
5974
6558
|
items: z.array(z.object({
|
|
5975
6559
|
id: z.string(),
|
|
@@ -5980,11 +6564,11 @@ var outputSchema84 = z.object({
|
|
|
5980
6564
|
})).describe("Members belonging to the specified group"),
|
|
5981
6565
|
total: z.number().describe("Total number of members in this group")
|
|
5982
6566
|
});
|
|
5983
|
-
var
|
|
6567
|
+
var tool96 = {
|
|
5984
6568
|
name: "report-members-by-group",
|
|
5985
6569
|
description: "List members belonging to a specific group. Use list-member-groups to find valid group names.",
|
|
5986
|
-
inputSchema:
|
|
5987
|
-
outputSchema:
|
|
6570
|
+
inputSchema: inputSchema96,
|
|
6571
|
+
outputSchema: outputSchema96,
|
|
5988
6572
|
slices: ["read"],
|
|
5989
6573
|
annotations: { readOnlyHint: true },
|
|
5990
6574
|
handler: async ({ groupName, take, skip }) => {
|
|
@@ -6000,8 +6584,9 @@ var tool84 = {
|
|
|
6000
6584
|
detail: `No member group named "${groupName}". Use list-member-groups to see existing group names.`
|
|
6001
6585
|
});
|
|
6002
6586
|
}
|
|
6587
|
+
const canonicalGroupName = groupMatch.name ?? groupName;
|
|
6003
6588
|
const result = await chainCms("find-member", {
|
|
6004
|
-
memberGroupName:
|
|
6589
|
+
memberGroupName: canonicalGroupName,
|
|
6005
6590
|
cursor: buildChainedCursor(skip, take),
|
|
6006
6591
|
orderBy: "username"
|
|
6007
6592
|
});
|
|
@@ -6020,13 +6605,13 @@ var tool84 = {
|
|
|
6020
6605
|
});
|
|
6021
6606
|
}
|
|
6022
6607
|
};
|
|
6023
|
-
var report_members_by_group_default = withStandardDecorators(
|
|
6024
|
-
var
|
|
6608
|
+
var report_members_by_group_default = withStandardDecorators(tool96);
|
|
6609
|
+
var inputSchema97 = {
|
|
6025
6610
|
inactiveDays: z.number().optional().default(90).describe("Number of days without a login before a member is considered inactive (default 90)"),
|
|
6026
6611
|
take: z.number().optional().default(50).describe("Number of results to return after filtering (default 50)"),
|
|
6027
6612
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination (default 0)")
|
|
6028
6613
|
};
|
|
6029
|
-
var
|
|
6614
|
+
var outputSchema97 = z.object({
|
|
6030
6615
|
items: z.array(z.object({
|
|
6031
6616
|
id: z.string(),
|
|
6032
6617
|
name: z.string(),
|
|
@@ -6041,11 +6626,11 @@ var outputSchema85 = z.object({
|
|
|
6041
6626
|
});
|
|
6042
6627
|
var PAGE_SIZE2 = 100;
|
|
6043
6628
|
var MEMBER_CAP2 = 500;
|
|
6044
|
-
var
|
|
6629
|
+
var tool97 = {
|
|
6045
6630
|
name: "report-member-activity",
|
|
6046
6631
|
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.",
|
|
6047
|
-
inputSchema:
|
|
6048
|
-
outputSchema:
|
|
6632
|
+
inputSchema: inputSchema97,
|
|
6633
|
+
outputSchema: outputSchema97,
|
|
6049
6634
|
slices: ["read"],
|
|
6050
6635
|
annotations: { readOnlyHint: true },
|
|
6051
6636
|
handler: async ({ inactiveDays, take, skip }) => {
|
|
@@ -6099,10 +6684,10 @@ var tool85 = {
|
|
|
6099
6684
|
});
|
|
6100
6685
|
}
|
|
6101
6686
|
};
|
|
6102
|
-
var report_member_activity_default = withStandardDecorators(
|
|
6687
|
+
var report_member_activity_default = withStandardDecorators(tool97);
|
|
6103
6688
|
|
|
6104
6689
|
// src/umbraco-api/tools/member-reporting/index.ts
|
|
6105
|
-
var
|
|
6690
|
+
var collection17 = {
|
|
6106
6691
|
metadata: {
|
|
6107
6692
|
name: "member-reporting",
|
|
6108
6693
|
displayName: "Member Reporting",
|
|
@@ -6110,22 +6695,22 @@ var collection16 = {
|
|
|
6110
6695
|
},
|
|
6111
6696
|
tools: () => [report_member_count_default, report_members_by_group_default, report_member_activity_default]
|
|
6112
6697
|
};
|
|
6113
|
-
var member_reporting_default =
|
|
6114
|
-
var
|
|
6698
|
+
var member_reporting_default = collection17;
|
|
6699
|
+
var inputSchema98 = {
|
|
6115
6700
|
id: z.string().uuid().describe("The ID of the page to check publish status for")
|
|
6116
6701
|
};
|
|
6117
|
-
var
|
|
6702
|
+
var outputSchema98 = z.object({
|
|
6118
6703
|
id: z.string(),
|
|
6119
6704
|
name: z.string(),
|
|
6120
6705
|
isPublished: z.boolean(),
|
|
6121
6706
|
state: z.string(),
|
|
6122
6707
|
variants: z.array(publishStatusVariantSchema)
|
|
6123
6708
|
});
|
|
6124
|
-
var
|
|
6709
|
+
var tool98 = {
|
|
6125
6710
|
name: "get-publish-status",
|
|
6126
6711
|
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.",
|
|
6127
|
-
inputSchema:
|
|
6128
|
-
outputSchema:
|
|
6712
|
+
inputSchema: inputSchema98,
|
|
6713
|
+
outputSchema: outputSchema98,
|
|
6129
6714
|
slices: ["read"],
|
|
6130
6715
|
annotations: { readOnlyHint: true },
|
|
6131
6716
|
handler: async ({ id }) => {
|
|
@@ -6141,24 +6726,24 @@ var tool86 = {
|
|
|
6141
6726
|
});
|
|
6142
6727
|
}
|
|
6143
6728
|
};
|
|
6144
|
-
var get_publish_status_default = withStandardDecorators(
|
|
6145
|
-
var
|
|
6729
|
+
var get_publish_status_default = withStandardDecorators(tool98);
|
|
6730
|
+
var inputSchema99 = {
|
|
6146
6731
|
id: z.string().uuid().describe("The ID of the page to schedule for publish"),
|
|
6147
6732
|
publishDate: z.string().datetime().describe("The date and time to publish the page (ISO 8601 format, must be in the future)"),
|
|
6148
6733
|
culture: z.string().optional().describe("Culture code for variant-specific scheduling (e.g. 'en-US'). Omit for invariant content.")
|
|
6149
6734
|
};
|
|
6150
|
-
var
|
|
6735
|
+
var outputSchema99 = z.object({
|
|
6151
6736
|
message: z.string(),
|
|
6152
6737
|
id: z.string(),
|
|
6153
6738
|
name: z.string(),
|
|
6154
6739
|
scheduledDate: z.string(),
|
|
6155
6740
|
previewUrl: previewUrlSchema
|
|
6156
6741
|
});
|
|
6157
|
-
var
|
|
6742
|
+
var tool99 = {
|
|
6158
6743
|
name: "schedule-publish",
|
|
6159
6744
|
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.",
|
|
6160
|
-
inputSchema:
|
|
6161
|
-
outputSchema:
|
|
6745
|
+
inputSchema: inputSchema99,
|
|
6746
|
+
outputSchema: outputSchema99,
|
|
6162
6747
|
slices: ["publish"],
|
|
6163
6748
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
6164
6749
|
handler: async ({ id, publishDate, culture }, extra) => {
|
|
@@ -6183,22 +6768,22 @@ var tool87 = {
|
|
|
6183
6768
|
});
|
|
6184
6769
|
}
|
|
6185
6770
|
};
|
|
6186
|
-
var schedule_publish_default = withStandardDecorators(
|
|
6187
|
-
var
|
|
6771
|
+
var schedule_publish_default = withStandardDecorators(tool99);
|
|
6772
|
+
var inputSchema100 = {
|
|
6188
6773
|
id: z.string().uuid().describe("The ID of the page whose scheduled publish should be cancelled"),
|
|
6189
6774
|
culture: z.string().optional().describe("Culture code to check for a scheduled variant (e.g. 'en-US'). Omit for invariant content.")
|
|
6190
6775
|
};
|
|
6191
|
-
var
|
|
6776
|
+
var outputSchema100 = z.object({
|
|
6192
6777
|
message: z.string(),
|
|
6193
6778
|
id: z.string(),
|
|
6194
6779
|
name: z.string(),
|
|
6195
6780
|
previewUrl: previewUrlSchema
|
|
6196
6781
|
});
|
|
6197
|
-
var
|
|
6782
|
+
var tool100 = {
|
|
6198
6783
|
name: "cancel-schedule",
|
|
6199
6784
|
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.",
|
|
6200
|
-
inputSchema:
|
|
6201
|
-
outputSchema:
|
|
6785
|
+
inputSchema: inputSchema100,
|
|
6786
|
+
outputSchema: outputSchema100,
|
|
6202
6787
|
slices: ["publish"],
|
|
6203
6788
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
6204
6789
|
handler: async ({ id, culture }, extra) => {
|
|
@@ -6236,10 +6821,10 @@ var tool88 = {
|
|
|
6236
6821
|
});
|
|
6237
6822
|
}
|
|
6238
6823
|
};
|
|
6239
|
-
var cancel_schedule_default = withStandardDecorators(
|
|
6824
|
+
var cancel_schedule_default = withStandardDecorators(tool100);
|
|
6240
6825
|
|
|
6241
6826
|
// src/umbraco-api/tools/scheduling/index.ts
|
|
6242
|
-
var
|
|
6827
|
+
var collection18 = {
|
|
6243
6828
|
metadata: {
|
|
6244
6829
|
name: "scheduling",
|
|
6245
6830
|
displayName: "Scheduling",
|
|
@@ -6247,13 +6832,13 @@ var collection17 = {
|
|
|
6247
6832
|
},
|
|
6248
6833
|
tools: () => [get_publish_status_default, schedule_publish_default, cancel_schedule_default]
|
|
6249
6834
|
};
|
|
6250
|
-
var scheduling_default =
|
|
6251
|
-
var
|
|
6835
|
+
var scheduling_default = collection18;
|
|
6836
|
+
var inputSchema101 = {
|
|
6252
6837
|
take: z.number().optional().default(50).describe("Number of results to return (default 50)"),
|
|
6253
6838
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination"),
|
|
6254
6839
|
filter: z.string().optional().describe("Filter redirects by URL")
|
|
6255
6840
|
};
|
|
6256
|
-
var
|
|
6841
|
+
var outputSchema101 = z.object({
|
|
6257
6842
|
items: z.array(
|
|
6258
6843
|
z.object({
|
|
6259
6844
|
id: z.string(),
|
|
@@ -6265,11 +6850,11 @@ var outputSchema89 = z.object({
|
|
|
6265
6850
|
).describe("URL redirects"),
|
|
6266
6851
|
total: z.number().describe("Total number of redirects")
|
|
6267
6852
|
});
|
|
6268
|
-
var
|
|
6853
|
+
var tool101 = {
|
|
6269
6854
|
name: "list-redirects",
|
|
6270
6855
|
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.",
|
|
6271
|
-
inputSchema:
|
|
6272
|
-
outputSchema:
|
|
6856
|
+
inputSchema: inputSchema101,
|
|
6857
|
+
outputSchema: outputSchema101,
|
|
6273
6858
|
slices: ["list"],
|
|
6274
6859
|
annotations: { readOnlyHint: true },
|
|
6275
6860
|
handler: async ({ take, skip, filter }) => {
|
|
@@ -6291,11 +6876,11 @@ var tool89 = {
|
|
|
6291
6876
|
});
|
|
6292
6877
|
}
|
|
6293
6878
|
};
|
|
6294
|
-
var list_redirects_default = withStandardDecorators(
|
|
6295
|
-
var
|
|
6879
|
+
var list_redirects_default = withStandardDecorators(tool101);
|
|
6880
|
+
var inputSchema102 = {
|
|
6296
6881
|
id: z.string().uuid().describe("The ID of the redirect to retrieve")
|
|
6297
6882
|
};
|
|
6298
|
-
var
|
|
6883
|
+
var outputSchema102 = z.object({
|
|
6299
6884
|
id: z.string(),
|
|
6300
6885
|
originalUrl: z.string(),
|
|
6301
6886
|
destinationUrl: z.string(),
|
|
@@ -6303,11 +6888,11 @@ var outputSchema90 = z.object({
|
|
|
6303
6888
|
isAutomatic: z.boolean(),
|
|
6304
6889
|
createDate: z.string()
|
|
6305
6890
|
});
|
|
6306
|
-
var
|
|
6891
|
+
var tool102 = {
|
|
6307
6892
|
name: "get-redirect",
|
|
6308
6893
|
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.",
|
|
6309
|
-
inputSchema:
|
|
6310
|
-
outputSchema:
|
|
6894
|
+
inputSchema: inputSchema102,
|
|
6895
|
+
outputSchema: outputSchema102,
|
|
6311
6896
|
slices: ["read"],
|
|
6312
6897
|
annotations: { readOnlyHint: true },
|
|
6313
6898
|
handler: async ({ id }) => {
|
|
@@ -6324,17 +6909,17 @@ var tool90 = {
|
|
|
6324
6909
|
});
|
|
6325
6910
|
}
|
|
6326
6911
|
};
|
|
6327
|
-
var get_redirect_default = withStandardDecorators(
|
|
6328
|
-
var
|
|
6329
|
-
var
|
|
6912
|
+
var get_redirect_default = withStandardDecorators(tool102);
|
|
6913
|
+
var inputSchema103 = {};
|
|
6914
|
+
var outputSchema103 = z.object({
|
|
6330
6915
|
isEnabled: z.boolean(),
|
|
6331
6916
|
message: z.string()
|
|
6332
6917
|
});
|
|
6333
|
-
var
|
|
6918
|
+
var tool103 = {
|
|
6334
6919
|
name: "get-redirect-status",
|
|
6335
6920
|
description: "Check whether automatic URL redirect tracking is enabled on the site. When enabled, Umbraco automatically creates redirects when pages are moved or renamed.",
|
|
6336
|
-
inputSchema:
|
|
6337
|
-
outputSchema:
|
|
6921
|
+
inputSchema: inputSchema103,
|
|
6922
|
+
outputSchema: outputSchema103,
|
|
6338
6923
|
slices: ["read"],
|
|
6339
6924
|
annotations: { readOnlyHint: true },
|
|
6340
6925
|
handler: async () => {
|
|
@@ -6347,20 +6932,20 @@ var tool91 = {
|
|
|
6347
6932
|
});
|
|
6348
6933
|
}
|
|
6349
6934
|
};
|
|
6350
|
-
var get_redirect_status_default = withStandardDecorators(
|
|
6351
|
-
var
|
|
6935
|
+
var get_redirect_status_default = withStandardDecorators(tool103);
|
|
6936
|
+
var inputSchema104 = {
|
|
6352
6937
|
id: z.string().uuid().describe("The ID of the redirect to delete")
|
|
6353
6938
|
};
|
|
6354
|
-
var
|
|
6939
|
+
var outputSchema104 = z.object({
|
|
6355
6940
|
message: z.string(),
|
|
6356
6941
|
id: z.string(),
|
|
6357
6942
|
originalUrl: z.string()
|
|
6358
6943
|
});
|
|
6359
|
-
var
|
|
6944
|
+
var tool104 = {
|
|
6360
6945
|
name: "delete-redirect",
|
|
6361
6946
|
description: "Delete a URL redirect. Visitors following the original URL will get a 404 error. You will be asked to confirm.",
|
|
6362
|
-
inputSchema:
|
|
6363
|
-
outputSchema:
|
|
6947
|
+
inputSchema: inputSchema104,
|
|
6948
|
+
outputSchema: outputSchema104,
|
|
6364
6949
|
slices: ["delete"],
|
|
6365
6950
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
6366
6951
|
handler: async ({ id }, extra) => {
|
|
@@ -6391,10 +6976,10 @@ var tool92 = {
|
|
|
6391
6976
|
});
|
|
6392
6977
|
}
|
|
6393
6978
|
};
|
|
6394
|
-
var delete_redirect_default = withStandardDecorators(
|
|
6979
|
+
var delete_redirect_default = withStandardDecorators(tool104);
|
|
6395
6980
|
|
|
6396
6981
|
// src/umbraco-api/tools/redirect/index.ts
|
|
6397
|
-
var
|
|
6982
|
+
var collection19 = {
|
|
6398
6983
|
metadata: {
|
|
6399
6984
|
name: "redirect",
|
|
6400
6985
|
displayName: "Redirects",
|
|
@@ -6402,12 +6987,12 @@ var collection18 = {
|
|
|
6402
6987
|
},
|
|
6403
6988
|
tools: () => [list_redirects_default, get_redirect_default, get_redirect_status_default, delete_redirect_default]
|
|
6404
6989
|
};
|
|
6405
|
-
var redirect_default =
|
|
6406
|
-
var
|
|
6990
|
+
var redirect_default = collection19;
|
|
6991
|
+
var inputSchema105 = {
|
|
6407
6992
|
id: z.string().uuid().describe("The ID of the content page or media item to look up references for"),
|
|
6408
6993
|
type: z.enum(["document", "media"]).describe("Whether the ID refers to a content document or a media item")
|
|
6409
6994
|
};
|
|
6410
|
-
var
|
|
6995
|
+
var outputSchema105 = z.object({
|
|
6411
6996
|
id: z.string(),
|
|
6412
6997
|
name: z.string(),
|
|
6413
6998
|
url: z.string(),
|
|
@@ -6422,11 +7007,11 @@ var outputSchema93 = z.object({
|
|
|
6422
7007
|
).describe("Pages that reference this item"),
|
|
6423
7008
|
referenceCount: z.number().describe("Total number of pages referencing this item")
|
|
6424
7009
|
});
|
|
6425
|
-
var
|
|
7010
|
+
var tool105 = {
|
|
6426
7011
|
name: "report-content-references",
|
|
6427
7012
|
description: "Find which pages reference a given content page or media item. Useful before deleting or restructuring content to understand the impact.",
|
|
6428
|
-
inputSchema:
|
|
6429
|
-
outputSchema:
|
|
7013
|
+
inputSchema: inputSchema105,
|
|
7014
|
+
outputSchema: outputSchema105,
|
|
6430
7015
|
slices: ["read"],
|
|
6431
7016
|
annotations: { readOnlyHint: true },
|
|
6432
7017
|
handler: async ({ id, type }) => {
|
|
@@ -6516,18 +7101,18 @@ var tool93 = {
|
|
|
6516
7101
|
}
|
|
6517
7102
|
}
|
|
6518
7103
|
};
|
|
6519
|
-
var report_content_references_default = withStandardDecorators(
|
|
7104
|
+
var report_content_references_default = withStandardDecorators(tool105);
|
|
6520
7105
|
|
|
6521
7106
|
// src/umbraco-api/tools/helpers/link-extractor.ts
|
|
6522
7107
|
var UUID_REGEX = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;
|
|
6523
|
-
function
|
|
7108
|
+
function isBlockListOrGridValue3(value) {
|
|
6524
7109
|
return value !== null && typeof value === "object" && !Array.isArray(value) && Array.isArray(value.contentData);
|
|
6525
7110
|
}
|
|
6526
|
-
function
|
|
7111
|
+
function isRteWithBlocks3(value) {
|
|
6527
7112
|
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);
|
|
6528
7113
|
}
|
|
6529
7114
|
function isPlainRteValue(value) {
|
|
6530
|
-
return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && !
|
|
7115
|
+
return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.markup === "string" && !isRteWithBlocks3(value);
|
|
6531
7116
|
}
|
|
6532
7117
|
function extractHrefUrls(html) {
|
|
6533
7118
|
const urls = [];
|
|
@@ -6637,7 +7222,7 @@ function extractLinksFromValues(values) {
|
|
|
6637
7222
|
return;
|
|
6638
7223
|
}
|
|
6639
7224
|
if (typeof val === "object") {
|
|
6640
|
-
if (
|
|
7225
|
+
if (isRteWithBlocks3(val)) {
|
|
6641
7226
|
processHtml(val.markup);
|
|
6642
7227
|
const blockValues = extractBlockValues(val.blocks.contentData);
|
|
6643
7228
|
for (const bv of blockValues) processValue(bv);
|
|
@@ -6647,7 +7232,7 @@ function extractLinksFromValues(values) {
|
|
|
6647
7232
|
processHtml(val.markup);
|
|
6648
7233
|
return;
|
|
6649
7234
|
}
|
|
6650
|
-
if (
|
|
7235
|
+
if (isBlockListOrGridValue3(val)) {
|
|
6651
7236
|
const blockValues = extractBlockValues(val.contentData);
|
|
6652
7237
|
for (const bv of blockValues) processValue(bv);
|
|
6653
7238
|
return;
|
|
@@ -6714,10 +7299,10 @@ async function resolveOutboundIds(candidateIds, excludeId) {
|
|
|
6714
7299
|
}
|
|
6715
7300
|
|
|
6716
7301
|
// src/umbraco-api/tools/relationships/get/report-outbound-links.ts
|
|
6717
|
-
var
|
|
7302
|
+
var inputSchema106 = {
|
|
6718
7303
|
id: z.string().uuid().describe("The ID of the page to analyze for outbound links")
|
|
6719
7304
|
};
|
|
6720
|
-
var
|
|
7305
|
+
var outputSchema106 = z.object({
|
|
6721
7306
|
id: z.string(),
|
|
6722
7307
|
name: z.string(),
|
|
6723
7308
|
url: z.string(),
|
|
@@ -6749,11 +7334,11 @@ var outputSchema94 = z.object({
|
|
|
6749
7334
|
totalLinks: z.number()
|
|
6750
7335
|
})
|
|
6751
7336
|
});
|
|
6752
|
-
var
|
|
7337
|
+
var tool106 = {
|
|
6753
7338
|
name: "report-outbound-links",
|
|
6754
7339
|
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.",
|
|
6755
|
-
inputSchema:
|
|
6756
|
-
outputSchema:
|
|
7340
|
+
inputSchema: inputSchema106,
|
|
7341
|
+
outputSchema: outputSchema106,
|
|
6757
7342
|
slices: ["read"],
|
|
6758
7343
|
annotations: { readOnlyHint: true },
|
|
6759
7344
|
handler: async ({ id }) => {
|
|
@@ -6782,10 +7367,10 @@ var tool94 = {
|
|
|
6782
7367
|
});
|
|
6783
7368
|
}
|
|
6784
7369
|
};
|
|
6785
|
-
var report_outbound_links_default = withStandardDecorators(
|
|
7370
|
+
var report_outbound_links_default = withStandardDecorators(tool106);
|
|
6786
7371
|
|
|
6787
7372
|
// src/umbraco-api/tools/relationships/index.ts
|
|
6788
|
-
var
|
|
7373
|
+
var collection20 = {
|
|
6789
7374
|
metadata: {
|
|
6790
7375
|
name: "relationships",
|
|
6791
7376
|
displayName: "Content Relationships",
|
|
@@ -6793,11 +7378,11 @@ var collection19 = {
|
|
|
6793
7378
|
},
|
|
6794
7379
|
tools: () => [report_content_references_default, report_outbound_links_default]
|
|
6795
7380
|
};
|
|
6796
|
-
var relationships_default =
|
|
6797
|
-
var
|
|
7381
|
+
var relationships_default = collection20;
|
|
7382
|
+
var inputSchema107 = {
|
|
6798
7383
|
id: z.string().uuid().describe("The ID of the content page to read public access settings for")
|
|
6799
7384
|
};
|
|
6800
|
-
var
|
|
7385
|
+
var outputSchema107 = z.object({
|
|
6801
7386
|
hasRestrictions: z.boolean().describe("True if the page has public access rules configured"),
|
|
6802
7387
|
memberGroups: z.array(z.object({
|
|
6803
7388
|
id: z.string(),
|
|
@@ -6808,11 +7393,11 @@ var outputSchema95 = z.object({
|
|
|
6808
7393
|
errorPageId: z.string().nullable().describe("The ID of the page shown when an authenticated visitor is denied access"),
|
|
6809
7394
|
message: z.string().describe("Human-readable summary of the access rules")
|
|
6810
7395
|
});
|
|
6811
|
-
var
|
|
7396
|
+
var tool107 = {
|
|
6812
7397
|
name: "get-public-access",
|
|
6813
7398
|
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.",
|
|
6814
|
-
inputSchema:
|
|
6815
|
-
outputSchema:
|
|
7399
|
+
inputSchema: inputSchema107,
|
|
7400
|
+
outputSchema: outputSchema107,
|
|
6816
7401
|
slices: ["read"],
|
|
6817
7402
|
annotations: { readOnlyHint: true },
|
|
6818
7403
|
handler: async ({ id }) => {
|
|
@@ -6845,15 +7430,15 @@ var tool95 = {
|
|
|
6845
7430
|
});
|
|
6846
7431
|
}
|
|
6847
7432
|
};
|
|
6848
|
-
var get_public_access_default = withStandardDecorators(
|
|
6849
|
-
var
|
|
7433
|
+
var get_public_access_default = withStandardDecorators(tool107);
|
|
7434
|
+
var inputSchema108 = {
|
|
6850
7435
|
id: z.string().uuid().describe("The ID of the content page to restrict"),
|
|
6851
7436
|
memberGroupNames: z.array(z.string()).describe("Names of member groups allowed to view the page. Use list-member-groups to look up existing groups."),
|
|
6852
7437
|
loginPageId: z.string().uuid().describe("The ID of the page visitors are redirected to when login is required"),
|
|
6853
7438
|
errorPageId: z.string().uuid().describe("The ID of the page shown when an authenticated visitor is denied access"),
|
|
6854
7439
|
memberUserNames: z.array(z.string()).optional().describe("Optional: specific member usernames allowed to view the page (in addition to group members)")
|
|
6855
7440
|
};
|
|
6856
|
-
var
|
|
7441
|
+
var outputSchema108 = z.object({
|
|
6857
7442
|
message: z.string(),
|
|
6858
7443
|
id: z.string(),
|
|
6859
7444
|
memberGroupNames: z.array(z.string()),
|
|
@@ -6861,11 +7446,11 @@ var outputSchema96 = z.object({
|
|
|
6861
7446
|
loginPageId: z.string(),
|
|
6862
7447
|
errorPageId: z.string()
|
|
6863
7448
|
});
|
|
6864
|
-
var
|
|
7449
|
+
var tool108 = {
|
|
6865
7450
|
name: "set-public-access",
|
|
6866
7451
|
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.",
|
|
6867
|
-
inputSchema:
|
|
6868
|
-
outputSchema:
|
|
7452
|
+
inputSchema: inputSchema108,
|
|
7453
|
+
outputSchema: outputSchema108,
|
|
6869
7454
|
slices: ["update"],
|
|
6870
7455
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
6871
7456
|
handler: async ({ id, memberGroupNames, loginPageId, errorPageId, memberUserNames }, extra) => {
|
|
@@ -6903,19 +7488,19 @@ var tool96 = {
|
|
|
6903
7488
|
});
|
|
6904
7489
|
}
|
|
6905
7490
|
};
|
|
6906
|
-
var set_public_access_default = withStandardDecorators(
|
|
6907
|
-
var
|
|
7491
|
+
var set_public_access_default = withStandardDecorators(tool108);
|
|
7492
|
+
var inputSchema109 = {
|
|
6908
7493
|
id: z.string().uuid().describe("The ID of the content page to remove public access restrictions from")
|
|
6909
7494
|
};
|
|
6910
|
-
var
|
|
7495
|
+
var outputSchema109 = z.object({
|
|
6911
7496
|
message: z.string(),
|
|
6912
7497
|
id: z.string()
|
|
6913
7498
|
});
|
|
6914
|
-
var
|
|
7499
|
+
var tool109 = {
|
|
6915
7500
|
name: "remove-public-access",
|
|
6916
7501
|
description: "Remove all public access restrictions from a content page, making it publicly viewable again. You will be asked to confirm.",
|
|
6917
|
-
inputSchema:
|
|
6918
|
-
outputSchema:
|
|
7502
|
+
inputSchema: inputSchema109,
|
|
7503
|
+
outputSchema: outputSchema109,
|
|
6919
7504
|
slices: ["delete"],
|
|
6920
7505
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
6921
7506
|
handler: async ({ id }, extra) => {
|
|
@@ -6930,10 +7515,10 @@ var tool97 = {
|
|
|
6930
7515
|
});
|
|
6931
7516
|
}
|
|
6932
7517
|
};
|
|
6933
|
-
var remove_public_access_default = withStandardDecorators(
|
|
7518
|
+
var remove_public_access_default = withStandardDecorators(tool109);
|
|
6934
7519
|
|
|
6935
7520
|
// src/umbraco-api/tools/public-access/index.ts
|
|
6936
|
-
var
|
|
7521
|
+
var collection21 = {
|
|
6937
7522
|
metadata: {
|
|
6938
7523
|
name: "public-access",
|
|
6939
7524
|
displayName: "Public Access",
|
|
@@ -6941,7 +7526,7 @@ var collection20 = {
|
|
|
6941
7526
|
},
|
|
6942
7527
|
tools: () => [get_public_access_default, set_public_access_default, remove_public_access_default]
|
|
6943
7528
|
};
|
|
6944
|
-
var public_access_default =
|
|
7529
|
+
var public_access_default = collection21;
|
|
6945
7530
|
|
|
6946
7531
|
// src/umbraco-api/tools/helpers/runtime.ts
|
|
6947
7532
|
var isHostedRuntime = () => {
|
|
@@ -6951,7 +7536,7 @@ var isHostedRuntime = () => {
|
|
|
6951
7536
|
};
|
|
6952
7537
|
|
|
6953
7538
|
// src/umbraco-api/tools/notifications/get/get-content-notifications.ts
|
|
6954
|
-
var
|
|
7539
|
+
var inputSchema110 = {
|
|
6955
7540
|
id: z.string().uuid().describe("UUID of the content page to read notification subscriptions for")
|
|
6956
7541
|
};
|
|
6957
7542
|
var subscriptionSchema = z.object({
|
|
@@ -6959,16 +7544,16 @@ var subscriptionSchema = z.object({
|
|
|
6959
7544
|
alias: z.string().describe("Human-readable action alias (e.g. publish, unpublish, save, delete)"),
|
|
6960
7545
|
subscribed: z.boolean().describe("True if the current user is subscribed to this action")
|
|
6961
7546
|
});
|
|
6962
|
-
var
|
|
7547
|
+
var outputSchema110 = z.object({
|
|
6963
7548
|
id: z.string(),
|
|
6964
7549
|
subscriptions: z.array(subscriptionSchema),
|
|
6965
7550
|
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")
|
|
6966
7551
|
});
|
|
6967
|
-
var
|
|
7552
|
+
var tool110 = {
|
|
6968
7553
|
name: "get-content-notifications",
|
|
6969
7554
|
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.",
|
|
6970
|
-
inputSchema:
|
|
6971
|
-
outputSchema:
|
|
7555
|
+
inputSchema: inputSchema110,
|
|
7556
|
+
outputSchema: outputSchema110,
|
|
6972
7557
|
slices: ["read"],
|
|
6973
7558
|
annotations: { readOnlyHint: true },
|
|
6974
7559
|
enabled: isHostedRuntime,
|
|
@@ -6984,21 +7569,21 @@ var tool98 = {
|
|
|
6984
7569
|
return createToolResult({ id, subscriptions, subscribedActionIds });
|
|
6985
7570
|
}
|
|
6986
7571
|
};
|
|
6987
|
-
var get_content_notifications_default = withStandardDecorators(
|
|
6988
|
-
var
|
|
7572
|
+
var get_content_notifications_default = withStandardDecorators(tool110);
|
|
7573
|
+
var inputSchema111 = {
|
|
6989
7574
|
id: z.string().uuid().describe("UUID of the content page to update notification subscriptions for"),
|
|
6990
7575
|
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.")
|
|
6991
7576
|
};
|
|
6992
|
-
var
|
|
7577
|
+
var outputSchema111 = z.object({
|
|
6993
7578
|
message: z.string(),
|
|
6994
7579
|
id: z.string(),
|
|
6995
7580
|
subscribedActionIds: z.array(z.string())
|
|
6996
7581
|
});
|
|
6997
|
-
var
|
|
7582
|
+
var tool111 = {
|
|
6998
7583
|
name: "set-content-notifications",
|
|
6999
7584
|
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.",
|
|
7000
|
-
inputSchema:
|
|
7001
|
-
outputSchema:
|
|
7585
|
+
inputSchema: inputSchema111,
|
|
7586
|
+
outputSchema: outputSchema111,
|
|
7002
7587
|
slices: ["update"],
|
|
7003
7588
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
7004
7589
|
enabled: isHostedRuntime,
|
|
@@ -7016,10 +7601,10 @@ var tool99 = {
|
|
|
7016
7601
|
});
|
|
7017
7602
|
}
|
|
7018
7603
|
};
|
|
7019
|
-
var set_content_notifications_default = withStandardDecorators(
|
|
7604
|
+
var set_content_notifications_default = withStandardDecorators(tool111);
|
|
7020
7605
|
|
|
7021
7606
|
// src/umbraco-api/tools/notifications/index.ts
|
|
7022
|
-
var
|
|
7607
|
+
var collection22 = {
|
|
7023
7608
|
metadata: {
|
|
7024
7609
|
name: "notifications",
|
|
7025
7610
|
displayName: "Content Notifications",
|
|
@@ -7027,7 +7612,7 @@ var collection21 = {
|
|
|
7027
7612
|
},
|
|
7028
7613
|
tools: () => isHostedRuntime() ? [get_content_notifications_default, set_content_notifications_default] : []
|
|
7029
7614
|
};
|
|
7030
|
-
var notifications_default =
|
|
7615
|
+
var notifications_default = collection22;
|
|
7031
7616
|
var mediaTools = {
|
|
7032
7617
|
listRoot: "get-recycle-bin-media-root",
|
|
7033
7618
|
listChildren: "get-recycle-bin-media-children",
|
|
@@ -7090,13 +7675,13 @@ function formatNamePreview(names, total) {
|
|
|
7090
7675
|
}
|
|
7091
7676
|
|
|
7092
7677
|
// src/umbraco-api/tools/recycle-bin/get/list-recycle-bin.ts
|
|
7093
|
-
var
|
|
7678
|
+
var inputSchema112 = {
|
|
7094
7679
|
type: z.enum(["content", "media"]).describe("Which recycle bin to list: content (pages) or media."),
|
|
7095
7680
|
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."),
|
|
7096
7681
|
take: z.number().optional().default(20).describe("Number of results to return (default 20)"),
|
|
7097
7682
|
skip: z.number().optional().default(0).describe("Number of results to skip for pagination")
|
|
7098
7683
|
};
|
|
7099
|
-
var
|
|
7684
|
+
var outputSchema112 = z.object({
|
|
7100
7685
|
items: z.array(z.object({
|
|
7101
7686
|
id: z.string(),
|
|
7102
7687
|
name: z.string(),
|
|
@@ -7105,11 +7690,11 @@ var outputSchema100 = z.object({
|
|
|
7105
7690
|
})).describe("Trashed items at this level of the recycle bin"),
|
|
7106
7691
|
total: z.number().describe("Total number of trashed items at this level (before pagination)")
|
|
7107
7692
|
});
|
|
7108
|
-
var
|
|
7693
|
+
var tool112 = {
|
|
7109
7694
|
name: "list-recycle-bin",
|
|
7110
7695
|
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.",
|
|
7111
|
-
inputSchema:
|
|
7112
|
-
outputSchema:
|
|
7696
|
+
inputSchema: inputSchema112,
|
|
7697
|
+
outputSchema: outputSchema112,
|
|
7113
7698
|
slices: ["list", "tree"],
|
|
7114
7699
|
annotations: { readOnlyHint: true },
|
|
7115
7700
|
handler: async ({ type, parentId, take, skip }) => {
|
|
@@ -7132,22 +7717,22 @@ var tool100 = {
|
|
|
7132
7717
|
});
|
|
7133
7718
|
}
|
|
7134
7719
|
};
|
|
7135
|
-
var list_recycle_bin_default = withStandardDecorators(
|
|
7136
|
-
var
|
|
7720
|
+
var list_recycle_bin_default = withStandardDecorators(tool112);
|
|
7721
|
+
var inputSchema113 = {
|
|
7137
7722
|
id: z.string().uuid().describe("ID of the trashed item to permanently delete."),
|
|
7138
7723
|
type: z.enum(["content", "media"]).describe("Which recycle bin the item is in.")
|
|
7139
7724
|
};
|
|
7140
|
-
var
|
|
7725
|
+
var outputSchema113 = z.object({
|
|
7141
7726
|
message: z.string(),
|
|
7142
7727
|
id: z.string(),
|
|
7143
7728
|
name: z.string(),
|
|
7144
7729
|
descendantCount: z.number().optional().describe("Descendants also deleted when the item was a folder")
|
|
7145
7730
|
});
|
|
7146
|
-
var
|
|
7731
|
+
var tool113 = {
|
|
7147
7732
|
name: "permanent-delete-recycle-bin-item",
|
|
7148
7733
|
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.",
|
|
7149
|
-
inputSchema:
|
|
7150
|
-
outputSchema:
|
|
7734
|
+
inputSchema: inputSchema113,
|
|
7735
|
+
outputSchema: outputSchema113,
|
|
7151
7736
|
slices: ["delete"],
|
|
7152
7737
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
7153
7738
|
handler: async ({ id, type }, extra) => {
|
|
@@ -7194,20 +7779,20 @@ var tool101 = {
|
|
|
7194
7779
|
});
|
|
7195
7780
|
}
|
|
7196
7781
|
};
|
|
7197
|
-
var permanent_delete_recycle_bin_item_default = withStandardDecorators(
|
|
7198
|
-
var
|
|
7782
|
+
var permanent_delete_recycle_bin_item_default = withStandardDecorators(tool113);
|
|
7783
|
+
var inputSchema114 = {
|
|
7199
7784
|
type: z.enum(["content", "media"]).describe("Which recycle bin to empty.")
|
|
7200
7785
|
};
|
|
7201
|
-
var
|
|
7786
|
+
var outputSchema114 = z.object({
|
|
7202
7787
|
message: z.string(),
|
|
7203
7788
|
type: z.enum(["content", "media"]),
|
|
7204
7789
|
topLevelCount: z.number().describe("Number of top-level items that were in the bin before emptying (descendants are not counted).")
|
|
7205
7790
|
});
|
|
7206
|
-
var
|
|
7791
|
+
var tool114 = {
|
|
7207
7792
|
name: "empty-recycle-bin",
|
|
7208
7793
|
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.",
|
|
7209
|
-
inputSchema:
|
|
7210
|
-
outputSchema:
|
|
7794
|
+
inputSchema: inputSchema114,
|
|
7795
|
+
outputSchema: outputSchema114,
|
|
7211
7796
|
slices: ["delete"],
|
|
7212
7797
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
7213
7798
|
handler: async ({ type }, extra) => {
|
|
@@ -7252,10 +7837,10 @@ var tool102 = {
|
|
|
7252
7837
|
});
|
|
7253
7838
|
}
|
|
7254
7839
|
};
|
|
7255
|
-
var empty_recycle_bin_default = withStandardDecorators(
|
|
7840
|
+
var empty_recycle_bin_default = withStandardDecorators(tool114);
|
|
7256
7841
|
|
|
7257
7842
|
// src/umbraco-api/tools/recycle-bin/index.ts
|
|
7258
|
-
var
|
|
7843
|
+
var collection23 = {
|
|
7259
7844
|
metadata: {
|
|
7260
7845
|
name: "recycle-bin",
|
|
7261
7846
|
displayName: "Recycle Bin",
|
|
@@ -7263,9 +7848,9 @@ var collection22 = {
|
|
|
7263
7848
|
},
|
|
7264
7849
|
tools: () => [list_recycle_bin_default, permanent_delete_recycle_bin_item_default, empty_recycle_bin_default]
|
|
7265
7850
|
};
|
|
7266
|
-
var recycle_bin_default =
|
|
7267
|
-
var
|
|
7268
|
-
var
|
|
7851
|
+
var recycle_bin_default = collection23;
|
|
7852
|
+
var inputSchema115 = {};
|
|
7853
|
+
var outputSchema115 = z.object({
|
|
7269
7854
|
id: z.string(),
|
|
7270
7855
|
name: z.string(),
|
|
7271
7856
|
userName: z.string(),
|
|
@@ -7287,11 +7872,11 @@ var outputSchema103 = z.object({
|
|
|
7287
7872
|
documentStartNodeIds: z.array(z.string()).describe("Content node IDs the user is restricted to. Empty when hasDocumentRootAccess is true."),
|
|
7288
7873
|
mediaStartNodeIds: z.array(z.string()).describe("Media node IDs the user is restricted to. Empty when hasMediaRootAccess is true.")
|
|
7289
7874
|
});
|
|
7290
|
-
var
|
|
7875
|
+
var tool115 = {
|
|
7291
7876
|
name: "get-current-user",
|
|
7292
7877
|
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.",
|
|
7293
|
-
inputSchema:
|
|
7294
|
-
outputSchema:
|
|
7878
|
+
inputSchema: inputSchema115,
|
|
7879
|
+
outputSchema: outputSchema115,
|
|
7295
7880
|
slices: ["read"],
|
|
7296
7881
|
annotations: { readOnlyHint: true },
|
|
7297
7882
|
handler: async () => {
|
|
@@ -7330,10 +7915,10 @@ var tool103 = {
|
|
|
7330
7915
|
});
|
|
7331
7916
|
}
|
|
7332
7917
|
};
|
|
7333
|
-
var get_current_user_default = withStandardDecorators(
|
|
7918
|
+
var get_current_user_default = withStandardDecorators(tool115);
|
|
7334
7919
|
|
|
7335
7920
|
// src/umbraco-api/tools/account/index.ts
|
|
7336
|
-
var
|
|
7921
|
+
var collection24 = {
|
|
7337
7922
|
metadata: {
|
|
7338
7923
|
name: "account",
|
|
7339
7924
|
displayName: "Account",
|
|
@@ -7341,7 +7926,7 @@ var collection23 = {
|
|
|
7341
7926
|
},
|
|
7342
7927
|
tools: () => [get_current_user_default]
|
|
7343
7928
|
};
|
|
7344
|
-
var account_default =
|
|
7929
|
+
var account_default = collection24;
|
|
7345
7930
|
|
|
7346
7931
|
// src/config/mode-registry.ts
|
|
7347
7932
|
var toolModes = [
|
|
@@ -7357,6 +7942,12 @@ var toolModes = [
|
|
|
7357
7942
|
description: "Browse, search, upload, and manage media files and folders",
|
|
7358
7943
|
collections: ["media", "media-management"]
|
|
7359
7944
|
},
|
|
7945
|
+
{
|
|
7946
|
+
name: "library",
|
|
7947
|
+
displayName: "Library Elements",
|
|
7948
|
+
description: "Browse, view, and manage reusable Library elements (Umbraco 18 Library section)",
|
|
7949
|
+
collections: ["element"]
|
|
7950
|
+
},
|
|
7360
7951
|
{
|
|
7361
7952
|
name: "blueprints",
|
|
7362
7953
|
displayName: "Blueprints",
|
|
@@ -7467,6 +8058,7 @@ var collections = [
|
|
|
7467
8058
|
versioning_default,
|
|
7468
8059
|
media_default,
|
|
7469
8060
|
media_management_default,
|
|
8061
|
+
element_default,
|
|
7470
8062
|
blueprint_default,
|
|
7471
8063
|
language_default,
|
|
7472
8064
|
translation_default,
|