@umbraco-cms/mcp-dev 17.3.7 → 17.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;var __create = Object.create;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -123,6 +123,15 @@ var getUmbracoManagementAPI = () => {
123
123
  options
124
124
  );
125
125
  };
126
+ const getDataTypeByIdSchema = (id, options) => {
127
+ return UmbracoManagementClient(
128
+ {
129
+ url: `/umbraco/management/api/v1/data-type/${id}/schema`,
130
+ method: "GET"
131
+ },
132
+ options
133
+ );
134
+ };
126
135
  const getDataTypeBatch = (params, options) => {
127
136
  return UmbracoManagementClient(
128
137
  {
@@ -182,6 +191,16 @@ var getUmbracoManagementAPI = () => {
182
191
  options
183
192
  );
184
193
  };
194
+ const getDataTypeSchemasBatch = (params, options) => {
195
+ return UmbracoManagementClient(
196
+ {
197
+ url: `/umbraco/management/api/v1/data-type/schemas/batch`,
198
+ method: "GET",
199
+ params
200
+ },
201
+ options
202
+ );
203
+ };
185
204
  const getFilterDataType = (params, options) => {
186
205
  return UmbracoManagementClient(
187
206
  {
@@ -435,6 +454,16 @@ var getUmbracoManagementAPI = () => {
435
454
  options
436
455
  );
437
456
  };
457
+ const getDocumentBlueprintByIdAuditLog = (id, params, options) => {
458
+ return UmbracoManagementClient(
459
+ {
460
+ url: `/umbraco/management/api/v1/document-blueprint/${id}/audit-log`,
461
+ method: "GET",
462
+ params
463
+ },
464
+ options
465
+ );
466
+ };
438
467
  const putDocumentBlueprintByIdMove = (id, moveDocumentBlueprintRequestModel, options) => {
439
468
  return UmbracoManagementClient(
440
469
  {
@@ -677,6 +706,15 @@ var getUmbracoManagementAPI = () => {
677
706
  options
678
707
  );
679
708
  };
709
+ const getDocumentTypeByIdSchema = (id, options) => {
710
+ return UmbracoManagementClient(
711
+ {
712
+ url: `/umbraco/management/api/v1/document-type/${id}/schema`,
713
+ method: "GET"
714
+ },
715
+ options
716
+ );
717
+ };
680
718
  const postDocumentTypeByIdTemplate = (id, createDocumentTypeTemplateRequestModel, options) => {
681
719
  return UmbracoManagementClient(
682
720
  {
@@ -1039,6 +1077,17 @@ var getUmbracoManagementAPI = () => {
1039
1077
  options
1040
1078
  );
1041
1079
  };
1080
+ const patchDocumentByIdPatch = (id, patchDocumentRequestModel, options) => {
1081
+ return UmbracoManagementClient(
1082
+ {
1083
+ url: `/umbraco/management/api/v1/document/${id}/patch`,
1084
+ method: "PATCH",
1085
+ headers: { "Content-Type": "application/json-patch+json" },
1086
+ data: patchDocumentRequestModel
1087
+ },
1088
+ options
1089
+ );
1090
+ };
1042
1091
  const getDocumentByIdPreviewUrl = (id, params, options) => {
1043
1092
  return UmbracoManagementClient(
1044
1093
  {
@@ -1865,6 +1914,15 @@ var getUmbracoManagementAPI = () => {
1865
1914
  options
1866
1915
  );
1867
1916
  };
1917
+ const getMediaTypeByIdSchema = (id, options) => {
1918
+ return UmbracoManagementClient(
1919
+ {
1920
+ url: `/umbraco/management/api/v1/media-type/${id}/schema`,
1921
+ method: "GET"
1922
+ },
1923
+ options
1924
+ );
1925
+ };
1868
1926
  const getMediaTypeAllowedAtRoot = (params, options) => {
1869
1927
  return UmbracoManagementClient(
1870
1928
  {
@@ -2498,6 +2556,25 @@ var getUmbracoManagementAPI = () => {
2498
2556
  options
2499
2557
  );
2500
2558
  };
2559
+ const getMemberTypeByIdSchema = (id, options) => {
2560
+ return UmbracoManagementClient(
2561
+ {
2562
+ url: `/umbraco/management/api/v1/member-type/${id}/schema`,
2563
+ method: "GET"
2564
+ },
2565
+ options
2566
+ );
2567
+ };
2568
+ const getMemberTypeAllowedAtRoot = (params, options) => {
2569
+ return UmbracoManagementClient(
2570
+ {
2571
+ url: `/umbraco/management/api/v1/member-type/allowed-at-root`,
2572
+ method: "GET",
2573
+ params
2574
+ },
2575
+ options
2576
+ );
2577
+ };
2501
2578
  const postMemberTypeAvailableCompositions = (memberTypeCompositionRequestModel, options) => {
2502
2579
  return UmbracoManagementClient(
2503
2580
  {
@@ -2925,28 +3002,28 @@ var getUmbracoManagementAPI = () => {
2925
3002
  options
2926
3003
  );
2927
3004
  };
2928
- const getPartialViewByPath = (path4, options) => {
3005
+ const getPartialViewByPath = (path3, options) => {
2929
3006
  return UmbracoManagementClient(
2930
3007
  {
2931
- url: `/umbraco/management/api/v1/partial-view/${path4}`,
3008
+ url: `/umbraco/management/api/v1/partial-view/${path3}`,
2932
3009
  method: "GET"
2933
3010
  },
2934
3011
  options
2935
3012
  );
2936
3013
  };
2937
- const deletePartialViewByPath = (path4, options) => {
3014
+ const deletePartialViewByPath = (path3, options) => {
2938
3015
  return UmbracoManagementClient(
2939
3016
  {
2940
- url: `/umbraco/management/api/v1/partial-view/${path4}`,
3017
+ url: `/umbraco/management/api/v1/partial-view/${path3}`,
2941
3018
  method: "DELETE"
2942
3019
  },
2943
3020
  options
2944
3021
  );
2945
3022
  };
2946
- const putPartialViewByPath = (path4, updatePartialViewRequestModel, options) => {
3023
+ const putPartialViewByPath = (path3, updatePartialViewRequestModel, options) => {
2947
3024
  return UmbracoManagementClient(
2948
3025
  {
2949
- url: `/umbraco/management/api/v1/partial-view/${path4}`,
3026
+ url: `/umbraco/management/api/v1/partial-view/${path3}`,
2950
3027
  method: "PUT",
2951
3028
  headers: { "Content-Type": "application/json" },
2952
3029
  data: updatePartialViewRequestModel
@@ -2954,10 +3031,10 @@ var getUmbracoManagementAPI = () => {
2954
3031
  options
2955
3032
  );
2956
3033
  };
2957
- const putPartialViewByPathRename = (path4, renamePartialViewRequestModel, options) => {
3034
+ const putPartialViewByPathRename = (path3, renamePartialViewRequestModel, options) => {
2958
3035
  return UmbracoManagementClient(
2959
3036
  {
2960
- url: `/umbraco/management/api/v1/partial-view/${path4}/rename`,
3037
+ url: `/umbraco/management/api/v1/partial-view/${path3}/rename`,
2961
3038
  method: "PUT",
2962
3039
  headers: { "Content-Type": "application/json" },
2963
3040
  data: renamePartialViewRequestModel
@@ -2976,19 +3053,19 @@ var getUmbracoManagementAPI = () => {
2976
3053
  options
2977
3054
  );
2978
3055
  };
2979
- const getPartialViewFolderByPath = (path4, options) => {
3056
+ const getPartialViewFolderByPath = (path3, options) => {
2980
3057
  return UmbracoManagementClient(
2981
3058
  {
2982
- url: `/umbraco/management/api/v1/partial-view/folder/${path4}`,
3059
+ url: `/umbraco/management/api/v1/partial-view/folder/${path3}`,
2983
3060
  method: "GET"
2984
3061
  },
2985
3062
  options
2986
3063
  );
2987
3064
  };
2988
- const deletePartialViewFolderByPath = (path4, options) => {
3065
+ const deletePartialViewFolderByPath = (path3, options) => {
2989
3066
  return UmbracoManagementClient(
2990
3067
  {
2991
- url: `/umbraco/management/api/v1/partial-view/folder/${path4}`,
3068
+ url: `/umbraco/management/api/v1/partial-view/folder/${path3}`,
2992
3069
  method: "DELETE"
2993
3070
  },
2994
3071
  options
@@ -3236,28 +3313,28 @@ var getUmbracoManagementAPI = () => {
3236
3313
  options
3237
3314
  );
3238
3315
  };
3239
- const getScriptByPath = (path4, options) => {
3316
+ const getScriptByPath = (path3, options) => {
3240
3317
  return UmbracoManagementClient(
3241
3318
  {
3242
- url: `/umbraco/management/api/v1/script/${path4}`,
3319
+ url: `/umbraco/management/api/v1/script/${path3}`,
3243
3320
  method: "GET"
3244
3321
  },
3245
3322
  options
3246
3323
  );
3247
3324
  };
3248
- const deleteScriptByPath = (path4, options) => {
3325
+ const deleteScriptByPath = (path3, options) => {
3249
3326
  return UmbracoManagementClient(
3250
3327
  {
3251
- url: `/umbraco/management/api/v1/script/${path4}`,
3328
+ url: `/umbraco/management/api/v1/script/${path3}`,
3252
3329
  method: "DELETE"
3253
3330
  },
3254
3331
  options
3255
3332
  );
3256
3333
  };
3257
- const putScriptByPath = (path4, updateScriptRequestModel, options) => {
3334
+ const putScriptByPath = (path3, updateScriptRequestModel, options) => {
3258
3335
  return UmbracoManagementClient(
3259
3336
  {
3260
- url: `/umbraco/management/api/v1/script/${path4}`,
3337
+ url: `/umbraco/management/api/v1/script/${path3}`,
3261
3338
  method: "PUT",
3262
3339
  headers: { "Content-Type": "application/json" },
3263
3340
  data: updateScriptRequestModel
@@ -3265,10 +3342,10 @@ var getUmbracoManagementAPI = () => {
3265
3342
  options
3266
3343
  );
3267
3344
  };
3268
- const putScriptByPathRename = (path4, renameScriptRequestModel, options) => {
3345
+ const putScriptByPathRename = (path3, renameScriptRequestModel, options) => {
3269
3346
  return UmbracoManagementClient(
3270
3347
  {
3271
- url: `/umbraco/management/api/v1/script/${path4}/rename`,
3348
+ url: `/umbraco/management/api/v1/script/${path3}/rename`,
3272
3349
  method: "PUT",
3273
3350
  headers: { "Content-Type": "application/json" },
3274
3351
  data: renameScriptRequestModel
@@ -3287,19 +3364,19 @@ var getUmbracoManagementAPI = () => {
3287
3364
  options
3288
3365
  );
3289
3366
  };
3290
- const getScriptFolderByPath = (path4, options) => {
3367
+ const getScriptFolderByPath = (path3, options) => {
3291
3368
  return UmbracoManagementClient(
3292
3369
  {
3293
- url: `/umbraco/management/api/v1/script/folder/${path4}`,
3370
+ url: `/umbraco/management/api/v1/script/folder/${path3}`,
3294
3371
  method: "GET"
3295
3372
  },
3296
3373
  options
3297
3374
  );
3298
3375
  };
3299
- const deleteScriptFolderByPath = (path4, options) => {
3376
+ const deleteScriptFolderByPath = (path3, options) => {
3300
3377
  return UmbracoManagementClient(
3301
3378
  {
3302
- url: `/umbraco/management/api/v1/script/folder/${path4}`,
3379
+ url: `/umbraco/management/api/v1/script/folder/${path3}`,
3303
3380
  method: "DELETE"
3304
3381
  },
3305
3382
  options
@@ -3523,28 +3600,28 @@ var getUmbracoManagementAPI = () => {
3523
3600
  options
3524
3601
  );
3525
3602
  };
3526
- const getStylesheetByPath = (path4, options) => {
3603
+ const getStylesheetByPath = (path3, options) => {
3527
3604
  return UmbracoManagementClient(
3528
3605
  {
3529
- url: `/umbraco/management/api/v1/stylesheet/${path4}`,
3606
+ url: `/umbraco/management/api/v1/stylesheet/${path3}`,
3530
3607
  method: "GET"
3531
3608
  },
3532
3609
  options
3533
3610
  );
3534
3611
  };
3535
- const deleteStylesheetByPath = (path4, options) => {
3612
+ const deleteStylesheetByPath = (path3, options) => {
3536
3613
  return UmbracoManagementClient(
3537
3614
  {
3538
- url: `/umbraco/management/api/v1/stylesheet/${path4}`,
3615
+ url: `/umbraco/management/api/v1/stylesheet/${path3}`,
3539
3616
  method: "DELETE"
3540
3617
  },
3541
3618
  options
3542
3619
  );
3543
3620
  };
3544
- const putStylesheetByPath = (path4, updateStylesheetRequestModel, options) => {
3621
+ const putStylesheetByPath = (path3, updateStylesheetRequestModel, options) => {
3545
3622
  return UmbracoManagementClient(
3546
3623
  {
3547
- url: `/umbraco/management/api/v1/stylesheet/${path4}`,
3624
+ url: `/umbraco/management/api/v1/stylesheet/${path3}`,
3548
3625
  method: "PUT",
3549
3626
  headers: { "Content-Type": "application/json" },
3550
3627
  data: updateStylesheetRequestModel
@@ -3552,10 +3629,10 @@ var getUmbracoManagementAPI = () => {
3552
3629
  options
3553
3630
  );
3554
3631
  };
3555
- const putStylesheetByPathRename = (path4, renameStylesheetRequestModel, options) => {
3632
+ const putStylesheetByPathRename = (path3, renameStylesheetRequestModel, options) => {
3556
3633
  return UmbracoManagementClient(
3557
3634
  {
3558
- url: `/umbraco/management/api/v1/stylesheet/${path4}/rename`,
3635
+ url: `/umbraco/management/api/v1/stylesheet/${path3}/rename`,
3559
3636
  method: "PUT",
3560
3637
  headers: { "Content-Type": "application/json" },
3561
3638
  data: renameStylesheetRequestModel
@@ -3574,19 +3651,19 @@ var getUmbracoManagementAPI = () => {
3574
3651
  options
3575
3652
  );
3576
3653
  };
3577
- const getStylesheetFolderByPath = (path4, options) => {
3654
+ const getStylesheetFolderByPath = (path3, options) => {
3578
3655
  return UmbracoManagementClient(
3579
3656
  {
3580
- url: `/umbraco/management/api/v1/stylesheet/folder/${path4}`,
3657
+ url: `/umbraco/management/api/v1/stylesheet/folder/${path3}`,
3581
3658
  method: "GET"
3582
3659
  },
3583
3660
  options
3584
3661
  );
3585
3662
  };
3586
- const deleteStylesheetFolderByPath = (path4, options) => {
3663
+ const deleteStylesheetFolderByPath = (path3, options) => {
3587
3664
  return UmbracoManagementClient(
3588
3665
  {
3589
- url: `/umbraco/management/api/v1/stylesheet/folder/${path4}`,
3666
+ url: `/umbraco/management/api/v1/stylesheet/folder/${path3}`,
3590
3667
  method: "DELETE"
3591
3668
  },
3592
3669
  options
@@ -4464,26 +4541,52 @@ var getUmbracoManagementAPI = () => {
4464
4541
  options
4465
4542
  );
4466
4543
  };
4467
- return { getCulture, postDataType, getDataTypeById, deleteDataTypeById, putDataTypeById, postDataTypeByIdCopy, getDataTypeByIdIsUsed, putDataTypeByIdMove, getDataTypeByIdReferencedBy, getDataTypeBatch, getDataTypeConfiguration, postDataTypeFolder, getDataTypeFolderById, deleteDataTypeFolderById, putDataTypeFolderById, getFilterDataType, getItemDataType, getItemDataTypeAncestors, getItemDataTypeSearch, getTreeDataTypeAncestors, getTreeDataTypeChildren, getTreeDataTypeRoot, getTreeDataTypeSearch, getTreeDataTypeSiblings, getDictionary, postDictionary, getDictionaryById, deleteDictionaryById, putDictionaryById, getDictionaryByIdExport, putDictionaryByIdMove, postDictionaryImport, getItemDictionary, getTreeDictionaryAncestors, getTreeDictionaryChildren, getTreeDictionaryRoot, postDocumentBlueprint, getDocumentBlueprintById, deleteDocumentBlueprintById, putDocumentBlueprintById, putDocumentBlueprintByIdMove, getDocumentBlueprintByIdScaffold, postDocumentBlueprintFolder, getDocumentBlueprintFolderById, deleteDocumentBlueprintFolderById, putDocumentBlueprintFolderById, postDocumentBlueprintFromDocument, getItemDocumentBlueprint, getTreeDocumentBlueprintAncestors, getTreeDocumentBlueprintChildren, getTreeDocumentBlueprintRoot, getTreeDocumentBlueprintSiblings, postDocumentType, getDocumentTypeById, deleteDocumentTypeById, putDocumentTypeById, getDocumentTypeByIdAllowedChildren, getDocumentTypeByIdAllowedParents, getDocumentTypeByIdBlueprint, getDocumentTypeByIdCompositionReferences, postDocumentTypeByIdCopy, getDocumentTypeByIdExport, putDocumentTypeByIdImport, putDocumentTypeByIdMove, postDocumentTypeByIdTemplate, getDocumentTypeAllowedAtRoot, postDocumentTypeAvailableCompositions, getDocumentTypeBatch, getDocumentTypeConfiguration, postDocumentTypeFolder, getDocumentTypeFolderById, deleteDocumentTypeFolderById, putDocumentTypeFolderById, postDocumentTypeImport, getItemDocumentType, getItemDocumentTypeAncestors, getItemDocumentTypeSearch, getTreeDocumentTypeAncestors, getTreeDocumentTypeChildren, getTreeDocumentTypeRoot, getTreeDocumentTypeSearch, getTreeDocumentTypeSiblings, getDocumentVersion, getDocumentVersionById, putDocumentVersionByIdPreventCleanup, postDocumentVersionByIdRollback, getCollectionDocumentById, postDocument, getDocumentById, deleteDocumentById, putDocumentById, getDocumentByIdAuditLog, getDocumentByIdAvailableSegmentOptions, postDocumentByIdCopy, getDocumentByIdDomains, putDocumentByIdDomains, putDocumentByIdMove, putDocumentByIdMoveToRecycleBin, getDocumentByIdNotifications, putDocumentByIdNotifications, getDocumentByIdPreviewUrl, postDocumentByIdPublicAccess, deleteDocumentByIdPublicAccess, getDocumentByIdPublicAccess, putDocumentByIdPublicAccess, putDocumentByIdPublish, putDocumentByIdPublishWithDescendants, getDocumentByIdPublishWithDescendantsResultByTaskId, getDocumentByIdPublished, getDocumentByIdReferencedBy, getDocumentByIdReferencedDescendants, putDocumentByIdUnpublish, putUmbracoManagementApiV11DocumentByIdValidate11, getDocumentAreReferenced, getDocumentConfiguration, putDocumentSort, getDocumentUrls, postDocumentValidate, getItemDocument, getItemDocumentAncestors, getItemDocumentSearch, deleteRecycleBinDocument, deleteRecycleBinDocumentById, getRecycleBinDocumentByIdOriginalParent, putRecycleBinDocumentByIdRestore, getRecycleBinDocumentChildren, getRecycleBinDocumentReferencedBy, getRecycleBinDocumentRoot, getRecycleBinDocumentSiblings, getTreeDocumentAncestors, getTreeDocumentChildren, getTreeDocumentRoot, getTreeDocumentSiblings, postDynamicRootQuery, getDynamicRootSteps, getHealthCheckGroup, getHealthCheckGroupByName, postHealthCheckGroupByNameCheck, postHealthCheckExecuteAction, getHelp, getImagingResizeUrls, getImportAnalyze, getIndexer, getIndexerByIndexName, postIndexerByIndexNameRebuild, getInstallSettings, postInstallSetup, postInstallValidateDatabase, getItemLanguage, getItemLanguageDefault, getLanguage, postLanguage, getLanguageByIsoCode, deleteLanguageByIsoCode, putLanguageByIsoCode, getLogViewerLevel, getLogViewerLevelCount, getLogViewerLog, getLogViewerMessageTemplate, getLogViewerSavedSearch, postLogViewerSavedSearch, getLogViewerSavedSearchByName, deleteLogViewerSavedSearchByName, getLogViewerValidateLogsSize, getManifestManifest, getManifestManifestPrivate, getManifestManifestPublic, getItemMediaType, getItemMediaTypeAllowed, getItemMediaTypeAncestors, getItemMediaTypeFolders, getItemMediaTypeSearch, postMediaType, getMediaTypeById, deleteMediaTypeById, putMediaTypeById, getMediaTypeByIdAllowedChildren, getMediaTypeByIdAllowedParents, getMediaTypeByIdCompositionReferences, postMediaTypeByIdCopy, getMediaTypeByIdExport, putMediaTypeByIdImport, putMediaTypeByIdMove, getMediaTypeAllowedAtRoot, postMediaTypeAvailableCompositions, getMediaTypeBatch, getMediaTypeConfiguration, postMediaTypeFolder, getMediaTypeFolderById, deleteMediaTypeFolderById, putMediaTypeFolderById, postMediaTypeImport, getTreeMediaTypeAncestors, getTreeMediaTypeChildren, getTreeMediaTypeRoot, getTreeMediaTypeSiblings, getCollectionMedia, getItemMedia, getItemMediaAncestors, getItemMediaSearch, postMedia, getMediaById, deleteMediaById, putMediaById, getMediaByIdAuditLog, putMediaByIdMove, putMediaByIdMoveToRecycleBin, getMediaByIdReferencedBy, getMediaByIdReferencedDescendants, putMediaByIdValidate, getMediaAreReferenced, getMediaConfiguration, putMediaSort, getMediaUrls, postMediaValidate, deleteRecycleBinMedia, deleteRecycleBinMediaById, getRecycleBinMediaByIdOriginalParent, putRecycleBinMediaByIdRestore, getRecycleBinMediaChildren, getRecycleBinMediaReferencedBy, getRecycleBinMediaRoot, getRecycleBinMediaSiblings, getTreeMediaAncestors, getTreeMediaChildren, getTreeMediaRoot, getTreeMediaSiblings, getItemMemberGroup, getMemberGroup, postMemberGroup, getMemberGroupById, deleteMemberGroupById, putMemberGroupById, getTreeMemberGroupRoot, getItemMemberType, getItemMemberTypeAncestors, getItemMemberTypeSearch, postMemberType, getMemberTypeById, deleteMemberTypeById, putMemberTypeById, getMemberTypeByIdCompositionReferences, postMemberTypeByIdCopy, getMemberTypeByIdExport, putMemberTypeByIdImport, putMemberTypeByIdMove, postMemberTypeAvailableCompositions, getMemberTypeBatch, getMemberTypeConfiguration, postMemberTypeFolder, getMemberTypeFolderById, deleteMemberTypeFolderById, putMemberTypeFolderById, postMemberTypeImport, getTreeMemberTypeAncestors, getTreeMemberTypeChildren, getTreeMemberTypeRoot, getTreeMemberTypeSiblings, getFilterMember, getItemMember, getItemMemberAncestors, getItemMemberSearch, postMember, getMemberById, deleteMemberById, putMemberById, getMemberByIdReferencedBy, getMemberByIdReferencedDescendants, putMemberByIdValidate, getMemberAreReferenced, getMemberConfiguration, postMemberValidate, postModelsBuilderBuild, getModelsBuilderDashboard, getModelsBuilderStatus, getNewsDashboard, getObjectTypes, getOembedQuery, postPackageByNameRunMigration, getPackageConfiguration, getPackageCreated, postPackageCreated, getPackageCreatedById, deletePackageCreatedById, putPackageCreatedById, getPackageCreatedByIdDownload, getPackageMigrationStatus, getItemPartialView, postPartialView, getPartialViewByPath, deletePartialViewByPath, putPartialViewByPath, putPartialViewByPathRename, postPartialViewFolder, getPartialViewFolderByPath, deletePartialViewFolderByPath, getPartialViewSnippet, getPartialViewSnippetById, getTreePartialViewAncestors, getTreePartialViewChildren, getTreePartialViewRoot, getTreePartialViewSiblings, deletePreview, postPreview, getProfilingStatus, putProfilingStatus, getPropertyTypeIsUsed, postPublishedCacheRebuild, getPublishedCacheRebuildStatus, postPublishedCacheReload, getRedirectManagement, getRedirectManagementById, deleteRedirectManagementById, getRedirectManagementStatus, postRedirectManagementStatus, getItemRelationType, getRelationType, getRelationTypeById, getRelationByRelationTypeId, getItemScript, postScript, getScriptByPath, deleteScriptByPath, putScriptByPath, putScriptByPathRename, postScriptFolder, getScriptFolderByPath, deleteScriptFolderByPath, getTreeScriptAncestors, getTreeScriptChildren, getTreeScriptRoot, getTreeScriptSiblings, getSearcher, getSearcherBySearcherNameQuery, getSecurityConfiguration, postSecurityForgotPassword, postSecurityForgotPasswordReset, postSecurityForgotPasswordVerify, getSegment, getServerConfiguration, getServerInformation, getServerStatus, getServerTroubleshooting, getServerUpgradeCheck, getItemStaticFile, getTreeStaticFileAncestors, getTreeStaticFileChildren, getTreeStaticFileRoot, getItemStylesheet, postStylesheet, getStylesheetByPath, deleteStylesheetByPath, putStylesheetByPath, putStylesheetByPathRename, postStylesheetFolder, getStylesheetFolderByPath, deleteStylesheetFolderByPath, getTreeStylesheetAncestors, getTreeStylesheetChildren, getTreeStylesheetRoot, getTreeStylesheetSiblings, getTag, getTelemetry, getTelemetryLevel, postTelemetryLevel, getItemTemplate, getItemTemplateAncestors, getItemTemplateSearch, postTemplate, getTemplateById, deleteTemplateById, putTemplateById, getTemplateConfiguration, postTemplateQueryExecute, getTemplateQuerySettings, getTreeTemplateAncestors, getTreeTemplateChildren, getTreeTemplateRoot, getTreeTemplateSiblings, postUpgradeAuthorize, getUpgradeSettings, postUserData, getUserData, putUserData, getUserDataById, deleteUserDataById, getFilterUserGroup, getItemUserGroup, deleteUserGroup, postUserGroup, getUserGroup, getUserGroupById, deleteUserGroupById, putUserGroupById, deleteUserGroupByIdUsers, postUserGroupByIdUsers, getFilterUser, getItemUser, postUser, deleteUser, getUser, getUserById, deleteUserById, putUserById, getUserById2fa, deleteUserById2faByProviderName, getUserByIdCalculateStartNodes, postUserByIdChangePassword, postUserByIdClientCredentials, getUserByIdClientCredentials, deleteUserByIdClientCredentialsByClientId, postUserByIdResetPassword, deleteUserAvatarById, postUserAvatarById, getUserConfiguration, getUserCurrent, getUserCurrent2fa, deleteUserCurrent2faByProviderName, postUserCurrent2faByProviderName, getUserCurrent2faByProviderName, postUserCurrentAvatar, postUserCurrentChangePassword, getUserCurrentConfiguration, getUserCurrentLoginProviders, getUserCurrentPermissions, getUserCurrentPermissionsDocument, getUserCurrentPermissionsMedia, postUserDisable, postUserEnable, postUserInvite, postUserInviteCreatePassword, postUserInviteResend, postUserInviteVerify, postUserSetUserGroups, postUserUnlock, getItemWebhook, getWebhook, postWebhook, getWebhookById, deleteWebhookById, putWebhookById, getWebhookByIdLogs, getWebhookEvents, getWebhookLogs };
4544
+ return { getCulture, postDataType, getDataTypeById, deleteDataTypeById, putDataTypeById, postDataTypeByIdCopy, getDataTypeByIdIsUsed, putDataTypeByIdMove, getDataTypeByIdReferencedBy, getDataTypeByIdSchema, getDataTypeBatch, getDataTypeConfiguration, postDataTypeFolder, getDataTypeFolderById, deleteDataTypeFolderById, putDataTypeFolderById, getDataTypeSchemasBatch, getFilterDataType, getItemDataType, getItemDataTypeAncestors, getItemDataTypeSearch, getTreeDataTypeAncestors, getTreeDataTypeChildren, getTreeDataTypeRoot, getTreeDataTypeSearch, getTreeDataTypeSiblings, getDictionary, postDictionary, getDictionaryById, deleteDictionaryById, putDictionaryById, getDictionaryByIdExport, putDictionaryByIdMove, postDictionaryImport, getItemDictionary, getTreeDictionaryAncestors, getTreeDictionaryChildren, getTreeDictionaryRoot, postDocumentBlueprint, getDocumentBlueprintById, deleteDocumentBlueprintById, putDocumentBlueprintById, getDocumentBlueprintByIdAuditLog, putDocumentBlueprintByIdMove, getDocumentBlueprintByIdScaffold, postDocumentBlueprintFolder, getDocumentBlueprintFolderById, deleteDocumentBlueprintFolderById, putDocumentBlueprintFolderById, postDocumentBlueprintFromDocument, getItemDocumentBlueprint, getTreeDocumentBlueprintAncestors, getTreeDocumentBlueprintChildren, getTreeDocumentBlueprintRoot, getTreeDocumentBlueprintSiblings, postDocumentType, getDocumentTypeById, deleteDocumentTypeById, putDocumentTypeById, getDocumentTypeByIdAllowedChildren, getDocumentTypeByIdAllowedParents, getDocumentTypeByIdBlueprint, getDocumentTypeByIdCompositionReferences, postDocumentTypeByIdCopy, getDocumentTypeByIdExport, putDocumentTypeByIdImport, putDocumentTypeByIdMove, getDocumentTypeByIdSchema, postDocumentTypeByIdTemplate, getDocumentTypeAllowedAtRoot, postDocumentTypeAvailableCompositions, getDocumentTypeBatch, getDocumentTypeConfiguration, postDocumentTypeFolder, getDocumentTypeFolderById, deleteDocumentTypeFolderById, putDocumentTypeFolderById, postDocumentTypeImport, getItemDocumentType, getItemDocumentTypeAncestors, getItemDocumentTypeSearch, getTreeDocumentTypeAncestors, getTreeDocumentTypeChildren, getTreeDocumentTypeRoot, getTreeDocumentTypeSearch, getTreeDocumentTypeSiblings, getDocumentVersion, getDocumentVersionById, putDocumentVersionByIdPreventCleanup, postDocumentVersionByIdRollback, getCollectionDocumentById, postDocument, getDocumentById, deleteDocumentById, putDocumentById, getDocumentByIdAuditLog, getDocumentByIdAvailableSegmentOptions, postDocumentByIdCopy, getDocumentByIdDomains, putDocumentByIdDomains, putDocumentByIdMove, putDocumentByIdMoveToRecycleBin, getDocumentByIdNotifications, putDocumentByIdNotifications, patchDocumentByIdPatch, getDocumentByIdPreviewUrl, postDocumentByIdPublicAccess, deleteDocumentByIdPublicAccess, getDocumentByIdPublicAccess, putDocumentByIdPublicAccess, putDocumentByIdPublish, putDocumentByIdPublishWithDescendants, getDocumentByIdPublishWithDescendantsResultByTaskId, getDocumentByIdPublished, getDocumentByIdReferencedBy, getDocumentByIdReferencedDescendants, putDocumentByIdUnpublish, putUmbracoManagementApiV11DocumentByIdValidate11, getDocumentAreReferenced, getDocumentConfiguration, putDocumentSort, getDocumentUrls, postDocumentValidate, getItemDocument, getItemDocumentAncestors, getItemDocumentSearch, deleteRecycleBinDocument, deleteRecycleBinDocumentById, getRecycleBinDocumentByIdOriginalParent, putRecycleBinDocumentByIdRestore, getRecycleBinDocumentChildren, getRecycleBinDocumentReferencedBy, getRecycleBinDocumentRoot, getRecycleBinDocumentSiblings, getTreeDocumentAncestors, getTreeDocumentChildren, getTreeDocumentRoot, getTreeDocumentSiblings, postDynamicRootQuery, getDynamicRootSteps, getHealthCheckGroup, getHealthCheckGroupByName, postHealthCheckGroupByNameCheck, postHealthCheckExecuteAction, getHelp, getImagingResizeUrls, getImportAnalyze, getIndexer, getIndexerByIndexName, postIndexerByIndexNameRebuild, getInstallSettings, postInstallSetup, postInstallValidateDatabase, getItemLanguage, getItemLanguageDefault, getLanguage, postLanguage, getLanguageByIsoCode, deleteLanguageByIsoCode, putLanguageByIsoCode, getLogViewerLevel, getLogViewerLevelCount, getLogViewerLog, getLogViewerMessageTemplate, getLogViewerSavedSearch, postLogViewerSavedSearch, getLogViewerSavedSearchByName, deleteLogViewerSavedSearchByName, getLogViewerValidateLogsSize, getManifestManifest, getManifestManifestPrivate, getManifestManifestPublic, getItemMediaType, getItemMediaTypeAllowed, getItemMediaTypeAncestors, getItemMediaTypeFolders, getItemMediaTypeSearch, postMediaType, getMediaTypeById, deleteMediaTypeById, putMediaTypeById, getMediaTypeByIdAllowedChildren, getMediaTypeByIdAllowedParents, getMediaTypeByIdCompositionReferences, postMediaTypeByIdCopy, getMediaTypeByIdExport, putMediaTypeByIdImport, putMediaTypeByIdMove, getMediaTypeByIdSchema, getMediaTypeAllowedAtRoot, postMediaTypeAvailableCompositions, getMediaTypeBatch, getMediaTypeConfiguration, postMediaTypeFolder, getMediaTypeFolderById, deleteMediaTypeFolderById, putMediaTypeFolderById, postMediaTypeImport, getTreeMediaTypeAncestors, getTreeMediaTypeChildren, getTreeMediaTypeRoot, getTreeMediaTypeSiblings, getCollectionMedia, getItemMedia, getItemMediaAncestors, getItemMediaSearch, postMedia, getMediaById, deleteMediaById, putMediaById, getMediaByIdAuditLog, putMediaByIdMove, putMediaByIdMoveToRecycleBin, getMediaByIdReferencedBy, getMediaByIdReferencedDescendants, putMediaByIdValidate, getMediaAreReferenced, getMediaConfiguration, putMediaSort, getMediaUrls, postMediaValidate, deleteRecycleBinMedia, deleteRecycleBinMediaById, getRecycleBinMediaByIdOriginalParent, putRecycleBinMediaByIdRestore, getRecycleBinMediaChildren, getRecycleBinMediaReferencedBy, getRecycleBinMediaRoot, getRecycleBinMediaSiblings, getTreeMediaAncestors, getTreeMediaChildren, getTreeMediaRoot, getTreeMediaSiblings, getItemMemberGroup, getMemberGroup, postMemberGroup, getMemberGroupById, deleteMemberGroupById, putMemberGroupById, getTreeMemberGroupRoot, getItemMemberType, getItemMemberTypeAncestors, getItemMemberTypeSearch, postMemberType, getMemberTypeById, deleteMemberTypeById, putMemberTypeById, getMemberTypeByIdCompositionReferences, postMemberTypeByIdCopy, getMemberTypeByIdExport, putMemberTypeByIdImport, putMemberTypeByIdMove, getMemberTypeByIdSchema, getMemberTypeAllowedAtRoot, postMemberTypeAvailableCompositions, getMemberTypeBatch, getMemberTypeConfiguration, postMemberTypeFolder, getMemberTypeFolderById, deleteMemberTypeFolderById, putMemberTypeFolderById, postMemberTypeImport, getTreeMemberTypeAncestors, getTreeMemberTypeChildren, getTreeMemberTypeRoot, getTreeMemberTypeSiblings, getFilterMember, getItemMember, getItemMemberAncestors, getItemMemberSearch, postMember, getMemberById, deleteMemberById, putMemberById, getMemberByIdReferencedBy, getMemberByIdReferencedDescendants, putMemberByIdValidate, getMemberAreReferenced, getMemberConfiguration, postMemberValidate, postModelsBuilderBuild, getModelsBuilderDashboard, getModelsBuilderStatus, getNewsDashboard, getObjectTypes, getOembedQuery, postPackageByNameRunMigration, getPackageConfiguration, getPackageCreated, postPackageCreated, getPackageCreatedById, deletePackageCreatedById, putPackageCreatedById, getPackageCreatedByIdDownload, getPackageMigrationStatus, getItemPartialView, postPartialView, getPartialViewByPath, deletePartialViewByPath, putPartialViewByPath, putPartialViewByPathRename, postPartialViewFolder, getPartialViewFolderByPath, deletePartialViewFolderByPath, getPartialViewSnippet, getPartialViewSnippetById, getTreePartialViewAncestors, getTreePartialViewChildren, getTreePartialViewRoot, getTreePartialViewSiblings, deletePreview, postPreview, getProfilingStatus, putProfilingStatus, getPropertyTypeIsUsed, postPublishedCacheRebuild, getPublishedCacheRebuildStatus, postPublishedCacheReload, getRedirectManagement, getRedirectManagementById, deleteRedirectManagementById, getRedirectManagementStatus, postRedirectManagementStatus, getItemRelationType, getRelationType, getRelationTypeById, getRelationByRelationTypeId, getItemScript, postScript, getScriptByPath, deleteScriptByPath, putScriptByPath, putScriptByPathRename, postScriptFolder, getScriptFolderByPath, deleteScriptFolderByPath, getTreeScriptAncestors, getTreeScriptChildren, getTreeScriptRoot, getTreeScriptSiblings, getSearcher, getSearcherBySearcherNameQuery, getSecurityConfiguration, postSecurityForgotPassword, postSecurityForgotPasswordReset, postSecurityForgotPasswordVerify, getSegment, getServerConfiguration, getServerInformation, getServerStatus, getServerTroubleshooting, getServerUpgradeCheck, getItemStaticFile, getTreeStaticFileAncestors, getTreeStaticFileChildren, getTreeStaticFileRoot, getItemStylesheet, postStylesheet, getStylesheetByPath, deleteStylesheetByPath, putStylesheetByPath, putStylesheetByPathRename, postStylesheetFolder, getStylesheetFolderByPath, deleteStylesheetFolderByPath, getTreeStylesheetAncestors, getTreeStylesheetChildren, getTreeStylesheetRoot, getTreeStylesheetSiblings, getTag, getTelemetry, getTelemetryLevel, postTelemetryLevel, getItemTemplate, getItemTemplateAncestors, getItemTemplateSearch, postTemplate, getTemplateById, deleteTemplateById, putTemplateById, getTemplateConfiguration, postTemplateQueryExecute, getTemplateQuerySettings, getTreeTemplateAncestors, getTreeTemplateChildren, getTreeTemplateRoot, getTreeTemplateSiblings, postUpgradeAuthorize, getUpgradeSettings, postUserData, getUserData, putUserData, getUserDataById, deleteUserDataById, getFilterUserGroup, getItemUserGroup, deleteUserGroup, postUserGroup, getUserGroup, getUserGroupById, deleteUserGroupById, putUserGroupById, deleteUserGroupByIdUsers, postUserGroupByIdUsers, getFilterUser, getItemUser, postUser, deleteUser, getUser, getUserById, deleteUserById, putUserById, getUserById2fa, deleteUserById2faByProviderName, getUserByIdCalculateStartNodes, postUserByIdChangePassword, postUserByIdClientCredentials, getUserByIdClientCredentials, deleteUserByIdClientCredentialsByClientId, postUserByIdResetPassword, deleteUserAvatarById, postUserAvatarById, getUserConfiguration, getUserCurrent, getUserCurrent2fa, deleteUserCurrent2faByProviderName, postUserCurrent2faByProviderName, getUserCurrent2faByProviderName, postUserCurrentAvatar, postUserCurrentChangePassword, getUserCurrentConfiguration, getUserCurrentLoginProviders, getUserCurrentPermissions, getUserCurrentPermissionsDocument, getUserCurrentPermissionsMedia, postUserDisable, postUserEnable, postUserInvite, postUserInviteCreatePassword, postUserInviteResend, postUserInviteVerify, postUserSetUserGroups, postUserUnlock, getItemWebhook, getWebhook, postWebhook, getWebhookById, deleteWebhookById, putWebhookById, getWebhookByIdLogs, getWebhookEvents, getWebhookLogs };
4468
4545
  };
4469
4546
 
4470
4547
  // src/umb-management-api/api/temporary-file/index.ts
4471
4548
 
4472
- var _formdata = require('form-data'); var _formdata2 = _interopRequireDefault(_formdata);
4549
+ async function readStreamToBuffer(stream) {
4550
+ const chunks = [];
4551
+ for await (const chunk of stream) {
4552
+ chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : chunk);
4553
+ }
4554
+ return Buffer.concat(chunks);
4555
+ }
4473
4556
  var getTemporaryFileAPI = () => ({
4474
- postTemporaryFile: (postTemporaryFileBody2, options) => {
4475
- const formData = new (0, _formdata2.default)();
4557
+ postTemporaryFile: async (postTemporaryFileBody2, options) => {
4558
+ const formData = new FormData();
4476
4559
  formData.append("Id", postTemporaryFileBody2.Id);
4477
- formData.append("File", postTemporaryFileBody2.File);
4478
- const headers = {
4479
- ...formData.getHeaders(),
4480
- ..._optionalChain([options, 'optionalAccess', _ => _.headers])
4481
- };
4560
+ const file = postTemporaryFileBody2.File;
4561
+ console.log("[temp-file] incoming file:", {
4562
+ typeofFile: typeof file,
4563
+ isBuffer: Buffer.isBuffer(file),
4564
+ ctorName: _optionalChain([file, 'optionalAccess', _ => _.constructor, 'optionalAccess', _2 => _2.name]),
4565
+ hasByteLength: typeof _optionalChain([file, 'optionalAccess', _3 => _3.byteLength]),
4566
+ hasLength: typeof _optionalChain([file, 'optionalAccess', _4 => _4.length]),
4567
+ keys: file ? Object.keys(file).slice(0, 10) : []
4568
+ });
4569
+ const buffer = Buffer.isBuffer(file) ? file : await readStreamToBuffer(file);
4570
+ console.log("[temp-file] buffer:", { length: buffer.byteLength });
4571
+ const bytes = new Uint8Array(buffer.byteLength);
4572
+ bytes.set(buffer);
4573
+ const blob = new Blob([bytes]);
4574
+ console.log("[temp-file] blob:", { size: blob.size, type: blob.type, fileName: postTemporaryFileBody2.FileName });
4575
+ formData.append("File", blob, postTemporaryFileBody2.FileName);
4576
+ const entries = [];
4577
+ for (const [k, v] of formData.entries()) {
4578
+ entries.push({
4579
+ name: k,
4580
+ valueKind: typeof v === "string" ? "string" : _nullishCoalesce(_optionalChain([v, 'optionalAccess', _5 => _5.constructor, 'optionalAccess', _6 => _6.name]), () => ( typeof v)),
4581
+ valueSize: typeof v === "string" ? v.length : _nullishCoalesce(_optionalChain([v, 'optionalAccess', _7 => _7.size]), () => ( void 0))
4582
+ });
4583
+ }
4584
+ console.log("[temp-file] formData entries:", entries);
4482
4585
  return _mcpserversdk.UmbracoManagementClient.call(void 0,
4483
4586
  {
4484
4587
  url: `/umbraco/management/api/v1/temporary-file`,
4485
4588
  method: "POST",
4486
- headers,
4589
+ headers: _optionalChain([options, 'optionalAccess', _8 => _8.headers]),
4487
4590
  data: formData
4488
4591
  },
4489
4592
  options
@@ -4531,6 +4634,27 @@ var UmbracoManagementClient3 = (_class = class {
4531
4634
  }
4532
4635
  }, _class.__initStatic(), _class);
4533
4636
 
4637
+ // src/umb-management-api/runtime-context.ts
4638
+ var umbracoVersion = null;
4639
+ var allowFilePathUploads = false;
4640
+ function setAllowFilePathUploads(allow) {
4641
+ allowFilePathUploads = allow;
4642
+ }
4643
+ function isFilePathUploadAllowed() {
4644
+ return allowFilePathUploads;
4645
+ }
4646
+ function setUmbracoVersion(version) {
4647
+ umbracoVersion = _nullishCoalesce(version, () => ( null));
4648
+ }
4649
+ function isUmbracoAtLeast(major, minor) {
4650
+ if (!umbracoVersion) return false;
4651
+ const [maj, min] = umbracoVersion.split(".").map((n) => parseInt(n, 10));
4652
+ if (Number.isNaN(maj) || Number.isNaN(min)) return false;
4653
+ if (maj > major) return true;
4654
+ if (maj < major) return false;
4655
+ return min >= minor;
4656
+ }
4657
+
4534
4658
  // src/umb-management-api/api/umbracoManagementAPI.zod.ts
4535
4659
  var _zod = require('zod'); var zod = _interopRequireWildcard(_zod);
4536
4660
  var getCultureQueryTakeDefault = 100;
@@ -4699,6 +4823,19 @@ var getDataTypeByIdReferencedByResponse = zod.object({
4699
4823
  })
4700
4824
  })]))
4701
4825
  });
4826
+ var getDataTypeByIdSchemaParams = zod.object({
4827
+ "id": zod.guid()
4828
+ });
4829
+ var getDataTypeByIdSchemaResponse = zod.object({
4830
+ "valueTypeName": zod.string().nullish(),
4831
+ "jsonSchema": zod.record(zod.string(), zod.object({
4832
+ "options": zod.object({
4833
+ "propertyNameCaseInsensitive": zod.boolean()
4834
+ }).nullish(),
4835
+ "parent": zod.unknown().nullish(),
4836
+ "root": zod.unknown()
4837
+ })).nullish()
4838
+ });
4702
4839
  var getDataTypeBatchQueryParams = zod.object({
4703
4840
  "id": zod.array(zod.guid()).optional()
4704
4841
  });
@@ -4745,6 +4882,24 @@ var putDataTypeFolderByIdParams = zod.object({
4745
4882
  var putDataTypeFolderByIdBody = zod.object({
4746
4883
  "name": zod.string().min(1)
4747
4884
  });
4885
+ var getDataTypeSchemasBatchQueryParams = zod.object({
4886
+ "id": zod.array(zod.guid()).optional()
4887
+ });
4888
+ var getDataTypeSchemasBatchResponse = zod.object({
4889
+ "total": zod.number(),
4890
+ "items": zod.array(zod.object({
4891
+ "id": zod.guid(),
4892
+ "valueTypeName": zod.string().nullish(),
4893
+ "jsonSchema": zod.record(zod.string(), zod.object({
4894
+ "options": zod.object({
4895
+ "propertyNameCaseInsensitive": zod.boolean()
4896
+ }).nullish(),
4897
+ "parent": zod.unknown().nullish(),
4898
+ "root": zod.unknown()
4899
+ })).nullish(),
4900
+ "error": zod.string().nullish()
4901
+ }))
4902
+ });
4748
4903
  var getFilterDataTypeQueryTakeDefault = 100;
4749
4904
  var getFilterDataTypeQueryParams = zod.object({
4750
4905
  "skip": zod.coerce.number().optional(),
@@ -5143,6 +5298,28 @@ var putDocumentBlueprintByIdBody = zod.object({
5143
5298
  "name": zod.string().min(1)
5144
5299
  }))
5145
5300
  });
5301
+ var getDocumentBlueprintByIdAuditLogParams = zod.object({
5302
+ "id": zod.guid()
5303
+ });
5304
+ var getDocumentBlueprintByIdAuditLogQueryTakeDefault = 100;
5305
+ var getDocumentBlueprintByIdAuditLogQueryParams = zod.object({
5306
+ "orderDirection": zod.enum(["Ascending", "Descending"]).optional(),
5307
+ "sinceDate": zod.iso.datetime({ "local": true, "offset": true }).optional(),
5308
+ "skip": zod.coerce.number().optional(),
5309
+ "take": zod.coerce.number().default(getDocumentBlueprintByIdAuditLogQueryTakeDefault)
5310
+ });
5311
+ var getDocumentBlueprintByIdAuditLogResponse = zod.object({
5312
+ "total": zod.number(),
5313
+ "items": zod.array(zod.object({
5314
+ "user": zod.object({
5315
+ "id": zod.guid()
5316
+ }),
5317
+ "timestamp": zod.iso.datetime({ "local": true, "offset": true }),
5318
+ "logType": zod.enum(["New", "Save", "SaveVariant", "Open", "Delete", "Publish", "PublishVariant", "SendToPublish", "SendToPublishVariant", "Unpublish", "UnpublishVariant", "Move", "Copy", "AssignDomain", "PublicAccess", "Sort", "Notify", "System", "RollBack", "PackagerInstall", "PackagerUninstall", "Custom", "ContentVersionPreventCleanup", "ContentVersionEnableCleanup"]),
5319
+ "comment": zod.string().nullish(),
5320
+ "parameters": zod.string().nullish()
5321
+ }))
5322
+ });
5146
5323
  var putDocumentBlueprintByIdMoveParams = zod.object({
5147
5324
  "id": zod.guid()
5148
5325
  });
@@ -5651,6 +5828,16 @@ var putDocumentTypeByIdMoveBody = zod.object({
5651
5828
  "id": zod.guid()
5652
5829
  }).nullish()
5653
5830
  });
5831
+ var getDocumentTypeByIdSchemaParams = zod.object({
5832
+ "id": zod.guid()
5833
+ });
5834
+ var getDocumentTypeByIdSchemaResponse = zod.record(zod.string(), zod.object({
5835
+ "options": zod.object({
5836
+ "propertyNameCaseInsensitive": zod.boolean()
5837
+ }).nullish(),
5838
+ "parent": zod.unknown().nullish(),
5839
+ "root": zod.unknown()
5840
+ }));
5654
5841
  var postDocumentTypeByIdTemplateParams = zod.object({
5655
5842
  "id": zod.guid()
5656
5843
  });
@@ -6279,6 +6466,9 @@ var putDocumentByIdNotificationsParams = zod.object({
6279
6466
  var putDocumentByIdNotificationsBody = zod.object({
6280
6467
  "subscribedActionIds": zod.array(zod.string())
6281
6468
  });
6469
+ var patchDocumentByIdPatchParams = zod.object({
6470
+ "id": zod.guid()
6471
+ });
6282
6472
  var getDocumentByIdPreviewUrlParams = zod.object({
6283
6473
  "id": zod.guid()
6284
6474
  });
@@ -6338,7 +6528,7 @@ var getDocumentByIdPublicAccessResponse = zod.object({
6338
6528
  "name": zod.string(),
6339
6529
  "culture": zod.string().nullish()
6340
6530
  })),
6341
- "kind": zod.enum(["Default", "Api"])
6531
+ "kind": zod.enum(["Default", "Api", "ExternalOnly"])
6342
6532
  })),
6343
6533
  "groups": zod.array(zod.object({
6344
6534
  "id": zod.guid(),
@@ -7271,7 +7461,8 @@ var getIndexerResponse = zod.object({
7271
7461
  "searcherName": zod.string(),
7272
7462
  "documentCount": zod.number(),
7273
7463
  "fieldCount": zod.number(),
7274
- "providerProperties": zod.record(zod.string(), zod.unknown().nullable()).nullish()
7464
+ "providerProperties": zod.record(zod.string(), zod.unknown().nullable()).nullish(),
7465
+ "uniqueKeyFieldName": zod.string().nullish()
7275
7466
  }))
7276
7467
  });
7277
7468
  var getIndexerByIndexNameParams = zod.object({
@@ -7287,7 +7478,8 @@ var getIndexerByIndexNameResponse = zod.object({
7287
7478
  "searcherName": zod.string(),
7288
7479
  "documentCount": zod.number(),
7289
7480
  "fieldCount": zod.number(),
7290
- "providerProperties": zod.record(zod.string(), zod.unknown().nullable()).nullish()
7481
+ "providerProperties": zod.record(zod.string(), zod.unknown().nullable()).nullish(),
7482
+ "uniqueKeyFieldName": zod.string().nullish()
7291
7483
  });
7292
7484
  var postIndexerByIndexNameRebuildParams = zod.object({
7293
7485
  "indexName": zod.string()
@@ -7847,6 +8039,16 @@ var putMediaTypeByIdMoveBody = zod.object({
7847
8039
  "id": zod.guid()
7848
8040
  }).nullish()
7849
8041
  });
8042
+ var getMediaTypeByIdSchemaParams = zod.object({
8043
+ "id": zod.guid()
8044
+ });
8045
+ var getMediaTypeByIdSchemaResponse = zod.record(zod.string(), zod.object({
8046
+ "options": zod.object({
8047
+ "propertyNameCaseInsensitive": zod.boolean()
8048
+ }).nullish(),
8049
+ "parent": zod.unknown().nullish(),
8050
+ "root": zod.unknown()
8051
+ }));
7850
8052
  var getMediaTypeAllowedAtRootQueryTakeDefault = 100;
7851
8053
  var getMediaTypeAllowedAtRootQueryParams = zod.object({
7852
8054
  "skip": zod.coerce.number().optional(),
@@ -9121,6 +9323,30 @@ var putMemberTypeByIdMoveBody = zod.object({
9121
9323
  "id": zod.guid()
9122
9324
  }).nullish()
9123
9325
  });
9326
+ var getMemberTypeByIdSchemaParams = zod.object({
9327
+ "id": zod.guid()
9328
+ });
9329
+ var getMemberTypeByIdSchemaResponse = zod.record(zod.string(), zod.object({
9330
+ "options": zod.object({
9331
+ "propertyNameCaseInsensitive": zod.boolean()
9332
+ }).nullish(),
9333
+ "parent": zod.unknown().nullish(),
9334
+ "root": zod.unknown()
9335
+ }));
9336
+ var getMemberTypeAllowedAtRootQueryTakeDefault = 100;
9337
+ var getMemberTypeAllowedAtRootQueryParams = zod.object({
9338
+ "skip": zod.coerce.number().optional(),
9339
+ "take": zod.coerce.number().default(getMemberTypeAllowedAtRootQueryTakeDefault)
9340
+ });
9341
+ var getMemberTypeAllowedAtRootResponse = zod.object({
9342
+ "total": zod.number(),
9343
+ "items": zod.array(zod.object({
9344
+ "id": zod.guid(),
9345
+ "name": zod.string(),
9346
+ "description": zod.string().nullish(),
9347
+ "icon": zod.string().nullish()
9348
+ }))
9349
+ });
9124
9350
  var postMemberTypeAvailableCompositionsBody = zod.object({
9125
9351
  "id": zod.guid().nullish(),
9126
9352
  "currentPropertyAliases": zod.array(zod.string()),
@@ -9365,7 +9591,8 @@ var getFilterMemberResponse = zod.object({
9365
9591
  "lastLockoutDate": zod.iso.datetime({ "local": true, "offset": true }).nullish(),
9366
9592
  "lastPasswordChangeDate": zod.iso.datetime({ "local": true, "offset": true }).nullish(),
9367
9593
  "groups": zod.array(zod.guid()),
9368
- "kind": zod.enum(["Default", "Api"])
9594
+ "kind": zod.enum(["Default", "Api", "ExternalOnly"]),
9595
+ "profileData": zod.string().nullish()
9369
9596
  }))
9370
9597
  });
9371
9598
  var getItemMemberQueryParams = zod.object({
@@ -9387,7 +9614,7 @@ var getItemMemberResponseItem = zod.object({
9387
9614
  "name": zod.string(),
9388
9615
  "culture": zod.string().nullish()
9389
9616
  })),
9390
- "kind": zod.enum(["Default", "Api"])
9617
+ "kind": zod.enum(["Default", "Api", "ExternalOnly"])
9391
9618
  });
9392
9619
  var getItemMemberResponse = zod.array(getItemMemberResponseItem);
9393
9620
  var getItemMemberAncestorsQueryParams = zod.object({
@@ -9411,7 +9638,7 @@ var getItemMemberAncestorsResponseItem = zod.object({
9411
9638
  "name": zod.string(),
9412
9639
  "culture": zod.string().nullish()
9413
9640
  })),
9414
- "kind": zod.enum(["Default", "Api"])
9641
+ "kind": zod.enum(["Default", "Api", "ExternalOnly"])
9415
9642
  }))
9416
9643
  });
9417
9644
  var getItemMemberAncestorsResponse = zod.array(getItemMemberAncestorsResponseItem);
@@ -9439,7 +9666,7 @@ var getItemMemberSearchResponse = zod.object({
9439
9666
  "name": zod.string(),
9440
9667
  "culture": zod.string().nullish()
9441
9668
  })),
9442
- "kind": zod.enum(["Default", "Api"])
9669
+ "kind": zod.enum(["Default", "Api", "ExternalOnly"])
9443
9670
  })),
9444
9671
  "total": zod.number()
9445
9672
  });
@@ -9504,7 +9731,8 @@ var getMemberByIdResponse = zod.object({
9504
9731
  "lastLockoutDate": zod.iso.datetime({ "local": true, "offset": true }).nullish(),
9505
9732
  "lastPasswordChangeDate": zod.iso.datetime({ "local": true, "offset": true }).nullish(),
9506
9733
  "groups": zod.array(zod.guid()),
9507
- "kind": zod.enum(["Default", "Api"])
9734
+ "kind": zod.enum(["Default", "Api", "ExternalOnly"]),
9735
+ "profileData": zod.string().nullish()
9508
9736
  });
9509
9737
  var deleteMemberByIdParams = zod.object({
9510
9738
  "id": zod.guid()
@@ -11437,13 +11665,12 @@ var getUserCurrentPermissionsResponse = zod.object({
11437
11665
  var getUserCurrentPermissionsDocumentQueryParams = zod.object({
11438
11666
  "id": zod.array(zod.guid()).optional()
11439
11667
  });
11440
- var getUserCurrentPermissionsDocumentResponseItem = zod.object({
11668
+ var getUserCurrentPermissionsDocumentResponse = zod.object({
11441
11669
  "permissions": zod.array(zod.object({
11442
11670
  "nodeKey": zod.guid(),
11443
11671
  "permissions": zod.array(zod.string())
11444
11672
  }))
11445
11673
  });
11446
- var getUserCurrentPermissionsDocumentResponse = zod.array(getUserCurrentPermissionsDocumentResponseItem);
11447
11674
  var getUserCurrentPermissionsMediaQueryParams = zod.object({
11448
11675
  "id": zod.array(zod.guid()).optional()
11449
11676
  });
@@ -11738,11 +11965,10 @@ var CreateDataTypeTool = {
11738
11965
  *** PROPERTY EDITOR CONFIGURATION ***
11739
11966
  When creating a new data type you will need to assign a property editor with the correct configuration.
11740
11967
 
11741
- IMPORTANT: Use the get-data-type-property-editor-template tool to:
11742
- - View all available property editors (call without parameters)
11743
- - Get the correct configuration template for a specific property editor (call with editorName parameter)
11744
- - Each template shows the required editorAlias, editorUiAlias, and values configuration
11745
- - Customize the template values to match your specific requirements
11968
+ IMPORTANT: Use the get-data-type-schema tool to:
11969
+ - Get the JSON Schema for an existing data type by its Id to understand its configuration structure
11970
+ - Or use get-data-type-schemas to fetch schemas for multiple data types in a batch
11971
+ - The schema describes the expected value structure for the property editor
11746
11972
 
11747
11973
  *** VALIDATION ***
11748
11974
  If you are not asked for a property editor then stop and ask the user to provide one.
@@ -11928,816 +12154,477 @@ var GetDataTypeConfigurationTool = {
11928
12154
  };
11929
12155
  var get_data_type_configuration_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDataTypeConfigurationTool);
11930
12156
 
11931
- // src/umb-management-api/tools/data-type/get/get-data-type-property-editor-template.ts
12157
+ // src/umb-management-api/tools/data-type/get/get-data-type-schema.ts
11932
12158
 
11933
12159
 
11934
- // src/umb-management-api/tools/data-type/post/property-editor-templates.ts
11935
- var propertyEditorTemplates = {
11936
- "Decimal": {
11937
- "editorAlias": "Umbraco.Decimal",
11938
- "editorUiAlias": "Umb.PropertyEditorUi.Decimal",
11939
- "values": [
11940
- {
11941
- "alias": "step",
11942
- "value": "0.01"
11943
- },
11944
- {
11945
- "alias": "min",
11946
- "value": 3
11947
- },
11948
- {
11949
- "alias": "max",
11950
- "value": 10
11951
- },
11952
- {
11953
- "alias": "placeholder",
11954
- "value": "Item"
11955
- }
11956
- ]
11957
- },
11958
- "Email": {
11959
- "editorAlias": "Umbraco.EmailAddress",
11960
- "editorUiAlias": "Umb.PropertyEditorUi.EmailAddress",
11961
- "values": [
11962
- {
11963
- "alias": "inputType",
11964
- "value": "email"
11965
- }
11966
- ]
11967
- },
11968
- "Label": {
11969
- "editorAlias": "Umbraco.Label",
11970
- "editorUiAlias": "Umb.PropertyEditorUi.Label",
11971
- "values": [
11972
- {
11973
- "alias": "umbracoDataValueType",
11974
- "value": "DECIMAL"
11975
- }
11976
- ],
11977
- "_notes": "Label options: STRING, DECIMAL, DATETIME, TIME, INTEGER, BIGINT, TEXT"
11978
- },
11979
- "Numeric": {
11980
- "editorAlias": "Umbraco.Label",
11981
- "editorUiAlias": "Umb.PropertyEditorUi.Label",
11982
- "values": [
11983
- {
11984
- "alias": "umbracoDataValueType",
11985
- "value": "DECIMAL"
11986
- }
11987
- ]
11988
- },
11989
- "Slider": {
11990
- "editorAlias": "Umbraco.Slider",
11991
- "editorUiAlias": "Umb.PropertyEditorUi.Slider",
11992
- "values": [
11993
- {
11994
- "alias": "minVal",
11995
- "value": 0
11996
- },
11997
- {
11998
- "alias": "maxVal",
11999
- "value": 100
12000
- },
12001
- {
12002
- "alias": "initVal1",
12003
- "value": 0
12004
- },
12005
- {
12006
- "alias": "initVal2",
12007
- "value": 0
12008
- },
12009
- {
12010
- "alias": "step",
12011
- "value": 1
12012
- }
12013
- ]
12014
- },
12015
- "Tags": {
12016
- "editorAlias": "Umbraco.Tags",
12017
- "editorUiAlias": "Umb.PropertyEditorUi.Tags",
12018
- "values": [
12019
- {
12020
- "alias": "group",
12021
- "value": "default"
12022
- },
12023
- {
12024
- "alias": "storageType",
12025
- "value": "Json"
12026
- }
12027
- ],
12028
- "_notes": "Storage options: Json, CSV"
12029
- },
12030
- "Textarea": {
12031
- "editorAlias": "Umbraco.TextArea",
12032
- "editorUiAlias": "Umb.PropertyEditorUi.TextArea",
12033
- "values": [
12034
- {
12035
- "alias": "rows",
12036
- "value": 10
12037
- },
12038
- {
12039
- "alias": "maxChars",
12040
- "value": 100
12041
- },
12042
- {
12043
- "alias": "minHeight",
12044
- "value": 200
12045
- },
12046
- {
12047
- "alias": "maxHeight",
12048
- "value": 100
12049
- }
12050
- ]
12051
- },
12052
- "Textbox": {
12053
- "editorAlias": "Umbraco.TextBox",
12054
- "editorUiAlias": "Umb.PropertyEditorUi.TextBox",
12055
- "values": [
12056
- {
12057
- "alias": "maxChars",
12058
- "value": 512
12059
- },
12060
- {
12061
- "alias": "inputType",
12062
- "value": "text"
12063
- }
12064
- ]
12065
- },
12066
- "Toggle": {
12067
- "editorAlias": "Umbraco.TrueFalse",
12068
- "editorUiAlias": "Umb.PropertyEditorUi.Toggle",
12069
- "values": [
12070
- {
12071
- "alias": "default",
12072
- "value": true
12073
- },
12074
- {
12075
- "alias": "showLabels",
12076
- "value": true
12077
- },
12078
- {
12079
- "alias": "labelOn",
12080
- "value": "On"
12081
- },
12082
- {
12083
- "alias": "labelOff",
12084
- "value": "Off"
12085
- },
12086
- {
12087
- "alias": "ariaLabel",
12088
- "value": "Reader"
12089
- }
12090
- ]
12091
- },
12160
+
12161
+
12162
+
12163
+
12164
+ // src/umb-management-api/tools/data-type/get/get-data-type-schema-modern.ts
12165
+
12166
+ async function getDataTypeSchemaFromApi(id) {
12167
+ const client = UmbracoManagementClient3.getClient();
12168
+ const response = await client.getDataTypeByIdSchema(
12169
+ id,
12170
+ _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
12171
+ );
12172
+ return _nullishCoalesce(response.data, () => ( {}));
12173
+ }
12174
+
12175
+ // src/umb-management-api/tools/document/post/property-value-templates.ts
12176
+ var propertyValueTemplates = {
12092
12177
  "BlockList": {
12093
- "editorAlias": "Umbraco.BlockList",
12094
- "editorUiAlias": "Umb.PropertyEditorUi.BlockList",
12095
- "values": [
12096
- {
12097
- "alias": "blocks",
12098
- "value": [
12178
+ editorAlias: "Umbraco.BlockList",
12179
+ value: {
12180
+ layout: {
12181
+ "Umbraco.BlockList": [
12099
12182
  {
12100
- "contentElementTypeKey": "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
12101
- "settingsElementTypeKey": "2e1a4fd4-b695-4033-8626-1a45b54e04cb",
12102
- "backgroundColor": "#c05454",
12103
- "iconColor": "#00ff6f"
12183
+ contentKey: "7a61b31c-792f-4f6b-a665-960a90b49853"
12104
12184
  }
12105
12185
  ]
12106
12186
  },
12107
- {
12108
- "alias": "validationLimit",
12109
- "value": {
12110
- "max": 3
12187
+ contentData: [
12188
+ {
12189
+ key: "7a61b31c-792f-4f6b-a665-960a90b49853",
12190
+ contentTypeKey: "3a7ec32d-7fd4-49f8-aae6-d9259d5bfee1",
12191
+ values: [
12192
+ {
12193
+ editorAlias: "Umbraco.MediaPicker3",
12194
+ culture: null,
12195
+ segment: null,
12196
+ alias: "recipeImage",
12197
+ value: [
12198
+ {
12199
+ key: "9bac772d-cd63-4bb6-b2db-1449042129a7",
12200
+ mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
12201
+ mediaTypeAlias: "",
12202
+ crops: [],
12203
+ focalPoint: null
12204
+ }
12205
+ ]
12206
+ }
12207
+ ]
12111
12208
  }
12112
- },
12113
- {
12114
- "alias": "useLiveEditing",
12115
- "value": true
12116
- },
12117
- {
12118
- "alias": "useInlineEditingAsDefault",
12119
- "value": true
12120
- },
12121
- {
12122
- "alias": "maxPropertyWidth",
12123
- "value": "100px"
12124
- }
12125
- ],
12126
- "_notes": "IMPORTANT - when creating new block list data types always create the required element types first before creating the data type"
12209
+ ],
12210
+ settingsData: [],
12211
+ expose: [
12212
+ {
12213
+ contentKey: "7a61b31c-792f-4f6b-a665-960a90b49853",
12214
+ culture: null,
12215
+ segment: null
12216
+ }
12217
+ ]
12218
+ },
12219
+ _notes: "Complex structure with layout, contentData, settingsData, and expose arrays. contentData.values contains nested property values. All keys must be unique UUIDs."
12127
12220
  },
12128
- "CheckBoxList": {
12129
- "editorAlias": "Umbraco.BlockList",
12130
- "editorUiAlias": "Umb.PropertyEditorUi.BlockList",
12131
- "values": [
12132
- {
12133
- "alias": "blocks",
12134
- "value": [
12221
+ "BlockGrid": {
12222
+ editorAlias: "Umbraco.BlockGrid",
12223
+ value: {
12224
+ layout: {
12225
+ "Umbraco.BlockGrid": [
12135
12226
  {
12136
- "contentElementTypeKey": "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
12137
- "settingsElementTypeKey": "2e1a4fd4-b695-4033-8626-1a45b54e04cb",
12138
- "backgroundColor": "#c05454",
12139
- "iconColor": "#00ff6f"
12227
+ contentKey: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
12228
+ columnSpan: 12,
12229
+ rowSpan: 1,
12230
+ areas: [
12231
+ {
12232
+ key: "43743e78-0f2b-465e-a3ce-f381c90b68e0",
12233
+ items: [
12234
+ {
12235
+ contentKey: "3145f922-7ec1-41e0-99a5-d9677e558163",
12236
+ settingsKey: "6248d134-4657-4605-b0d5-ae804858bb88",
12237
+ columnSpan: 6,
12238
+ rowSpan: 1
12239
+ }
12240
+ ]
12241
+ }
12242
+ ]
12140
12243
  }
12141
12244
  ]
12142
12245
  },
12143
- {
12144
- "alias": "validationLimit",
12145
- "value": {
12146
- "max": 3
12246
+ contentData: [
12247
+ {
12248
+ key: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
12249
+ contentTypeKey: "6960aaca-0b26-4fae-9cee-db73405d7a3e",
12250
+ values: [
12251
+ {
12252
+ editorAlias: "Umbraco.TextBox",
12253
+ culture: null,
12254
+ segment: null,
12255
+ alias: "title",
12256
+ value: "Title"
12257
+ },
12258
+ {
12259
+ editorAlias: "Umbraco.RichText",
12260
+ culture: null,
12261
+ segment: null,
12262
+ alias: "bodyText",
12263
+ value: {
12264
+ markup: "<p>Content here</p>",
12265
+ blocks: {
12266
+ layout: {},
12267
+ contentData: [],
12268
+ settingsData: [],
12269
+ expose: []
12270
+ }
12271
+ }
12272
+ },
12273
+ {
12274
+ editorAlias: "Umbraco.MediaPicker3",
12275
+ culture: null,
12276
+ segment: null,
12277
+ alias: "image",
12278
+ value: [
12279
+ {
12280
+ key: "40edd153-31eb-4c61-82fc-1ec2e695197b",
12281
+ mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
12282
+ mediaTypeAlias: "",
12283
+ crops: [],
12284
+ focalPoint: null
12285
+ }
12286
+ ]
12287
+ }
12288
+ ]
12289
+ },
12290
+ {
12291
+ key: "3145f922-7ec1-41e0-99a5-d9677e558163",
12292
+ contentTypeKey: "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
12293
+ values: [
12294
+ {
12295
+ editorAlias: "Umbraco.TextBox",
12296
+ culture: null,
12297
+ segment: null,
12298
+ alias: "title",
12299
+ value: "Nested Title"
12300
+ },
12301
+ {
12302
+ editorAlias: "Umbraco.RichText",
12303
+ culture: null,
12304
+ segment: null,
12305
+ alias: "content",
12306
+ value: {
12307
+ markup: "<p>Nested content</p>",
12308
+ blocks: {
12309
+ layout: {},
12310
+ contentData: [],
12311
+ settingsData: [],
12312
+ expose: []
12313
+ }
12314
+ }
12315
+ }
12316
+ ]
12147
12317
  }
12148
- },
12149
- {
12150
- "alias": "useLiveEditing",
12151
- "value": true
12152
- },
12153
- {
12154
- "alias": "useInlineEditingAsDefault",
12155
- "value": true
12156
- },
12157
- {
12158
- "alias": "maxPropertyWidth",
12159
- "value": "100px"
12160
- }
12318
+ ],
12319
+ settingsData: [
12320
+ {
12321
+ key: "6248d134-4657-4605-b0d5-ae804858bb88",
12322
+ contentTypeKey: "06200e23-1c29-4298-9582-48b2eaa81fbf",
12323
+ values: []
12324
+ }
12325
+ ],
12326
+ expose: [
12327
+ {
12328
+ contentKey: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
12329
+ culture: null,
12330
+ segment: null
12331
+ },
12332
+ {
12333
+ contentKey: "3145f922-7ec1-41e0-99a5-d9677e558163",
12334
+ culture: null,
12335
+ segment: null
12336
+ }
12337
+ ]
12338
+ },
12339
+ _notes: "Complex hierarchical structure with areas and nested items. Layout defines structure with columnSpan/rowSpan. contentData stores actual content. All keys must be unique UUIDs."
12340
+ },
12341
+ "Decimal": {
12342
+ editorAlias: "Umbraco.Decimal",
12343
+ value: 1.2
12344
+ },
12345
+ "EmailAddress": {
12346
+ editorAlias: "Umbraco.EmailAddress",
12347
+ value: "admin@admin.co.uk"
12348
+ },
12349
+ "Integer": {
12350
+ editorAlias: "Umbraco.Integer",
12351
+ value: 1
12352
+ },
12353
+ "Tags": {
12354
+ editorAlias: "Umbraco.Tags",
12355
+ value: [
12356
+ "Tag 1",
12357
+ "Tag 2"
12161
12358
  ]
12162
12359
  },
12163
- "Collection": {
12164
- "editorAlias": "Umbraco.BlockList",
12165
- "editorUiAlias": "Umb.PropertyEditorUi.BlockList",
12166
- "values": [
12167
- {
12168
- "alias": "blocks",
12169
- "value": [
12170
- {
12171
- "contentElementTypeKey": "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
12172
- "settingsElementTypeKey": "2e1a4fd4-b695-4033-8626-1a45b54e04cb",
12173
- "backgroundColor": "#c05454",
12174
- "iconColor": "#00ff6f"
12175
- }
12176
- ]
12177
- },
12178
- {
12179
- "alias": "validationLimit",
12180
- "value": {
12181
- "max": 3
12182
- }
12183
- },
12184
- {
12185
- "alias": "useLiveEditing",
12186
- "value": true
12187
- },
12188
- {
12189
- "alias": "useInlineEditingAsDefault",
12190
- "value": true
12191
- },
12192
- {
12193
- "alias": "maxPropertyWidth",
12194
- "value": "100px"
12195
- }
12360
+ "ColorPicker": {
12361
+ editorAlias: "Umbraco.ColorPicker",
12362
+ value: {
12363
+ label: "Green",
12364
+ value: "#00FF00"
12365
+ }
12366
+ },
12367
+ "TrueFalse": {
12368
+ editorAlias: "Umbraco.TrueFalse",
12369
+ value: true
12370
+ },
12371
+ "CheckBoxList": {
12372
+ editorAlias: "Umbraco.CheckBoxList",
12373
+ value: [
12374
+ "item 1",
12375
+ "items 2"
12196
12376
  ]
12197
12377
  },
12198
12378
  "Dropdown": {
12199
- "editorAlias": "Umbraco.DropDown.Flexible",
12200
- "editorUiAlias": "Umb.PropertyEditorUi.Dropdown",
12201
- "values": [
12202
- {
12203
- "alias": "items",
12204
- "value": [
12205
- "Item 1",
12206
- "Item 2"
12207
- ]
12208
- },
12209
- {
12210
- "alias": "multiple",
12211
- "value": true
12212
- }
12379
+ editorAlias: "Umbraco.DropDown.Flexible",
12380
+ value: [
12381
+ "Item 3"
12213
12382
  ]
12214
12383
  },
12215
- "MultipleTextString": {
12216
- "editorAlias": "Umbraco.MultipleTextstring",
12217
- "editorUiAlias": "Umb.PropertyEditorUi.MultipleTextString",
12218
- "values": [
12219
- {
12220
- "alias": "min",
12221
- "value": 3
12222
- },
12223
- {
12224
- "alias": "max",
12225
- "value": 10
12226
- }
12384
+ "MultipleTextstring": {
12385
+ editorAlias: "Umbraco.MultipleTextstring",
12386
+ value: [
12387
+ "Item 1",
12388
+ "item 2"
12227
12389
  ]
12228
12390
  },
12229
12391
  "RadioButtonList": {
12230
- "editorAlias": "Umbraco.RadioButtonList",
12231
- "editorUiAlias": "Umb.PropertyEditorUi.RadioButtonList",
12232
- "values": [
12233
- {
12234
- "alias": "items",
12235
- "value": [
12236
- "Item 1",
12237
- "Item 2"
12238
- ]
12239
- }
12240
- ]
12392
+ editorAlias: "Umbraco.RadioButtonList",
12393
+ value: "item 1"
12241
12394
  },
12242
12395
  "ImageCropper": {
12243
- "_notes": "Doesn't work"
12396
+ editorAlias: "Umbraco.ImageCropper",
12397
+ value: {
12398
+ temporaryFileId: "b45eb1dd-2959-4b0b-a675-761b6a19824c",
12399
+ src: "",
12400
+ crops: [],
12401
+ focalPoint: {
12402
+ left: 0.5,
12403
+ top: 0.5
12404
+ }
12405
+ },
12406
+ _notes: "IMPORTANT: Requires a temporary file uploaded first. Use the temporaryFileId from the upload response."
12244
12407
  },
12245
- "MediaPicker": {
12246
- "editorAlias": "Umbraco.MediaPicker3",
12247
- "editorUiAlias": "Umb.PropertyEditorUi.MediaPicker",
12248
- "values": [
12249
- {
12250
- "alias": "filter",
12251
- "value": "cc07b313-0843-4aa8-bbda-871c8da728c8"
12252
- },
12253
- {
12254
- "alias": "multiple",
12255
- "value": true
12256
- },
12257
- {
12258
- "alias": "validationLimit",
12259
- "value": {
12260
- "max": 10
12261
- }
12262
- },
12263
- {
12264
- "alias": "startNodeId"
12265
- },
12266
- {
12267
- "alias": "enableLocalFocalPoint",
12268
- "value": true
12269
- },
12408
+ "MediaPicker3": {
12409
+ editorAlias: "Umbraco.MediaPicker3",
12410
+ value: [
12270
12411
  {
12271
- "alias": "ignoreUserStartNodes",
12272
- "value": true
12412
+ key: "4c82123c-cd3e-4d92-84b8-9c79ad5a5319",
12413
+ mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
12414
+ mediaTypeAlias: "",
12415
+ crops: [],
12416
+ focalPoint: null
12273
12417
  }
12274
- ]
12418
+ ],
12419
+ _notes: "The key is generated by you. The mediaKey relates to an existing media item id."
12275
12420
  },
12276
12421
  "UploadField": {
12277
- "editorAlias": "Umbraco.UploadField",
12278
- "editorUiAlias": "Umb.PropertyEditorUi.UploadField",
12279
- "values": [
12280
- {
12281
- "alias": "fileExtensions",
12282
- "value": [
12283
- "pdf"
12284
- ]
12285
- }
12286
- ]
12422
+ editorAlias: "Umbraco.UploadField",
12423
+ value: {
12424
+ src: "blob:http://localhost:56472/0884388b-41a3-46c2-a224-9b9ff02de24a",
12425
+ temporaryFileId: "fc76f270-83c2-4daa-ba8b-fde4554dda2a"
12426
+ },
12427
+ _notes: "IMPORTANT: Requires a temporary file uploaded first. Use the temporaryFileId from the upload response."
12428
+ },
12429
+ "Slider": {
12430
+ editorAlias: "Umbraco.Slider",
12431
+ value: {
12432
+ from: 31,
12433
+ to: 31
12434
+ }
12287
12435
  },
12288
12436
  "MemberGroupPicker": {
12289
- "editorAlias": "Umbraco.MemberGroupPicker",
12290
- "editorUiAlias": "Umb.PropertyEditorUi.MemberGroupPicker",
12291
- "values": []
12437
+ editorAlias: "Umbraco.MemberGroupPicker",
12438
+ value: "9815503d-a5a9-487f-aee3-827ca43fdb2c",
12439
+ _notes: "The value relates to an existing member group id."
12292
12440
  },
12293
12441
  "MemberPicker": {
12294
- "editorAlias": "Umbraco.MemberPicker",
12295
- "editorUiAlias": "Umb.PropertyEditorUi.MemberPicker",
12296
- "values": []
12442
+ editorAlias: "Umbraco.MemberPicker",
12443
+ value: "f8abd31e-c78d-46ea-bb6b-c00cb9107bfb",
12444
+ _notes: "The value relates to an existing member id."
12297
12445
  },
12298
12446
  "UserPicker": {
12299
- "editorAlias": "Umbraco.UserPicker",
12300
- "editorUiAlias": "Umb.PropertyEditorUi.UserPicker",
12301
- "values": []
12447
+ editorAlias: "Umbraco.UserPicker",
12448
+ value: "1e70f841-c261-413b-abb2-2d68cdb96094",
12449
+ _notes: "The value relates to an existing user id."
12302
12450
  },
12303
- "ColorPicker": {
12304
- "editorAlias": "Umbraco.ColorPicker",
12305
- "editorUiAlias": "Umb.PropertyEditorUi.ColorPicker",
12306
- "values": [
12451
+ "MultiNodeTreePicker": {
12452
+ editorAlias: "Umbraco.MultiNodeTreePicker",
12453
+ value: [
12307
12454
  {
12308
- "alias": "useLabel",
12309
- "value": true
12310
- },
12311
- {
12312
- "alias": "items",
12313
- "value": [
12314
- {
12315
- "value": "F00",
12316
- "label": "Red"
12317
- }
12318
- ]
12319
- }
12320
- ]
12321
- },
12322
- "ContentPicker": {
12323
- "editorAlias": "Umbraco.MultiNodeTreePicker",
12324
- "editorUiAlias": "Umb.PropertyEditorUi.ContentPicker",
12325
- "values": [
12326
- {
12327
- "alias": "minNumber",
12328
- "value": 0
12329
- },
12330
- {
12331
- "alias": "maxNumber",
12332
- "value": 0
12333
- },
12334
- {
12335
- "alias": "ignoreUserStartNodes",
12336
- "value": true
12337
- },
12338
- {
12339
- "alias": "startNode",
12340
- "value": {
12341
- "type": "content",
12342
- "dynamicRoot": {
12343
- "originAlias": "Current"
12344
- }
12345
- }
12346
- },
12347
- {
12348
- "alias": "filter",
12349
- "value": "0fde8472-7c10-4e8a-bd4a-fffc0306d0aa"
12350
- },
12351
- {
12352
- "alias": "showOpenButton",
12353
- "value": true
12455
+ type: "document",
12456
+ unique: "dcf18a51-6919-4cf8-89d1-36b94ce4d963"
12354
12457
  }
12355
- ]
12458
+ ],
12459
+ _notes: "The unique property relates to an existing document, media, or member id. Type can be 'document', 'media', or 'member'."
12356
12460
  },
12357
- "DatePicker": {
12358
- "editorAlias": "Umbraco.DateTime",
12359
- "editorUiAlias": "Umb.PropertyEditorUi.DatePicker",
12360
- "values": [
12361
- {
12362
- "alias": "format",
12363
- "value": "YYYY-MM-DD HH:mm:ss"
12364
- }
12365
- ]
12461
+ "DateTime": {
12462
+ editorAlias: "Umbraco.DateTime",
12463
+ value: "2025-05-23 00:00:00"
12366
12464
  },
12367
- "DocumentPicker": {
12368
- "editorAlias": "Umbraco.ContentPicker",
12369
- "editorUiAlias": "Umb.PropertyEditorUi.DocumentPicker",
12370
- "values": [
12371
- {
12372
- "alias": "ignoreUserStartNodes",
12373
- "value": true
12374
- },
12375
- {
12376
- "alias": "startNodeId",
12377
- "value": "dcf18a51-6919-4cf8-89d1-36b94ce4d963"
12378
- },
12379
- {
12380
- "alias": "showOpenButton",
12381
- "value": true
12382
- }
12383
- ]
12465
+ "ContentPicker": {
12466
+ editorAlias: "Umbraco.ContentPicker",
12467
+ value: "dcf18a51-6919-4cf8-89d1-36b94ce4d963",
12468
+ _notes: "The value relates to an existing document id."
12384
12469
  },
12385
- "EyeDropper": {
12386
- "editorAlias": "Umbraco.ColorPicker.EyeDropper",
12387
- "editorUiAlias": "Umb.PropertyEditorUi.EyeDropper",
12388
- "values": [
12389
- {
12390
- "alias": "showAlpha",
12391
- "value": true
12392
- },
12393
- {
12394
- "alias": "showPalette",
12395
- "value": true
12396
- }
12397
- ]
12470
+ "ColorPickerEyeDropper": {
12471
+ editorAlias: "Umbraco.ColorPicker.EyeDropper",
12472
+ value: "#982020"
12398
12473
  },
12399
12474
  "MultiUrlPicker": {
12400
- "editorAlias": "Umbraco.MultiUrlPicker",
12401
- "editorUiAlias": "Umb.PropertyEditorUi.MultiUrlPicker",
12402
- "values": [
12403
- {
12404
- "alias": "minNumber",
12405
- "value": 1
12406
- },
12407
- {
12408
- "alias": "maxNumber",
12409
- "value": 3
12410
- },
12475
+ editorAlias: "Umbraco.MultiUrlPicker",
12476
+ value: [
12411
12477
  {
12412
- "alias": "ignoreUserStartNodes",
12413
- "value": true
12478
+ icon: "icon-home color-blue",
12479
+ name: "Home",
12480
+ type: "document",
12481
+ unique: "dcf18a51-6919-4cf8-89d1-36b94ce4d963",
12482
+ url: "/"
12414
12483
  },
12415
12484
  {
12416
- "alias": "hideAnchor",
12417
- "value": false
12418
- }
12419
- ]
12420
- },
12421
- "BlockGrid": {
12422
- "editorAlias": "Umbraco.BlockGrid",
12423
- "editorUiAlias": "Umb.PropertyEditorUi.BlockGrid",
12424
- "values": [
12425
- {
12426
- "alias": "gridColumns",
12427
- "value": 12
12485
+ icon: "icon-picture",
12486
+ name: "Chairs lamps",
12487
+ type: "media",
12488
+ unique: "3c6c415c-35a0-4629-891e-683506250c31",
12489
+ url: "http://localhost:56472/media/0ofdvcwj/chairs-lamps.jpg"
12428
12490
  },
12429
12491
  {
12430
- "alias": "blocks",
12431
- "value": [
12432
- {
12433
- "contentElementTypeKey": "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
12434
- "allowAtRoot": true,
12435
- "allowInAreas": true,
12436
- "settingsElementTypeKey": "93638715-f76c-4a11-86b1-6a9d66504901",
12437
- "columnSpanOptions": [
12438
- {
12439
- "columnSpan": 12
12440
- }
12441
- ],
12442
- "rowMinSpan": 0,
12443
- "rowMaxSpan": 3
12444
- }
12445
- ]
12492
+ name: "Title",
12493
+ target: "_blank",
12494
+ type: "external",
12495
+ url: "www.google.com"
12446
12496
  }
12447
12497
  ],
12448
- "_notes": "IMPORTANT - when creating new block grid data types always create the required element types first before creating the data type"
12498
+ _notes: "Can contain document, media, or external link entries. For document/media, unique is the content id."
12499
+ },
12500
+ "MarkdownEditor": {
12501
+ editorAlias: "Umbraco.MarkdownEditor",
12502
+ value: "Markdown"
12449
12503
  },
12450
12504
  "CodeEditor": {
12451
- "editorAlias": "Umbraco.Plain.String",
12452
- "editorUiAlias": "Umb.PropertyEditorUi.CodeEditor",
12453
- "values": [
12454
- {
12455
- "alias": "language",
12456
- "value": "javascript"
12457
- },
12458
- {
12459
- "alias": "height",
12460
- "value": 400
12461
- },
12462
- {
12463
- "alias": "lineNumbers",
12464
- "value": true
12465
- },
12466
- {
12467
- "alias": "minimap",
12468
- "value": true
12469
- },
12470
- {
12471
- "alias": "wordWrap",
12472
- "value": false
12473
- }
12474
- ]
12505
+ editorAlias: "Umbraco.CodeEditor",
12506
+ value: "Code"
12475
12507
  },
12476
- "MarkdownEditor": {
12477
- "editorAlias": "Umbraco.MarkdownEditor",
12478
- "editorUiAlias": "Umb.PropertyEditorUi.MarkdownEditor",
12479
- "values": [
12480
- {
12481
- "alias": "preview",
12482
- "value": true
12483
- },
12484
- {
12485
- "alias": "defaultValue",
12486
- "value": "Default value"
12487
- },
12488
- {
12489
- "alias": "overlaySize",
12490
- "value": "small"
12491
- }
12492
- ]
12508
+ "Textbox": {
12509
+ editorAlias: "Umbraco.TextBox",
12510
+ value: "some string"
12493
12511
  },
12494
- "RichTextEditor_TinyMCE": {
12495
- "editorAlias": "Umbraco.RichText",
12496
- "editorUiAlias": "Umb.PropertyEditorUi.TinyMCE",
12497
- "values": [
12498
- {
12499
- "alias": "toolbar",
12500
- "value": [
12501
- "styles",
12502
- "bold",
12503
- "italic",
12504
- "alignleft",
12505
- "aligncenter",
12506
- "alignright",
12507
- "bullist",
12508
- "numlist",
12509
- "outdent",
12510
- "indent",
12511
- "sourcecode",
12512
- "link",
12513
- "umbmediapicker",
12514
- "umbembeddialog"
12515
- ]
12516
- },
12517
- {
12518
- "alias": "mode",
12519
- "value": "Classic"
12520
- },
12521
- {
12522
- "alias": "maxImageSize",
12523
- "value": 500
12524
- },
12525
- {
12526
- "alias": "blocks",
12527
- "value": [
12528
- {
12529
- "contentElementTypeKey": "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
12530
- "settingsElementTypeKey": "93638715-f76c-4a11-86b1-6a9d66504901",
12531
- "label": "Appearance",
12532
- "displayInline": true,
12533
- "editorSize": "small",
12534
- "backgroundColor": "#000000",
12535
- "iconColor": "#000000"
12536
- }
12537
- ]
12538
- },
12539
- {
12540
- "alias": "mediaParentId"
12541
- },
12542
- {
12543
- "alias": "ignoreUserStartNodes",
12544
- "value": true
12545
- }
12546
- ]
12512
+ "TextArea": {
12513
+ editorAlias: "Umbraco.TextArea",
12514
+ value: "some string"
12547
12515
  },
12548
- "RichTextEditor_Tiptap": {
12549
- "editorAlias": "Umbraco.RichText",
12550
- "editorUiAlias": "Umb.PropertyEditorUi.Tiptap",
12551
- "values": [
12552
- {
12553
- "alias": "toolbar",
12554
- "value": [
12555
- [
12556
- [
12557
- "Umb.Tiptap.Toolbar.SourceEditor"
12558
- ],
12559
- [
12560
- "Umb.Tiptap.Toolbar.Bold",
12561
- "Umb.Tiptap.Toolbar.Italic",
12562
- "Umb.Tiptap.Toolbar.Underline"
12563
- ],
12564
- [
12565
- "Umb.Tiptap.Toolbar.TextAlignLeft",
12566
- "Umb.Tiptap.Toolbar.TextAlignCenter",
12567
- "Umb.Tiptap.Toolbar.TextAlignRight"
12568
- ],
12569
- [
12570
- "Umb.Tiptap.Toolbar.BulletList",
12571
- "Umb.Tiptap.Toolbar.OrderedList"
12572
- ],
12573
- [
12574
- "Umb.Tiptap.Toolbar.Blockquote",
12575
- "Umb.Tiptap.Toolbar.HorizontalRule"
12576
- ],
12577
- [
12578
- "Umb.Tiptap.Toolbar.Link",
12579
- "Umb.Tiptap.Toolbar.Unlink"
12580
- ],
12581
- [
12582
- "Umb.Tiptap.Toolbar.MediaPicker",
12583
- "Umb.Tiptap.Toolbar.EmbeddedMedia"
12584
- ]
12585
- ]
12586
- ]
12587
- },
12588
- {
12589
- "alias": "maxImageSize",
12590
- "value": 500
12591
- },
12592
- {
12593
- "alias": "overlaySize",
12594
- "value": "medium"
12595
- },
12596
- {
12597
- "alias": "extensions",
12598
- "value": [
12599
- "Umb.Tiptap.Embed",
12600
- "Umb.Tiptap.Figure",
12601
- "Umb.Tiptap.Image",
12602
- "Umb.Tiptap.Link",
12603
- "Umb.Tiptap.MediaUpload",
12604
- "Umb.Tiptap.RichTextEssentials",
12605
- "Umb.Tiptap.Subscript",
12606
- "Umb.Tiptap.Superscript",
12607
- "Umb.Tiptap.Table",
12608
- "Umb.Tiptap.TextAlign",
12609
- "Umb.Tiptap.TextDirection",
12610
- "Umb.Tiptap.Underline"
12611
- ]
12516
+ "RichTextEditor": {
12517
+ editorAlias: "Umbraco.RichText",
12518
+ value: {
12519
+ markup: "<p>some string</p>",
12520
+ blocks: {
12521
+ layout: {},
12522
+ contentData: [],
12523
+ settingsData: [],
12524
+ expose: []
12612
12525
  }
12613
- ]
12526
+ },
12527
+ _notes: "The blocks property has the same structure as BlockList. Can include nested block content within the rich text."
12614
12528
  }
12615
12529
  };
12616
12530
 
12617
- // src/umb-management-api/tools/data-type/get/get-data-type-property-editor-template.ts
12618
-
12619
-
12531
+ // src/umb-management-api/tools/data-type/get/get-data-type-schema-legacy.ts
12532
+ var VALUE_TYPE_BY_EDITOR_ALIAS = {
12533
+ "Umbraco.TextBox": "STRING",
12534
+ "Umbraco.TextArea": "STRING",
12535
+ "Umbraco.MarkdownEditor": "STRING",
12536
+ "Umbraco.CodeEditor": "STRING",
12537
+ "Umbraco.EmailAddress": "STRING",
12538
+ "Umbraco.Integer": "INTEGER",
12539
+ "Umbraco.Decimal": "DECIMAL",
12540
+ "Umbraco.DateTime": "DATETIME",
12541
+ "Umbraco.TrueFalse": "INTEGER",
12542
+ "Umbraco.Label": "STRING"
12543
+ };
12544
+ function findTemplateByEditorAlias(editorAlias) {
12545
+ const key = Object.keys(propertyValueTemplates).find(
12546
+ (k) => propertyValueTemplates[k].editorAlias.toLowerCase() === editorAlias.toLowerCase()
12547
+ );
12548
+ return key ? propertyValueTemplates[key] : void 0;
12549
+ }
12550
+ async function synthesizeDataTypeSchema(id) {
12551
+ const client = UmbracoManagementClient3.getClient();
12552
+ const dataType = await client.getDataTypeById(id);
12553
+ const template = findTemplateByEditorAlias(dataType.editorAlias);
12554
+ const valueTypeName = _nullishCoalesce(VALUE_TYPE_BY_EDITOR_ALIAS[dataType.editorAlias], () => ( (_optionalChain([template, 'optionalAccess', _9 => _9.value]) !== void 0 ? "JSON" : null)));
12555
+ const jsonSchema = {
12556
+ $schema: "https://json-schema.org/draft/2020-12/schema",
12557
+ title: dataType.name,
12558
+ description: "Synthesized from hardcoded property-value templates (Umbraco < 17.4 fallback).",
12559
+ dataTypeId: dataType.id,
12560
+ editorAlias: dataType.editorAlias,
12561
+ editorUiAlias: dataType.editorUiAlias,
12562
+ example: _optionalChain([template, 'optionalAccess', _10 => _10.value]),
12563
+ notes: _optionalChain([template, 'optionalAccess', _11 => _11._notes])
12564
+ };
12565
+ return { valueTypeName, jsonSchema };
12566
+ }
12620
12567
 
12568
+ // src/umb-management-api/tools/data-type/get/get-data-type-schema.ts
12569
+ var dataTypeSchemaOutputSchema = _zod.z.object({
12570
+ valueTypeName: _zod.z.string().nullish(),
12571
+ jsonSchema: _zod.z.unknown().nullish()
12572
+ });
12573
+ var outputSchema3 = dataTypeSchemaOutputSchema;
12574
+ var GetDataTypeSchemaTool = {
12575
+ name: "get-data-type-schema",
12576
+ description: `Gets the JSON Schema for a data type by Id.
12621
12577
 
12578
+ Returns a JSON Schema describing the value structure for the specified data type, including its configured property editor settings.
12622
12579
 
12623
- var propertyEditorTemplateSchema = _zod.z.object({
12624
- editorName: _zod.z.string().optional().describe("The name of the property editor template to retrieve (e.g., 'Textbox', 'Toggle', 'RichTextEditor_TinyMCE'). If not provided, returns a list of all available property editor names.")
12625
- });
12626
- var propertyEditorTemplateValueSchema = _zod.z.object({
12627
- alias: _zod.z.string(),
12628
- value: _zod.z.any().optional()
12629
- });
12630
- var propertyEditorTemplateItemSchema = _zod.z.object({
12631
- editorAlias: _zod.z.string().optional(),
12632
- editorUiAlias: _zod.z.string().optional(),
12633
- values: _zod.z.array(propertyEditorTemplateValueSchema).optional(),
12634
- _notes: _zod.z.string().optional()
12635
- });
12636
- var propertyEditorTemplateOutputSchema = _zod.z.object({
12637
- type: _zod.z.enum(["list", "template"]).describe("Whether this is a list of available editors or a specific template"),
12638
- availableEditors: _zod.z.array(_zod.z.object({
12639
- name: _zod.z.string(),
12640
- notes: _zod.z.string().optional()
12641
- })).optional().describe("Available editors (when type is 'list')"),
12642
- name: _zod.z.string().optional().describe("Editor name (when type is 'template')"),
12643
- template: propertyEditorTemplateItemSchema.optional().describe("Editor template (when type is 'template')")
12644
- });
12645
- var GetDataTypePropertyEditorTemplateTool = {
12646
- name: "get-data-type-property-editor-template",
12647
- description: `Retrieves property editor templates for creating data types in Umbraco.
12648
-
12649
- IMPORTANT: This tool should be used BEFORE creating data types to understand:
12650
- - What property editors are available
12651
- - The required configuration structure for each property editor
12652
- - Example values that can be customized for your needs
12653
-
12654
- Usage:
12655
- 1. Call without parameters to see all available property editor names
12656
- 2. Call with a specific editorName to get the full configuration template for that property editor
12657
- 3. Use the returned template as a starting point when creating new data types with create-data-type
12658
-
12659
- The templates include:
12660
- - editorAlias: The internal Umbraco editor identifier (required)
12661
- - editorUiAlias: The UI component identifier (required)
12662
- - values: An array of configuration options with example values
12663
- - _notes: Important information about special requirements or options
12664
-
12665
- Note: Some templates (like BlockList, BlockGrid) have _notes indicating you must create element types first before creating the data type.`,
12666
- inputSchema: propertyEditorTemplateSchema.shape,
12667
- outputSchema: propertyEditorTemplateOutputSchema.shape,
12580
+ IMPORTANT: Use this tool BEFORE creating data types to understand the expected configuration structure for a specific property editor.`,
12581
+ inputSchema: getDataTypeByIdSchemaParams.shape,
12582
+ outputSchema: outputSchema3.shape,
12668
12583
  annotations: {
12669
12584
  readOnlyHint: true
12670
12585
  },
12671
- slices: ["templates"],
12672
- handler: (async (model) => {
12673
- if (!model.editorName) {
12674
- const availableEditors = Object.entries(propertyEditorTemplates).map(([name, config]) => ({
12675
- name,
12676
- notes: config._notes
12677
- })).sort((a, b) => a.name.localeCompare(b.name));
12678
- const structuredOutput2 = {
12679
- type: "list",
12680
- availableEditors
12681
- };
12682
- const text = `Available Property Editor Templates:
12586
+ slices: ["read"],
12587
+ handler: async ({ id }) => {
12588
+ const result = isUmbracoAtLeast(17, 4) ? await getDataTypeSchemaFromApi(id) : await synthesizeDataTypeSchema(id);
12589
+ return _mcpserversdk.createToolResult.call(void 0, result);
12590
+ }
12591
+ };
12592
+ var get_data_type_schema_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDataTypeSchemaTool);
12683
12593
 
12684
- ${availableEditors.map((e) => `- ${e.name}${e.notes ? ` (${e.notes})` : ""}`).join("\n")}
12594
+ // src/umb-management-api/tools/data-type/get/get-data-type-schemas.ts
12685
12595
 
12686
- Use get-data-type-property-editor-template with a specific editorName to see the full configuration.`;
12687
- return _mcpserversdk.createToolResult.call(void 0, structuredOutput2);
12688
- }
12689
- const editorKey = Object.keys(propertyEditorTemplates).find(
12690
- (key) => key.toLowerCase() === model.editorName.toLowerCase()
12691
- );
12692
- if (!editorKey) {
12693
- const availableEditors = Object.keys(propertyEditorTemplates).sort().join(", ");
12694
- const errorData = {
12695
- title: "Property editor template not found",
12696
- detail: `Property editor template '${model.editorName}' not found. Available templates: ${availableEditors}. Note: Editor names are case-insensitive.`,
12697
- availableTemplates: Object.keys(propertyEditorTemplates).sort()
12698
- };
12699
- return _mcpserversdk.createToolResultError.call(void 0, errorData);
12700
- }
12701
- const template = propertyEditorTemplates[editorKey];
12702
- const structuredOutput = {
12703
- type: "template",
12704
- name: editorKey,
12705
- template: {
12706
- editorAlias: template.editorAlias,
12707
- editorUiAlias: template.editorUiAlias,
12708
- values: template.values,
12709
- _notes: template._notes
12710
- }
12711
- };
12712
- let response = `Property Editor Template: ${editorKey}
12713
12596
 
12714
- `;
12715
- if (template._notes) {
12716
- response += `IMPORTANT NOTES:
12717
- ${template._notes}
12718
12597
 
12719
- `;
12720
- }
12721
- response += `Configuration:
12722
- ${JSON.stringify(template, null, 2)}
12723
-
12724
- `;
12725
- response += `Usage with create-data-type:
12726
- `;
12727
- response += `When creating a data type with this property editor, use:
12728
- `;
12729
- response += `- editorAlias: "${template.editorAlias}"
12730
- `;
12731
- response += `- editorUiAlias: "${template.editorUiAlias}"
12732
- `;
12733
- if (template.values && template.values.length > 0) {
12734
- response += `- values: Customize the values array based on your requirements
12735
- `;
12736
- }
12737
- return _mcpserversdk.createToolResult.call(void 0, structuredOutput);
12738
- })
12598
+
12599
+
12600
+
12601
+ var outputSchema4 = _zod.z.object({
12602
+ total: _zod.z.number(),
12603
+ items: _zod.z.array(_zod.z.object({
12604
+ id: _zod.z.guid(),
12605
+ valueTypeName: _zod.z.string().nullish(),
12606
+ jsonSchema: _zod.z.unknown().nullish(),
12607
+ error: _zod.z.string().nullish()
12608
+ }))
12609
+ });
12610
+ var GetDataTypeSchemasTool = {
12611
+ name: "get-data-type-schemas",
12612
+ description: `Gets JSON Schemas for multiple data types in a single batch request.
12613
+
12614
+ Returns JSON Schemas describing the value structure for each specified data type. This is more efficient than calling get-data-type-schema multiple times when you need schemas for several data types.`,
12615
+ inputSchema: getDataTypeSchemasBatchQueryParams.shape,
12616
+ outputSchema: outputSchema4.shape,
12617
+ annotations: {
12618
+ readOnlyHint: true
12619
+ },
12620
+ slices: ["read"],
12621
+ handler: async (model) => {
12622
+ return _mcpserversdk.executeGetApiCall.call(void 0,
12623
+ (client) => client.getDataTypeSchemasBatch(model, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
12624
+ );
12625
+ }
12739
12626
  };
12740
- var get_data_type_property_editor_template_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDataTypePropertyEditorTemplateTool);
12627
+ var get_data_type_schemas_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDataTypeSchemasTool);
12741
12628
 
12742
12629
  // src/umb-management-api/tools/data-type/put/update-data-type.ts
12743
12630
 
@@ -12794,7 +12681,7 @@ var CopyDataTypeTool = {
12794
12681
  validateStatus: () => true
12795
12682
  });
12796
12683
  if (response.status === 201) {
12797
- const location = _optionalChain([response, 'access', _2 => _2.headers, 'optionalAccess', _3 => _3.location]) || "";
12684
+ const location = _optionalChain([response, 'access', _12 => _12.headers, 'optionalAccess', _13 => _13.location]) || "";
12798
12685
  const newId = location.split("/").pop() || "";
12799
12686
  const output = {
12800
12687
  message: "Data type copied successfully",
@@ -12818,14 +12705,14 @@ var copy_data_type_default = _mcpserversdk.withStandardDecorators.call(void 0, C
12818
12705
 
12819
12706
 
12820
12707
 
12821
- var outputSchema3 = _zod.z.object({
12708
+ var outputSchema5 = _zod.z.object({
12822
12709
  isUsed: _zod.z.boolean().describe("Whether the data type is currently used within Umbraco")
12823
12710
  }).shape;
12824
12711
  var IsUsedDataTypeTool = {
12825
12712
  name: "is-used-data-type",
12826
12713
  description: "Checks if a data type is used within Umbraco",
12827
12714
  inputSchema: getDataTypeByIdIsUsedParams.shape,
12828
- outputSchema: outputSchema3,
12715
+ outputSchema: outputSchema5,
12829
12716
  annotations: {
12830
12717
  readOnlyHint: true
12831
12718
  },
@@ -13086,14 +12973,14 @@ var get_siblings_default = _mcpserversdk.withStandardDecorators.call(void 0, Get
13086
12973
 
13087
12974
 
13088
12975
 
13089
- var outputSchema4 = _zod.z.object({
12976
+ var outputSchema6 = _zod.z.object({
13090
12977
  items: getTreeDataTypeAncestorsResponse
13091
12978
  });
13092
12979
  var GetDataTypeAncestorsTool = {
13093
12980
  name: "get-data-type-ancestors",
13094
12981
  description: "Gets the ancestors of a data type by Id",
13095
12982
  inputSchema: getTreeDataTypeAncestorsQueryParams.shape,
13096
- outputSchema: outputSchema4.shape,
12983
+ outputSchema: outputSchema6.shape,
13097
12984
  annotations: {
13098
12985
  readOnlyHint: true
13099
12986
  },
@@ -13113,7 +13000,7 @@ var get_ancestors_default = _mcpserversdk.withStandardDecorators.call(void 0, Ge
13113
13000
 
13114
13001
 
13115
13002
 
13116
- var outputSchema5 = _zod.z.object({
13003
+ var outputSchema7 = _zod.z.object({
13117
13004
  items: getItemDataTypeAncestorsResponse
13118
13005
  });
13119
13006
  var GetDataTypeAncestorsBatchTool = {
@@ -13122,7 +13009,7 @@ var GetDataTypeAncestorsBatchTool = {
13122
13009
  Returns one entry per requested Id, each containing that Id's chain of ancestors.
13123
13010
  Differs from get-data-type-ancestors which returns the tree-style ancestors of a single Id.`,
13124
13011
  inputSchema: getItemDataTypeAncestorsQueryParams.shape,
13125
- outputSchema: outputSchema5.shape,
13012
+ outputSchema: outputSchema7.shape,
13126
13013
  annotations: {
13127
13014
  readOnlyHint: true
13128
13015
  },
@@ -13166,7 +13053,7 @@ var get_tree_search_default = _mcpserversdk.withStandardDecorators.call(void 0,
13166
13053
 
13167
13054
 
13168
13055
 
13169
- var outputSchema6 = _zod.z.object({
13056
+ var outputSchema8 = _zod.z.object({
13170
13057
  items: getTreeDataTypeRootResponse.shape.items
13171
13058
  });
13172
13059
  var GetAllDataTypesTool = {
@@ -13175,7 +13062,7 @@ var GetAllDataTypesTool = {
13175
13062
  This is the preferred approach when you need to understand the full folder structure.
13176
13063
  For large sites, this may take a while to complete. For smaller sites its more efficient than fetching all data types by folder.`,
13177
13064
  inputSchema: {},
13178
- outputSchema: outputSchema6.shape,
13065
+ outputSchema: outputSchema8.shape,
13179
13066
  annotations: {
13180
13067
  readOnlyHint: true
13181
13068
  },
@@ -13275,7 +13162,10 @@ var DataTypeCollection = {
13275
13162
  tools.push(get_data_type_by_id_array_default);
13276
13163
  tools.push(get_data_type_batch_default);
13277
13164
  tools.push(get_data_type_configuration_default);
13278
- tools.push(get_data_type_property_editor_template_default);
13165
+ tools.push(get_data_type_schema_default);
13166
+ if (isUmbracoAtLeast(17, 4)) {
13167
+ tools.push(get_data_type_schemas_default);
13168
+ }
13279
13169
  }
13280
13170
  if (AuthorizationPolicies.TreeAccessDataTypes(user)) {
13281
13171
  tools.push(get_root_default);
@@ -13375,14 +13265,14 @@ var get_dictionary_item_default = _mcpserversdk.withStandardDecorators.call(void
13375
13265
 
13376
13266
 
13377
13267
 
13378
- var outputSchema7 = _zod.z.object({
13268
+ var outputSchema9 = _zod.z.object({
13379
13269
  items: getItemDictionaryResponse
13380
13270
  });
13381
13271
  var GetDictionaryByIdArrayTool = {
13382
13272
  name: "get-dictionary-by-id-array",
13383
13273
  description: "Gets dictionary items by IDs (or empty array if no IDs are provided)",
13384
13274
  inputSchema: getItemDictionaryQueryParams.shape,
13385
- outputSchema: outputSchema7.shape,
13275
+ outputSchema: outputSchema9.shape,
13386
13276
  annotations: { readOnlyHint: true },
13387
13277
  slices: ["list"],
13388
13278
  handler: (async (params) => {
@@ -13432,7 +13322,7 @@ var CreateDictionaryItemTool = {
13432
13322
  validateStatus: () => true
13433
13323
  });
13434
13324
  if (response.status === 201) {
13435
- const locationHeader = _optionalChain([response, 'access', _4 => _4.headers, 'optionalAccess', _5 => _5["location"]]) || _optionalChain([response, 'access', _6 => _6.headers, 'optionalAccess', _7 => _7["Location"]]);
13325
+ const locationHeader = _optionalChain([response, 'access', _14 => _14.headers, 'optionalAccess', _15 => _15["location"]]) || _optionalChain([response, 'access', _16 => _16.headers, 'optionalAccess', _17 => _17["Location"]]);
13436
13326
  let createdId = model.id || "";
13437
13327
  if (locationHeader) {
13438
13328
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -13558,14 +13448,14 @@ var get_children_default2 = _mcpserversdk.withStandardDecorators.call(void 0, Ge
13558
13448
 
13559
13449
 
13560
13450
 
13561
- var outputSchema8 = _zod.z.object({
13451
+ var outputSchema10 = _zod.z.object({
13562
13452
  items: getTreeDictionaryAncestorsResponse
13563
13453
  });
13564
13454
  var GetDictionaryAncestorsTool = {
13565
13455
  name: "get-dictionary-ancestors",
13566
13456
  description: "Gets the ancestors of a dictionary item by Id",
13567
13457
  inputSchema: getTreeDictionaryAncestorsQueryParams.shape,
13568
- outputSchema: outputSchema8.shape,
13458
+ outputSchema: outputSchema10.shape,
13569
13459
  annotations: { readOnlyHint: true },
13570
13460
  slices: ["tree"],
13571
13461
  handler: (async (params) => {
@@ -13726,14 +13616,14 @@ var create_blueprint_default = _mcpserversdk.withStandardDecorators.call(void 0,
13726
13616
 
13727
13617
 
13728
13618
 
13729
- var outputSchema9 = _zod.z.object({
13619
+ var outputSchema11 = _zod.z.object({
13730
13620
  items: getTreeDocumentBlueprintAncestorsResponse
13731
13621
  });
13732
13622
  var GetDocumentBlueprintAncestorsTool = {
13733
13623
  name: "get-document-blueprint-ancestors",
13734
13624
  description: "Gets the ancestors of a document blueprint by Id",
13735
13625
  inputSchema: getTreeDocumentBlueprintAncestorsQueryParams.shape,
13736
- outputSchema: outputSchema9.shape,
13626
+ outputSchema: outputSchema11.shape,
13737
13627
  annotations: { readOnlyHint: true },
13738
13628
  slices: ["tree"],
13739
13629
  handler: (async (params) => {
@@ -13873,14 +13763,14 @@ var create_document_blueprint_from_document_default = _mcpserversdk.withStandard
13873
13763
 
13874
13764
 
13875
13765
 
13876
- var outputSchema10 = _zod.z.object({
13766
+ var outputSchema12 = _zod.z.object({
13877
13767
  items: getItemDocumentBlueprintResponse
13878
13768
  });
13879
13769
  var GetDocumentBlueprintByIdArrayTool = {
13880
13770
  name: "get-document-blueprint-by-id-array",
13881
13771
  description: "Gets document blueprints by IDs (or empty array if no IDs are provided)",
13882
13772
  inputSchema: getItemDocumentBlueprintQueryParams.shape,
13883
- outputSchema: outputSchema10.shape,
13773
+ outputSchema: outputSchema12.shape,
13884
13774
  annotations: { readOnlyHint: true },
13885
13775
  slices: ["list"],
13886
13776
  handler: (async (params) => {
@@ -14203,14 +14093,14 @@ var get_document_domains_default = _mcpserversdk.withStandardDecorators.call(voi
14203
14093
 
14204
14094
 
14205
14095
 
14206
- var outputSchema11 = _zod.z.object({
14096
+ var outputSchema13 = _zod.z.object({
14207
14097
  items: getDocumentByIdNotificationsResponse
14208
14098
  });
14209
14099
  var GetDocumentNotificationsTool = {
14210
14100
  name: "get-document-notifications",
14211
14101
  description: "Gets the notifications for a document by Id.",
14212
14102
  inputSchema: getDocumentByIdNotificationsParams.shape,
14213
- outputSchema: outputSchema11.shape,
14103
+ outputSchema: outputSchema13.shape,
14214
14104
  annotations: {
14215
14105
  readOnlyHint: true
14216
14106
  },
@@ -14265,600 +14155,181 @@ var inputSchema2 = {
14265
14155
  ...getDocumentByIdAuditLogQueryParams.shape
14266
14156
  };
14267
14157
  var GetDocumentAuditLogTool = {
14268
- name: "get-document-audit-log",
14269
- description: "Fetches the audit log for a document by Id.",
14270
- inputSchema: inputSchema2,
14271
- outputSchema: getDocumentByIdAuditLogResponse.shape,
14272
- annotations: {
14273
- readOnlyHint: true
14274
- },
14275
- slices: ["audit"],
14276
- enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Read),
14277
- handler: (async (model) => {
14278
- const { id, ...queryParams } = model;
14279
- return _mcpserversdk.executeGetApiCall.call(void 0,
14280
- (client) => client.getDocumentByIdAuditLog(id, queryParams, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14281
- );
14282
- })
14283
- };
14284
- var get_document_audit_log_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentAuditLogTool);
14285
-
14286
- // src/umb-management-api/tools/document/get/get-document-publish.ts
14287
-
14288
-
14289
-
14290
-
14291
-
14292
- var GetDocumentPublishTool = {
14293
- name: "get-document-publish",
14294
- description: "Gets the published state of a document by Id.",
14295
- inputSchema: getDocumentByIdPublishedParams.shape,
14296
- outputSchema: getDocumentByIdPublishedResponse.shape,
14297
- annotations: {
14298
- readOnlyHint: true
14299
- },
14300
- slices: ["publish"],
14301
- enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Read),
14302
- handler: (async ({ id }) => {
14303
- return _mcpserversdk.executeGetApiCall.call(void 0,
14304
- (client) => client.getDocumentByIdPublished(id, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14305
- );
14306
- })
14307
- };
14308
- var get_document_publish_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentPublishTool);
14309
-
14310
- // src/umb-management-api/tools/document/get/get-document-configuration.ts
14311
-
14312
-
14313
-
14314
-
14315
-
14316
- var GetDocumentConfigurationTool = {
14317
- name: "get-document-configuration",
14318
- description: "Gets the document configuration for the Umbraco instance.",
14319
- inputSchema: {},
14320
- outputSchema: getDocumentConfigurationResponse.shape,
14321
- annotations: {
14322
- readOnlyHint: true
14323
- },
14324
- slices: ["configuration"],
14325
- handler: (async () => {
14326
- return _mcpserversdk.executeGetApiCall.call(void 0,
14327
- (client) => client.getDocumentConfiguration(_mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14328
- );
14329
- })
14330
- };
14331
- var get_document_configuration_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentConfigurationTool);
14332
-
14333
- // src/umb-management-api/tools/document/get/get-document-urls.ts
14334
-
14335
-
14336
-
14337
-
14338
-
14339
-
14340
- var outputSchema12 = _zod.z.object({
14341
- items: getDocumentUrlsResponse
14342
- });
14343
- var GetDocumentUrlsTool = {
14344
- name: "get-document-urls",
14345
- description: "Gets the URLs for a document.",
14346
- inputSchema: getDocumentUrlsQueryParams.shape,
14347
- outputSchema: outputSchema12.shape,
14348
- annotations: {
14349
- readOnlyHint: true
14350
- },
14351
- slices: ["urls"],
14352
- handler: (async (params) => {
14353
- return _mcpserversdk.executeGetItemsApiCall.call(void 0,
14354
- (client) => client.getDocumentUrls(params, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14355
- );
14356
- })
14357
- };
14358
- var get_document_urls_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentUrlsTool);
14359
-
14360
- // src/umb-management-api/tools/document/get/get-document-property-value-template.ts
14361
-
14362
-
14363
- // src/umb-management-api/tools/document/post/property-value-templates.ts
14364
- var propertyValueTemplates = {
14365
- "BlockList": {
14366
- editorAlias: "Umbraco.BlockList",
14367
- value: {
14368
- layout: {
14369
- "Umbraco.BlockList": [
14370
- {
14371
- contentKey: "7a61b31c-792f-4f6b-a665-960a90b49853"
14372
- }
14373
- ]
14374
- },
14375
- contentData: [
14376
- {
14377
- key: "7a61b31c-792f-4f6b-a665-960a90b49853",
14378
- contentTypeKey: "3a7ec32d-7fd4-49f8-aae6-d9259d5bfee1",
14379
- values: [
14380
- {
14381
- editorAlias: "Umbraco.MediaPicker3",
14382
- culture: null,
14383
- segment: null,
14384
- alias: "recipeImage",
14385
- value: [
14386
- {
14387
- key: "9bac772d-cd63-4bb6-b2db-1449042129a7",
14388
- mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
14389
- mediaTypeAlias: "",
14390
- crops: [],
14391
- focalPoint: null
14392
- }
14393
- ]
14394
- }
14395
- ]
14396
- }
14397
- ],
14398
- settingsData: [],
14399
- expose: [
14400
- {
14401
- contentKey: "7a61b31c-792f-4f6b-a665-960a90b49853",
14402
- culture: null,
14403
- segment: null
14404
- }
14405
- ]
14406
- },
14407
- _notes: "Complex structure with layout, contentData, settingsData, and expose arrays. contentData.values contains nested property values. All keys must be unique UUIDs."
14408
- },
14409
- "BlockGrid": {
14410
- editorAlias: "Umbraco.BlockGrid",
14411
- value: {
14412
- layout: {
14413
- "Umbraco.BlockGrid": [
14414
- {
14415
- contentKey: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
14416
- columnSpan: 12,
14417
- rowSpan: 1,
14418
- areas: [
14419
- {
14420
- key: "43743e78-0f2b-465e-a3ce-f381c90b68e0",
14421
- items: [
14422
- {
14423
- contentKey: "3145f922-7ec1-41e0-99a5-d9677e558163",
14424
- settingsKey: "6248d134-4657-4605-b0d5-ae804858bb88",
14425
- columnSpan: 6,
14426
- rowSpan: 1
14427
- }
14428
- ]
14429
- }
14430
- ]
14431
- }
14432
- ]
14433
- },
14434
- contentData: [
14435
- {
14436
- key: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
14437
- contentTypeKey: "6960aaca-0b26-4fae-9cee-db73405d7a3e",
14438
- values: [
14439
- {
14440
- editorAlias: "Umbraco.TextBox",
14441
- culture: null,
14442
- segment: null,
14443
- alias: "title",
14444
- value: "Title"
14445
- },
14446
- {
14447
- editorAlias: "Umbraco.RichText",
14448
- culture: null,
14449
- segment: null,
14450
- alias: "bodyText",
14451
- value: {
14452
- markup: "<p>Content here</p>",
14453
- blocks: {
14454
- layout: {},
14455
- contentData: [],
14456
- settingsData: [],
14457
- expose: []
14458
- }
14459
- }
14460
- },
14461
- {
14462
- editorAlias: "Umbraco.MediaPicker3",
14463
- culture: null,
14464
- segment: null,
14465
- alias: "image",
14466
- value: [
14467
- {
14468
- key: "40edd153-31eb-4c61-82fc-1ec2e695197b",
14469
- mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
14470
- mediaTypeAlias: "",
14471
- crops: [],
14472
- focalPoint: null
14473
- }
14474
- ]
14475
- }
14476
- ]
14477
- },
14478
- {
14479
- key: "3145f922-7ec1-41e0-99a5-d9677e558163",
14480
- contentTypeKey: "c80027e5-7e87-49c1-9b4f-1b9d3fbc2e90",
14481
- values: [
14482
- {
14483
- editorAlias: "Umbraco.TextBox",
14484
- culture: null,
14485
- segment: null,
14486
- alias: "title",
14487
- value: "Nested Title"
14488
- },
14489
- {
14490
- editorAlias: "Umbraco.RichText",
14491
- culture: null,
14492
- segment: null,
14493
- alias: "content",
14494
- value: {
14495
- markup: "<p>Nested content</p>",
14496
- blocks: {
14497
- layout: {},
14498
- contentData: [],
14499
- settingsData: [],
14500
- expose: []
14501
- }
14502
- }
14503
- }
14504
- ]
14505
- }
14506
- ],
14507
- settingsData: [
14508
- {
14509
- key: "6248d134-4657-4605-b0d5-ae804858bb88",
14510
- contentTypeKey: "06200e23-1c29-4298-9582-48b2eaa81fbf",
14511
- values: []
14512
- }
14513
- ],
14514
- expose: [
14515
- {
14516
- contentKey: "d8fa3d28-79aa-4c60-8e73-5819ed313ea2",
14517
- culture: null,
14518
- segment: null
14519
- },
14520
- {
14521
- contentKey: "3145f922-7ec1-41e0-99a5-d9677e558163",
14522
- culture: null,
14523
- segment: null
14524
- }
14525
- ]
14526
- },
14527
- _notes: "Complex hierarchical structure with areas and nested items. Layout defines structure with columnSpan/rowSpan. contentData stores actual content. All keys must be unique UUIDs."
14528
- },
14529
- "Decimal": {
14530
- editorAlias: "Umbraco.Decimal",
14531
- value: 1.2
14532
- },
14533
- "EmailAddress": {
14534
- editorAlias: "Umbraco.EmailAddress",
14535
- value: "admin@admin.co.uk"
14536
- },
14537
- "Integer": {
14538
- editorAlias: "Umbraco.Integer",
14539
- value: 1
14540
- },
14541
- "Tags": {
14542
- editorAlias: "Umbraco.Tags",
14543
- value: [
14544
- "Tag 1",
14545
- "Tag 2"
14546
- ]
14547
- },
14548
- "ColorPicker": {
14549
- editorAlias: "Umbraco.ColorPicker",
14550
- value: {
14551
- label: "Green",
14552
- value: "#00FF00"
14553
- }
14554
- },
14555
- "TrueFalse": {
14556
- editorAlias: "Umbraco.TrueFalse",
14557
- value: true
14558
- },
14559
- "CheckBoxList": {
14560
- editorAlias: "Umbraco.CheckBoxList",
14561
- value: [
14562
- "item 1",
14563
- "items 2"
14564
- ]
14565
- },
14566
- "Dropdown": {
14567
- editorAlias: "Umbraco.DropDown.Flexible",
14568
- value: [
14569
- "Item 3"
14570
- ]
14571
- },
14572
- "MultipleTextstring": {
14573
- editorAlias: "Umbraco.MultipleTextstring",
14574
- value: [
14575
- "Item 1",
14576
- "item 2"
14577
- ]
14578
- },
14579
- "RadioButtonList": {
14580
- editorAlias: "Umbraco.RadioButtonList",
14581
- value: "item 1"
14582
- },
14583
- "ImageCropper": {
14584
- editorAlias: "Umbraco.ImageCropper",
14585
- value: {
14586
- temporaryFileId: "b45eb1dd-2959-4b0b-a675-761b6a19824c",
14587
- src: "",
14588
- crops: [],
14589
- focalPoint: {
14590
- left: 0.5,
14591
- top: 0.5
14592
- }
14593
- },
14594
- _notes: "IMPORTANT: Requires a temporary file uploaded first. Use the temporaryFileId from the upload response."
14595
- },
14596
- "MediaPicker3": {
14597
- editorAlias: "Umbraco.MediaPicker3",
14598
- value: [
14599
- {
14600
- key: "4c82123c-cd3e-4d92-84b8-9c79ad5a5319",
14601
- mediaKey: "3c6c415c-35a0-4629-891e-683506250c31",
14602
- mediaTypeAlias: "",
14603
- crops: [],
14604
- focalPoint: null
14605
- }
14606
- ],
14607
- _notes: "The key is generated by you. The mediaKey relates to an existing media item id."
14608
- },
14609
- "UploadField": {
14610
- editorAlias: "Umbraco.UploadField",
14611
- value: {
14612
- src: "blob:http://localhost:56472/0884388b-41a3-46c2-a224-9b9ff02de24a",
14613
- temporaryFileId: "fc76f270-83c2-4daa-ba8b-fde4554dda2a"
14614
- },
14615
- _notes: "IMPORTANT: Requires a temporary file uploaded first. Use the temporaryFileId from the upload response."
14616
- },
14617
- "Slider": {
14618
- editorAlias: "Umbraco.Slider",
14619
- value: {
14620
- from: 31,
14621
- to: 31
14622
- }
14623
- },
14624
- "MemberGroupPicker": {
14625
- editorAlias: "Umbraco.MemberGroupPicker",
14626
- value: "9815503d-a5a9-487f-aee3-827ca43fdb2c",
14627
- _notes: "The value relates to an existing member group id."
14628
- },
14629
- "MemberPicker": {
14630
- editorAlias: "Umbraco.MemberPicker",
14631
- value: "f8abd31e-c78d-46ea-bb6b-c00cb9107bfb",
14632
- _notes: "The value relates to an existing member id."
14633
- },
14634
- "UserPicker": {
14635
- editorAlias: "Umbraco.UserPicker",
14636
- value: "1e70f841-c261-413b-abb2-2d68cdb96094",
14637
- _notes: "The value relates to an existing user id."
14638
- },
14639
- "MultiNodeTreePicker": {
14640
- editorAlias: "Umbraco.MultiNodeTreePicker",
14641
- value: [
14642
- {
14643
- type: "document",
14644
- unique: "dcf18a51-6919-4cf8-89d1-36b94ce4d963"
14645
- }
14646
- ],
14647
- _notes: "The unique property relates to an existing document, media, or member id. Type can be 'document', 'media', or 'member'."
14648
- },
14649
- "DateTime": {
14650
- editorAlias: "Umbraco.DateTime",
14651
- value: "2025-05-23 00:00:00"
14652
- },
14653
- "ContentPicker": {
14654
- editorAlias: "Umbraco.ContentPicker",
14655
- value: "dcf18a51-6919-4cf8-89d1-36b94ce4d963",
14656
- _notes: "The value relates to an existing document id."
14657
- },
14658
- "ColorPickerEyeDropper": {
14659
- editorAlias: "Umbraco.ColorPicker.EyeDropper",
14660
- value: "#982020"
14661
- },
14662
- "MultiUrlPicker": {
14663
- editorAlias: "Umbraco.MultiUrlPicker",
14664
- value: [
14665
- {
14666
- icon: "icon-home color-blue",
14667
- name: "Home",
14668
- type: "document",
14669
- unique: "dcf18a51-6919-4cf8-89d1-36b94ce4d963",
14670
- url: "/"
14671
- },
14672
- {
14673
- icon: "icon-picture",
14674
- name: "Chairs lamps",
14675
- type: "media",
14676
- unique: "3c6c415c-35a0-4629-891e-683506250c31",
14677
- url: "http://localhost:56472/media/0ofdvcwj/chairs-lamps.jpg"
14678
- },
14679
- {
14680
- name: "Title",
14681
- target: "_blank",
14682
- type: "external",
14683
- url: "www.google.com"
14684
- }
14685
- ],
14686
- _notes: "Can contain document, media, or external link entries. For document/media, unique is the content id."
14687
- },
14688
- "MarkdownEditor": {
14689
- editorAlias: "Umbraco.MarkdownEditor",
14690
- value: "Markdown"
14691
- },
14692
- "CodeEditor": {
14693
- editorAlias: "Umbraco.CodeEditor",
14694
- value: "Code"
14695
- },
14696
- "Textbox": {
14697
- editorAlias: "Umbraco.TextBox",
14698
- value: "some string"
14699
- },
14700
- "TextArea": {
14701
- editorAlias: "Umbraco.TextArea",
14702
- value: "some string"
14703
- },
14704
- "RichTextEditor": {
14705
- editorAlias: "Umbraco.RichText",
14706
- value: {
14707
- markup: "<p>some string</p>",
14708
- blocks: {
14709
- layout: {},
14710
- contentData: [],
14711
- settingsData: [],
14712
- expose: []
14713
- }
14714
- },
14715
- _notes: "The blocks property has the same structure as BlockList. Can include nested block content within the rich text."
14716
- }
14158
+ name: "get-document-audit-log",
14159
+ description: "Fetches the audit log for a document by Id.",
14160
+ inputSchema: inputSchema2,
14161
+ outputSchema: getDocumentByIdAuditLogResponse.shape,
14162
+ annotations: {
14163
+ readOnlyHint: true
14164
+ },
14165
+ slices: ["audit"],
14166
+ enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Read),
14167
+ handler: (async (model) => {
14168
+ const { id, ...queryParams } = model;
14169
+ return _mcpserversdk.executeGetApiCall.call(void 0,
14170
+ (client) => client.getDocumentByIdAuditLog(id, queryParams, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14171
+ );
14172
+ })
14717
14173
  };
14174
+ var get_document_audit_log_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentAuditLogTool);
14718
14175
 
14719
- // src/umb-management-api/tools/document/get/get-document-property-value-template.ts
14176
+ // src/umb-management-api/tools/document/get/get-document-publish.ts
14720
14177
 
14721
14178
 
14722
14179
 
14723
- var propertyValueTemplateSchema = _zod.z.object({
14724
- editorAlias: _zod.z.string().optional().describe("The editor alias of the property value template to retrieve (e.g., 'Umbraco.TextBox', 'Umbraco.BlockList', 'Umbraco.MediaPicker3'). If not provided, returns a list of all available property editor aliases.")
14725
- });
14726
- var GetDocumentPropertyValueTemplateTool = {
14727
- name: "get-document-property-value-template",
14728
- description: `Retrieves property value templates for creating documents in Umbraco.
14729
14180
 
14730
- IMPORTANT: This tool should be used BEFORE creating documents to understand:
14731
- - What property editors are available
14732
- - The required value structure for each property editor
14733
- - Example values that can be customized for your needs
14734
14181
 
14735
- Usage:
14736
- 1. Call without parameters to see all available property editor aliases
14737
- 2. Call with a specific editorAlias to get the full value template for that property editor
14738
- 3. Use the returned template as a starting point when creating document property values with create-document
14182
+ var GetDocumentPublishTool = {
14183
+ name: "get-document-publish",
14184
+ description: "Gets the published state of a document by Id.",
14185
+ inputSchema: getDocumentByIdPublishedParams.shape,
14186
+ outputSchema: getDocumentByIdPublishedResponse.shape,
14187
+ annotations: {
14188
+ readOnlyHint: true
14189
+ },
14190
+ slices: ["publish"],
14191
+ enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Read),
14192
+ handler: (async ({ id }) => {
14193
+ return _mcpserversdk.executeGetApiCall.call(void 0,
14194
+ (client) => client.getDocumentByIdPublished(id, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14195
+ );
14196
+ })
14197
+ };
14198
+ var get_document_publish_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentPublishTool);
14199
+
14200
+ // src/umb-management-api/tools/document/get/get-document-configuration.ts
14201
+
14202
+
14739
14203
 
14740
- The templates include:
14741
- - editorAlias: The property editor identifier (required in create-document values array)
14742
- - value: Example value structure showing the expected format
14743
- - _notes: Important information about special requirements (IDs, temporary files, etc.)
14744
14204
 
14745
- IMPORTANT: Templates only provide editorAlias and value structure. When using with create-document, you must also provide:
14746
- - culture: The culture code or null
14747
- - segment: The segment or null
14748
- - alias: The property alias from your document type
14749
14205
 
14750
- Note: Some templates (BlockList, BlockGrid, ImageCropper, UploadField) have special requirements indicated in their _notes.`,
14751
- inputSchema: propertyValueTemplateSchema.shape,
14206
+ var GetDocumentConfigurationTool = {
14207
+ name: "get-document-configuration",
14208
+ description: "Gets the document configuration for the Umbraco instance.",
14209
+ inputSchema: {},
14210
+ outputSchema: getDocumentConfigurationResponse.shape,
14752
14211
  annotations: {
14753
14212
  readOnlyHint: true
14754
14213
  },
14755
- slices: ["read"],
14756
- handler: (async (model) => {
14757
- try {
14758
- if (!model.editorAlias) {
14759
- const availableEditors = Object.entries(propertyValueTemplates).map(([name, config]) => {
14760
- const hasNotes = config._notes ? ` (IMPORTANT: ${config._notes.substring(0, 50)}${config._notes.length > 50 ? "..." : ""})` : "";
14761
- return `- ${name} (${config.editorAlias})${hasNotes}`;
14762
- }).sort().join("\n");
14763
- return {
14764
- content: [
14765
- {
14766
- type: "text",
14767
- text: `Available Property Value Templates:
14214
+ slices: ["configuration"],
14215
+ handler: (async () => {
14216
+ return _mcpserversdk.executeGetApiCall.call(void 0,
14217
+ (client) => client.getDocumentConfiguration(_mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14218
+ );
14219
+ })
14220
+ };
14221
+ var get_document_configuration_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentConfigurationTool);
14768
14222
 
14769
- ${availableEditors}
14223
+ // src/umb-management-api/tools/document/get/get-document-urls.ts
14770
14224
 
14771
- Use get-document-property-value-template with a specific editorAlias to see the full value structure.`
14772
- }
14773
- ]
14774
- };
14775
- }
14776
- const editorKey = Object.keys(propertyValueTemplates).find(
14777
- (key) => propertyValueTemplates[key].editorAlias.toLowerCase() === model.editorAlias.toLowerCase()
14778
- );
14779
- if (!editorKey) {
14780
- const editorKeyByName = Object.keys(propertyValueTemplates).find(
14781
- (key) => key.toLowerCase() === model.editorAlias.toLowerCase()
14782
- );
14783
- if (!editorKeyByName) {
14784
- const availableAliases = Object.values(propertyValueTemplates).map((t) => t.editorAlias).sort().join(", ");
14785
- return {
14786
- content: [
14787
- {
14788
- type: "text",
14789
- text: `Property value template with editorAlias '${model.editorAlias}' not found.
14790
14225
 
14791
- Available editor aliases: ${availableAliases}
14792
14226
 
14793
- Note: Matching is case-insensitive. You can also use the template name (e.g., 'Textbox' instead of 'Umbraco.TextBox').`
14794
- }
14795
- ],
14796
- isError: true
14797
- };
14798
- }
14799
- const template2 = propertyValueTemplates[editorKeyByName];
14800
- return buildTemplateResponse(editorKeyByName, template2);
14801
- }
14802
- const template = propertyValueTemplates[editorKey];
14803
- return buildTemplateResponse(editorKey, template);
14804
- } catch (error) {
14805
- console.error("Error reading property value templates:", error);
14806
- return {
14807
- content: [
14808
- {
14809
- type: "text",
14810
- text: `Error reading property value templates: ${error instanceof Error ? error.message : String(error)}`
14811
- }
14812
- ],
14813
- isError: true
14814
- };
14815
- }
14227
+
14228
+
14229
+
14230
+ var outputSchema14 = _zod.z.object({
14231
+ items: getDocumentUrlsResponse
14232
+ });
14233
+ var GetDocumentUrlsTool = {
14234
+ name: "get-document-urls",
14235
+ description: "Gets the URLs for a document.",
14236
+ inputSchema: getDocumentUrlsQueryParams.shape,
14237
+ outputSchema: outputSchema14.shape,
14238
+ annotations: {
14239
+ readOnlyHint: true
14240
+ },
14241
+ slices: ["urls"],
14242
+ handler: (async (params) => {
14243
+ return _mcpserversdk.executeGetItemsApiCall.call(void 0,
14244
+ (client) => client.getDocumentUrls(params, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14245
+ );
14816
14246
  })
14817
14247
  };
14818
- function buildTemplateResponse(editorKey, template) {
14819
- let response = `Property Value Template: ${editorKey}
14248
+ var get_document_urls_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentUrlsTool);
14820
14249
 
14821
- `;
14822
- if (template._notes) {
14823
- response += `IMPORTANT NOTES:
14824
- ${template._notes}
14250
+ // src/umb-management-api/tools/document/get/get-document-type-schema.ts
14825
14251
 
14826
- `;
14827
- }
14828
- response += `Template:
14829
- ${JSON.stringify({ editorAlias: template.editorAlias, value: template.value }, null, 2)}
14830
-
14831
- `;
14832
- response += `Usage with create-document:
14833
- `;
14834
- response += `When creating a document with this property, include in the values array:
14835
- `;
14836
- response += `{
14837
- `;
14838
- response += ` "editorAlias": "${template.editorAlias}", // From template
14839
- `;
14840
- response += ` "culture": null, // Document-specific: culture code or null
14841
- `;
14842
- response += ` "segment": null, // Document-specific: segment or null
14843
- `;
14844
- response += ` "alias": "yourPropertyAlias", // Document-specific: property alias from document type
14845
- `;
14846
- response += ` "value": <customize from template> // From template - customize as needed
14847
- `;
14848
- response += `}
14849
-
14850
- `;
14851
- response += `The template provides editorAlias and value structure. You must add culture, segment, and alias based on your document requirements.`;
14252
+
14253
+
14254
+
14255
+
14256
+
14257
+ // src/umb-management-api/tools/document/get/get-document-type-schema-modern.ts
14258
+
14259
+ async function getDocumentTypeSchemaFromApi(id) {
14260
+ const client = UmbracoManagementClient3.getClient();
14261
+ const response = await client.getDocumentTypeByIdSchema(
14262
+ id,
14263
+ _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
14264
+ );
14265
+ return { schema: response.data };
14266
+ }
14267
+
14268
+ // src/umb-management-api/tools/document/get/get-document-type-schema-legacy.ts
14269
+ function findTemplateByEditorAlias2(editorAlias) {
14270
+ const key = Object.keys(propertyValueTemplates).find(
14271
+ (k) => propertyValueTemplates[k].editorAlias.toLowerCase() === editorAlias.toLowerCase()
14272
+ );
14273
+ return key ? propertyValueTemplates[key] : void 0;
14274
+ }
14275
+ function buildPropertyEntry(prop, dataType, template) {
14852
14276
  return {
14853
- content: [
14854
- {
14855
- type: "text",
14856
- text: response
14857
- }
14858
- ]
14277
+ title: prop.name,
14278
+ description: _nullishCoalesce(prop.description, () => ( void 0)),
14279
+ editorAlias: dataType.editorAlias,
14280
+ dataTypeId: dataType.id,
14281
+ dataTypeName: dataType.name,
14282
+ example: _optionalChain([template, 'optionalAccess', _18 => _18.value]),
14283
+ notes: _optionalChain([template, 'optionalAccess', _19 => _19._notes])
14859
14284
  };
14860
14285
  }
14861
- var get_document_property_value_template_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentPropertyValueTemplateTool);
14286
+ async function synthesizeDocumentTypeSchema(id) {
14287
+ const client = UmbracoManagementClient3.getClient();
14288
+ const docType = await client.getDocumentTypeById(id);
14289
+ const propertyEntries = {};
14290
+ for (const prop of docType.properties) {
14291
+ const dataType = await client.getDataTypeById(
14292
+ prop.dataType.id
14293
+ );
14294
+ const template = findTemplateByEditorAlias2(dataType.editorAlias);
14295
+ propertyEntries[prop.alias] = buildPropertyEntry(prop, dataType, template);
14296
+ }
14297
+ const schema = {
14298
+ $schema: "https://json-schema.org/draft/2020-12/schema",
14299
+ title: docType.name,
14300
+ description: _nullishCoalesce(docType.description, () => ( "Synthesized from hardcoded property-value templates (Umbraco < 17.4 fallback).")),
14301
+ type: "object",
14302
+ documentTypeId: docType.id,
14303
+ documentTypeAlias: docType.alias,
14304
+ properties: propertyEntries
14305
+ };
14306
+ return { schema };
14307
+ }
14308
+
14309
+ // src/umb-management-api/tools/document/get/get-document-type-schema.ts
14310
+ var documentTypeSchemaOutputSchema = _zod.z.object({
14311
+ schema: _zod.z.unknown()
14312
+ });
14313
+ var outputSchema15 = documentTypeSchemaOutputSchema;
14314
+ var GetDocumentTypeSchemaTool = {
14315
+ name: "get-document-type-schema",
14316
+ description: `Gets the JSON Schema for a document type by Id.
14317
+
14318
+ Returns a complete JSON Schema describing the structure for creating documents of that type, including all property definitions and their value formats.
14319
+
14320
+ IMPORTANT: Use this tool BEFORE creating documents to understand the expected property structure for a specific document type.`,
14321
+ inputSchema: getDocumentTypeByIdSchemaParams.shape,
14322
+ outputSchema: outputSchema15.shape,
14323
+ annotations: {
14324
+ readOnlyHint: true
14325
+ },
14326
+ slices: ["read"],
14327
+ handler: async ({ id }) => {
14328
+ const result = isUmbracoAtLeast(17, 4) ? await getDocumentTypeSchemaFromApi(id) : await synthesizeDocumentTypeSchema(id);
14329
+ return _mcpserversdk.createToolResult.call(void 0, result);
14330
+ }
14331
+ };
14332
+ var get_document_type_schema_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentTypeSchemaTool);
14862
14333
 
14863
14334
  // src/umb-management-api/tools/document/get/search-document.ts
14864
14335
 
@@ -14926,14 +14397,14 @@ var get_collection_document_by_id_default = _mcpserversdk.withStandardDecorators
14926
14397
 
14927
14398
 
14928
14399
 
14929
- var outputSchema13 = _zod.z.object({
14400
+ var outputSchema16 = _zod.z.object({
14930
14401
  items: getItemDocumentResponse
14931
14402
  });
14932
14403
  var GetItemDocumentTool = {
14933
14404
  name: "get-item-document",
14934
14405
  description: "Gets document items by their ids",
14935
14406
  inputSchema: getItemDocumentQueryParams.shape,
14936
- outputSchema: outputSchema13.shape,
14407
+ outputSchema: outputSchema16.shape,
14937
14408
  annotations: {
14938
14409
  readOnlyHint: true
14939
14410
  },
@@ -15211,7 +14682,7 @@ var CopyDocumentTool = {
15211
14682
  validateStatus: () => true
15212
14683
  });
15213
14684
  if (response.status === 201) {
15214
- const location = _optionalChain([response, 'access', _8 => _8.headers, 'optionalAccess', _9 => _9.location]) || "";
14685
+ const location = _optionalChain([response, 'access', _20 => _20.headers, 'optionalAccess', _21 => _21.location]) || "";
15215
14686
  const newId = location.split("/").pop() || "";
15216
14687
  const output = { id: newId };
15217
14688
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -15243,6 +14714,9 @@ var createDocumentSchema = _zod.z.object({
15243
14714
  documentTypeId: _zod.z.string().uuid("Must be a valid document type type UUID"),
15244
14715
  parentId: _zod.z.string().uuid("Must be a valid document UUID").optional(),
15245
14716
  name: _zod.z.string(),
14717
+ templateId: _zod.z.string().uuid("Must be a valid template UUID").optional().describe(
14718
+ "Optional template ID to apply to the document. If omitted, the document type's default template is applied automatically. Provide a value only when you need a specific allowed template other than the default."
14719
+ ),
15246
14720
  cultures: _zod.z.array(_zod.z.string()).optional().describe("Array of culture codes. If not provided or empty array, will create single variant with null culture."),
15247
14721
  values: _zod.z.array(
15248
14722
  _zod.z.object({
@@ -15311,22 +14785,23 @@ var CreateDocumentTool = {
15311
14785
 
15312
14786
  When creating documents, you need to provide property values that match the property editors defined in the document type.
15313
14787
 
15314
- IMPORTANT: Use the get-document-property-value-template tool to:
15315
- - View all available property editors (call without parameters)
15316
- - Get the correct value structure for a specific property editor (call with editorAlias parameter)
15317
- - Each template provides the editorAlias and value format
15318
- - You must add culture, segment, and alias based on your document's specific requirements
14788
+ IMPORTANT: Use the get-document-type-schema tool to:
14789
+ - Get the JSON Schema describing the expected property structure for a specific document type
14790
+ - The schema includes all property definitions and their value formats
14791
+ - Use the schema to construct the correct values array for your document
15319
14792
 
15320
14793
  The values parameter is an array of property value objects following this structure:
15321
14794
  {
15322
- "editorAlias": "Umbraco.TextBox", // From template - the property editor type
14795
+ "editorAlias": "Umbraco.TextBox", // The property editor type
15323
14796
  "culture": null, // Document-specific - culture code or null
15324
14797
  "segment": null, // Document-specific - segment or null
15325
- "alias": "propertyAlias", // Document-specific - property alias from document type
15326
- "value": "your value here" // From template - customize the value structure
14798
+ "alias": "propertyAlias", // Property alias from document type
14799
+ "value": "your value here" // Value matching the schema structure
15327
14800
  }
15328
14801
 
15329
- Note: Some property editors (BlockList, BlockGrid, ImageCropper, UploadField) have special requirements - check their templates for important notes.
14802
+ ## Default Template
14803
+
14804
+ The document type's default template is applied automatically. Pass an explicit \`templateId\` only when you need a specific allowed template other than the default. If the document type has no default template, the document is created without one.
15330
14805
  `,
15331
14806
  inputSchema: createDocumentSchema.shape,
15332
14807
  outputSchema: createOutputSchema.shape,
@@ -15346,6 +14821,13 @@ var CreateDocumentTool = {
15346
14821
  name: model.name,
15347
14822
  segment: null
15348
14823
  }));
14824
+ let template;
14825
+ if (model.templateId) {
14826
+ template = { id: model.templateId };
14827
+ } else {
14828
+ const docType = await client.getDocumentTypeById(model.documentTypeId);
14829
+ template = _optionalChain([docType, 'access', _22 => _22.defaultTemplate, 'optionalAccess', _23 => _23.id]) ? { id: docType.defaultTemplate.id } : null;
14830
+ }
15349
14831
  const payload = {
15350
14832
  id: documentId,
15351
14833
  documentType: {
@@ -15354,7 +14836,7 @@ var CreateDocumentTool = {
15354
14836
  parent: model.parentId ? {
15355
14837
  id: model.parentId
15356
14838
  } : void 0,
15357
- template: null,
14839
+ template,
15358
14840
  values: model.values,
15359
14841
  variants
15360
14842
  };
@@ -16117,23 +15599,25 @@ var UpdateDocumentPropertiesTool = {
16117
15599
  }
16118
15600
  });
16119
15601
  }
16120
- const allPropertiesToValidate = [...propertiesToUpdate, ...propertiesToAdd];
16121
- if (allPropertiesToValidate.length > 0) {
16122
- const docTypeProps = await getDocumentTypeProperties();
16123
- const propsToValidate = allPropertiesToValidate.map((p) => {
16124
- const def = docTypeProps.find((d) => d.alias === p.alias);
16125
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _10 => _10.dataTypeId]), () => ( "")) };
16126
- }).filter((p) => p.dataTypeId);
16127
- if (propsToValidate.length > 0) {
16128
- const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
16129
- if (!valueValidation.isValid) {
16130
- throw new (0, _mcpserversdk.ToolValidationError)({
16131
- title: "Property value validation failed",
16132
- detail: valueValidation.errors.join("; "),
16133
- extensions: {
16134
- errors: valueValidation.errors
16135
- }
16136
- });
15602
+ if (!isUmbracoAtLeast(17, 4)) {
15603
+ const allPropertiesToValidate = [...propertiesToUpdate, ...propertiesToAdd];
15604
+ if (allPropertiesToValidate.length > 0) {
15605
+ const docTypeProps = await getDocumentTypeProperties();
15606
+ const propsToValidate = allPropertiesToValidate.map((p) => {
15607
+ const def = docTypeProps.find((d) => d.alias === p.alias);
15608
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _24 => _24.dataTypeId]), () => ( "")) };
15609
+ }).filter((p) => p.dataTypeId);
15610
+ if (propsToValidate.length > 0) {
15611
+ const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
15612
+ if (!valueValidation.isValid) {
15613
+ throw new (0, _mcpserversdk.ToolValidationError)({
15614
+ title: "Property value validation failed",
15615
+ detail: valueValidation.errors.join("; "),
15616
+ extensions: {
15617
+ errors: valueValidation.errors
15618
+ }
15619
+ });
15620
+ }
16137
15621
  }
16138
15622
  }
16139
15623
  }
@@ -16224,13 +15708,13 @@ function isBlockStructure(value) {
16224
15708
  }
16225
15709
  return Array.isArray(value.contentData) && Array.isArray(value.settingsData);
16226
15710
  }
16227
- function discoverAllBlockArrays(value, path4 = "root") {
15711
+ function discoverAllBlockArrays(value, path3 = "root") {
16228
15712
  const results = [];
16229
15713
  if (!value || typeof value !== "object") {
16230
15714
  return results;
16231
15715
  }
16232
15716
  if (isRichTextValue(value)) {
16233
- const nestedResults = discoverAllBlockArrays(value.blocks, `${path4}.blocks`);
15717
+ const nestedResults = discoverAllBlockArrays(value.blocks, `${path3}.blocks`);
16234
15718
  results.push(...nestedResults);
16235
15719
  return results;
16236
15720
  }
@@ -16238,12 +15722,12 @@ function discoverAllBlockArrays(value, path4 = "root") {
16238
15722
  results.push({
16239
15723
  contentData: value.contentData,
16240
15724
  settingsData: value.settingsData,
16241
- path: path4
15725
+ path: path3
16242
15726
  });
16243
15727
  value.contentData.forEach((block, index) => {
16244
15728
  if (block.values && Array.isArray(block.values)) {
16245
15729
  block.values.forEach((prop, propIndex) => {
16246
- const propPath = `${path4}.contentData[${index}].values[${propIndex}](${prop.alias})`;
15730
+ const propPath = `${path3}.contentData[${index}].values[${propIndex}](${prop.alias})`;
16247
15731
  if (isRichTextValue(prop.value)) {
16248
15732
  const nestedResults = discoverAllBlockArrays(prop.value.blocks, `${propPath}.blocks`);
16249
15733
  results.push(...nestedResults);
@@ -16257,7 +15741,7 @@ function discoverAllBlockArrays(value, path4 = "root") {
16257
15741
  value.settingsData.forEach((block, index) => {
16258
15742
  if (block.values && Array.isArray(block.values)) {
16259
15743
  block.values.forEach((prop, propIndex) => {
16260
- const propPath = `${path4}.settingsData[${index}].values[${propIndex}](${prop.alias})`;
15744
+ const propPath = `${path3}.settingsData[${index}].values[${propIndex}](${prop.alias})`;
16261
15745
  if (isRichTextValue(prop.value)) {
16262
15746
  const nestedResults = discoverAllBlockArrays(prop.value.blocks, `${propPath}.blocks`);
16263
15747
  results.push(...nestedResults);
@@ -16411,10 +15895,10 @@ var UpdateBlockPropertyTool = {
16411
15895
  let updatedCount = 0;
16412
15896
  let addedCount = 0;
16413
15897
  const elementTypeProperties = await getElementTypeProperties(foundBlock.block.contentTypeKey);
16414
- if (elementTypeProperties.length > 0) {
15898
+ if (!isUmbracoAtLeast(17, 4) && elementTypeProperties.length > 0) {
16415
15899
  const propsToValidate = update.properties.map((p) => {
16416
15900
  const def = elementTypeProperties.find((d) => d.alias === p.alias);
16417
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _11 => _11.dataTypeId]), () => ( "")) };
15901
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _25 => _25.dataTypeId]), () => ( "")) };
16418
15902
  }).filter((p) => p.dataTypeId);
16419
15903
  if (propsToValidate.length > 0) {
16420
15904
  const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
@@ -16570,14 +16054,14 @@ var get_children_default4 = _mcpserversdk.withStandardDecorators.call(void 0, Ge
16570
16054
 
16571
16055
 
16572
16056
 
16573
- var outputSchema14 = _zod.z.object({
16057
+ var outputSchema17 = _zod.z.object({
16574
16058
  items: getTreeDocumentAncestorsResponse
16575
16059
  });
16576
16060
  var GetDocumentAncestorsTool = {
16577
16061
  name: "get-document-ancestors",
16578
16062
  description: "Gets ancestor items for a document.",
16579
16063
  inputSchema: getTreeDocumentAncestorsQueryParams.shape,
16580
- outputSchema: outputSchema14.shape,
16064
+ outputSchema: outputSchema17.shape,
16581
16065
  annotations: {
16582
16066
  readOnlyHint: true
16583
16067
  },
@@ -16597,7 +16081,7 @@ var get_ancestors_default4 = _mcpserversdk.withStandardDecorators.call(void 0, G
16597
16081
 
16598
16082
 
16599
16083
 
16600
- var outputSchema15 = _zod.z.object({
16084
+ var outputSchema18 = _zod.z.object({
16601
16085
  items: getItemDocumentAncestorsResponse
16602
16086
  });
16603
16087
  var GetDocumentAncestorsBatchTool = {
@@ -16606,7 +16090,7 @@ var GetDocumentAncestorsBatchTool = {
16606
16090
  Returns one entry per requested Id, each containing that Id's chain of ancestors.
16607
16091
  Differs from get-document-ancestors which returns the tree-style ancestors of a single Id.`,
16608
16092
  inputSchema: getItemDocumentAncestorsQueryParams.shape,
16609
- outputSchema: outputSchema15.shape,
16093
+ outputSchema: outputSchema18.shape,
16610
16094
  annotations: {
16611
16095
  readOnlyHint: true
16612
16096
  },
@@ -16725,7 +16209,7 @@ var DocumentCollection = {
16725
16209
  tools.push(get_document_by_id_default);
16726
16210
  tools.push(get_document_publish_default);
16727
16211
  tools.push(get_document_configuration_default);
16728
- tools.push(get_document_property_value_template_default);
16212
+ tools.push(get_document_type_schema_default);
16729
16213
  tools.push(copy_document_default);
16730
16214
  tools.push(create_document_default);
16731
16215
  tools.push(post_document_public_access_default);
@@ -17074,7 +16558,7 @@ var CopyDocumentTypeTool = {
17074
16558
  validateStatus: () => true
17075
16559
  });
17076
16560
  if (response.status === 201) {
17077
- const location = _optionalChain([response, 'access', _12 => _12.headers, 'optionalAccess', _13 => _13.location]) || "";
16561
+ const location = _optionalChain([response, 'access', _26 => _26.headers, 'optionalAccess', _27 => _27.location]) || "";
17078
16562
  const newId = location.split("/").pop() || "";
17079
16563
  const output = { id: newId };
17080
16564
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -17162,14 +16646,14 @@ var get_children_default5 = _mcpserversdk.withStandardDecorators.call(void 0, Ge
17162
16646
 
17163
16647
 
17164
16648
 
17165
- var outputSchema16 = _zod.z.object({
16649
+ var outputSchema19 = _zod.z.object({
17166
16650
  items: getTreeDocumentTypeAncestorsResponse
17167
16651
  });
17168
16652
  var GetDocumentTypeAncestorsTool = {
17169
16653
  name: "get-document-type-ancestors",
17170
16654
  description: "Gets the ancestors of a document type",
17171
16655
  inputSchema: getTreeDocumentTypeAncestorsQueryParams.shape,
17172
- outputSchema: outputSchema16.shape,
16656
+ outputSchema: outputSchema19.shape,
17173
16657
  annotations: { readOnlyHint: true },
17174
16658
  slices: ["tree"],
17175
16659
  handler: (async (params) => {
@@ -17187,7 +16671,7 @@ var get_ancestors_default5 = _mcpserversdk.withStandardDecorators.call(void 0, G
17187
16671
 
17188
16672
 
17189
16673
 
17190
- var outputSchema17 = _zod.z.object({
16674
+ var outputSchema20 = _zod.z.object({
17191
16675
  items: getItemDocumentTypeAncestorsResponse
17192
16676
  });
17193
16677
  var GetDocumentTypeAncestorsBatchTool = {
@@ -17196,7 +16680,7 @@ var GetDocumentTypeAncestorsBatchTool = {
17196
16680
  Returns one entry per requested Id, each containing that Id's chain of ancestors.
17197
16681
  Differs from get-document-type-ancestors which returns the tree-style ancestors of a single Id.`,
17198
16682
  inputSchema: getItemDocumentTypeAncestorsQueryParams.shape,
17199
- outputSchema: outputSchema17.shape,
16683
+ outputSchema: outputSchema20.shape,
17200
16684
  annotations: {
17201
16685
  readOnlyHint: true
17202
16686
  },
@@ -17399,14 +16883,14 @@ var get_document_type_blueprint_default = _mcpserversdk.withStandardDecorators.c
17399
16883
 
17400
16884
 
17401
16885
 
17402
- var outputSchema18 = _zod.z.object({
16886
+ var outputSchema21 = _zod.z.object({
17403
16887
  items: getDocumentTypeByIdCompositionReferencesResponse
17404
16888
  });
17405
16889
  var GetDocumentTypeCompositionReferencesTool = {
17406
16890
  name: "get-document-type-composition-references",
17407
16891
  description: "Gets the composition references for a document type",
17408
16892
  inputSchema: getDocumentTypeByIdCompositionReferencesParams.shape,
17409
- outputSchema: outputSchema18.shape,
16893
+ outputSchema: outputSchema21.shape,
17410
16894
  annotations: { readOnlyHint: true },
17411
16895
  slices: ["references"],
17412
16896
  handler: (async ({ id }) => {
@@ -17424,14 +16908,14 @@ var get_document_type_composition_references_default = _mcpserversdk.withStandar
17424
16908
 
17425
16909
 
17426
16910
 
17427
- var outputSchema19 = _zod.z.object({
16911
+ var outputSchema22 = _zod.z.object({
17428
16912
  items: postDocumentTypeAvailableCompositionsResponse
17429
16913
  });
17430
16914
  var GetDocumentTypeAvailableCompositionsTool = {
17431
16915
  name: "get-document-type-available-compositions",
17432
16916
  description: "Gets the available compositions for a document type",
17433
16917
  inputSchema: postDocumentTypeAvailableCompositionsBody.shape,
17434
- outputSchema: outputSchema19.shape,
16918
+ outputSchema: outputSchema22.shape,
17435
16919
  annotations: { readOnlyHint: true },
17436
16920
  slices: ["read"],
17437
16921
  handler: (async (model) => {
@@ -17497,14 +16981,14 @@ var get_document_type_configuration_default = _mcpserversdk.withStandardDecorato
17497
16981
 
17498
16982
 
17499
16983
 
17500
- var outputSchema20 = _zod.z.object({
16984
+ var outputSchema23 = _zod.z.object({
17501
16985
  items: getItemDocumentTypeResponse
17502
16986
  });
17503
16987
  var GetDocumentTypesByIdArrayTool = {
17504
16988
  name: "get-document-types-by-id-array",
17505
16989
  description: "Gets document types by IDs (or empty array if no IDs are provided)",
17506
16990
  inputSchema: getItemDocumentTypeQueryParams.shape,
17507
- outputSchema: outputSchema20.shape,
16991
+ outputSchema: outputSchema23.shape,
17508
16992
  annotations: { readOnlyHint: true },
17509
16993
  slices: ["list"],
17510
16994
  handler: (async (params) => {
@@ -18211,7 +17695,7 @@ var create_element_type_default = _mcpserversdk.withStandardDecorators.call(void
18211
17695
 
18212
17696
 
18213
17697
 
18214
- var outputSchema21 = _zod.z.object({
17698
+ var outputSchema24 = _zod.z.object({
18215
17699
  items: getTreeDocumentTypeRootResponse.shape.items
18216
17700
  });
18217
17701
  var GetAllDocumentTypesTool = {
@@ -18220,7 +17704,7 @@ var GetAllDocumentTypesTool = {
18220
17704
  This is the preferred approach when you need to understand the full folder structure.
18221
17705
  For large sites, this may take a while to complete. For smaller sites its more efficient than fetching all documents by folder.`,
18222
17706
  inputSchema: {},
18223
- outputSchema: outputSchema21.shape,
17707
+ outputSchema: outputSchema24.shape,
18224
17708
  annotations: { readOnlyHint: true },
18225
17709
  slices: ["list"],
18226
17710
  handler: (async () => {
@@ -18528,7 +18012,7 @@ var HealthCollection = {
18528
18012
 
18529
18013
 
18530
18014
 
18531
- var outputSchema22 = _zod.z.object({
18015
+ var outputSchema25 = _zod.z.object({
18532
18016
  items: getImagingResizeUrlsResponse
18533
18017
  });
18534
18018
  var GetImagingResizeUrlsTool = {
@@ -18545,7 +18029,7 @@ var GetImagingResizeUrlsTool = {
18545
18029
  - width: Target width in pixels (default: 200)
18546
18030
  - mode: Resize mode (Crop, Max, Stretch, Pad, BoxPad, Min)`,
18547
18031
  inputSchema: getImagingResizeUrlsQueryParams.shape,
18548
- outputSchema: outputSchema22.shape,
18032
+ outputSchema: outputSchema25.shape,
18549
18033
  annotations: {
18550
18034
  readOnlyHint: true
18551
18035
  },
@@ -18672,14 +18156,14 @@ var IndexerCollection = {
18672
18156
 
18673
18157
 
18674
18158
 
18675
- var outputSchema23 = _zod.z.object({
18159
+ var outputSchema26 = _zod.z.object({
18676
18160
  items: getItemLanguageResponse
18677
18161
  });
18678
18162
  var GetLanguageItemsTool = {
18679
18163
  name: "get-language-items",
18680
18164
  description: "Gets language items (optionally filtered by isoCode)",
18681
18165
  inputSchema: getItemLanguageQueryParams.shape,
18682
- outputSchema: outputSchema23.shape,
18166
+ outputSchema: outputSchema26.shape,
18683
18167
  annotations: {
18684
18168
  readOnlyHint: true
18685
18169
  },
@@ -19109,14 +18593,14 @@ var LogViewerCollection = {
19109
18593
 
19110
18594
 
19111
18595
 
19112
- var outputSchema24 = _zod.z.object({
18596
+ var outputSchema27 = _zod.z.object({
19113
18597
  items: getManifestManifestResponse
19114
18598
  });
19115
18599
  var GetManifestManifestTool = {
19116
18600
  name: "get-manifest-manifest",
19117
18601
  description: "Gets all manifests (both public and private) from the Umbraco installation. Each manifest contains an extensions property showing what the package exposes to Umbraco. Use to see which packages are installed, troubleshoot package issues, or list available extensions.",
19118
18602
  inputSchema: {},
19119
- outputSchema: outputSchema24.shape,
18603
+ outputSchema: outputSchema27.shape,
19120
18604
  annotations: {
19121
18605
  readOnlyHint: true
19122
18606
  },
@@ -19136,14 +18620,14 @@ var get_manifest_manifest_default = _mcpserversdk.withStandardDecorators.call(vo
19136
18620
 
19137
18621
 
19138
18622
 
19139
- var outputSchema25 = _zod.z.object({
18623
+ var outputSchema28 = _zod.z.object({
19140
18624
  items: getManifestManifestPrivateResponse
19141
18625
  });
19142
18626
  var GetManifestManifestPrivateTool = {
19143
18627
  name: "get-manifest-manifest-private",
19144
18628
  description: "Gets private manifests from the Umbraco installation. Private manifests require authentication and contain administrative/sensitive extensions.",
19145
18629
  inputSchema: {},
19146
- outputSchema: outputSchema25.shape,
18630
+ outputSchema: outputSchema28.shape,
19147
18631
  annotations: {
19148
18632
  readOnlyHint: true
19149
18633
  },
@@ -19163,14 +18647,14 @@ var get_manifest_manifest_private_default = _mcpserversdk.withStandardDecorators
19163
18647
 
19164
18648
 
19165
18649
 
19166
- var outputSchema26 = _zod.z.object({
18650
+ var outputSchema29 = _zod.z.object({
19167
18651
  items: getManifestManifestPublicResponse
19168
18652
  });
19169
18653
  var GetManifestManifestPublicTool = {
19170
18654
  name: "get-manifest-manifest-public",
19171
18655
  description: "Gets public manifests from the Umbraco installation. Public manifests can be accessed without authentication and contain public-facing extensions.",
19172
18656
  inputSchema: {},
19173
- outputSchema: outputSchema26.shape,
18657
+ outputSchema: outputSchema29.shape,
19174
18658
  annotations: {
19175
18659
  readOnlyHint: true
19176
18660
  },
@@ -19207,17 +18691,15 @@ var ManifestCollection = {
19207
18691
 
19208
18692
 
19209
18693
  // src/umb-management-api/tools/media/post/helpers/media-upload-helpers.ts
19210
- var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs); var fs3 = _interopRequireWildcard(_fs);
19211
- var _os = require('os'); var os = _interopRequireWildcard(_os); var os2 = _interopRequireWildcard(_os);
19212
- var _path = require('path'); var path2 = _interopRequireWildcard(_path); var path = _interopRequireWildcard(_path); var path3 = _interopRequireWildcard(_path);
18694
+ var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
18695
+ var _path = require('path'); var path2 = _interopRequireWildcard(_path); var path = _interopRequireWildcard(_path);
19213
18696
  var _mimetypes = require('mime-types'); var _mimetypes2 = _interopRequireDefault(_mimetypes);
19214
18697
 
19215
18698
  // src/umb-management-api/tools/media/post/helpers/validate-file-path.ts
19216
18699
 
19217
18700
 
19218
-
19219
18701
  async function validateFilePath(filePath, allowedPaths) {
19220
- const allowedMediaPaths = await _asyncNullishCoalesce(allowedPaths, async () => ( (await _mcpserversdk.getServerConfig.call(void 0, true)).config.allowedMediaPaths));
18702
+ const allowedMediaPaths = _nullishCoalesce(allowedPaths, () => ( (process.env.UMBRACO_ALLOWED_MEDIA_PATHS ? process.env.UMBRACO_ALLOWED_MEDIA_PATHS.split(",").map((p) => p.trim()).filter(Boolean) : void 0)));
19221
18703
  if (!allowedMediaPaths || allowedMediaPaths.length === 0) {
19222
18704
  throw new Error(
19223
18705
  'File path uploads are disabled. To enable, set UMBRACO_ALLOWED_MEDIA_PATHS environment variable with comma-separated allowed directory paths (e.g., UMBRACO_ALLOWED_MEDIA_PATHS="/tmp/uploads,/var/media")'
@@ -19225,8 +18707,13 @@ async function validateFilePath(filePath, allowedPaths) {
19225
18707
  }
19226
18708
  const normalizedPath = path.resolve(filePath);
19227
18709
  const isAllowed = allowedMediaPaths.some((allowedPath) => {
19228
- const realAllowedPath = fs.realpathSync(allowedPath);
19229
- return normalizedPath.startsWith(allowedPath) || normalizedPath.startsWith(realAllowedPath);
18710
+ if (normalizedPath.startsWith(allowedPath)) return true;
18711
+ try {
18712
+ const realAllowedPath = fs.realpathSync(allowedPath);
18713
+ return normalizedPath.startsWith(realAllowedPath);
18714
+ } catch (e) {
18715
+ return false;
18716
+ }
19230
18717
  });
19231
18718
  if (!isAllowed) {
19232
18719
  throw new Error(
@@ -19238,8 +18725,13 @@ async function validateFilePath(filePath, allowedPaths) {
19238
18725
  if (stats.isSymbolicLink()) {
19239
18726
  const realPath = fs.realpathSync(normalizedPath);
19240
18727
  const symlinkAllowed = allowedMediaPaths.some((allowedPath) => {
19241
- const realAllowedPath = fs.realpathSync(allowedPath);
19242
- return realPath.startsWith(allowedPath) || realPath.startsWith(realAllowedPath);
18728
+ if (realPath.startsWith(allowedPath)) return true;
18729
+ try {
18730
+ const realAllowedPath = fs.realpathSync(allowedPath);
18731
+ return realPath.startsWith(realAllowedPath);
18732
+ } catch (e2) {
18733
+ return false;
18734
+ }
19243
18735
  });
19244
18736
  if (!symlinkAllowed) {
19245
18737
  throw new Error(
@@ -19271,7 +18763,7 @@ function getExtensionFromMimeType(mimeType) {
19271
18763
  return extension ? `.${extension}` : void 0;
19272
18764
  }
19273
18765
  function validateMediaTypeForSvg(filePath, fileUrl, fileName, mediaTypeName) {
19274
- const isSvg = _optionalChain([filePath, 'optionalAccess', _14 => _14.toLowerCase, 'call', _15 => _15(), 'access', _16 => _16.endsWith, 'call', _17 => _17(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _18 => _18.toLowerCase, 'call', _19 => _19(), 'access', _20 => _20.endsWith, 'call', _21 => _21(".svg")]) || fileName.toLowerCase().endsWith(".svg");
18766
+ const isSvg = _optionalChain([filePath, 'optionalAccess', _28 => _28.toLowerCase, 'call', _29 => _29(), 'access', _30 => _30.endsWith, 'call', _31 => _31(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _32 => _32.toLowerCase, 'call', _33 => _33(), 'access', _34 => _34.endsWith, 'call', _35 => _35(".svg")]) || fileName.toLowerCase().endsWith(".svg");
19275
18767
  if (isSvg && mediaTypeName === _mcpserversdk.MEDIA_TYPE_IMAGE) {
19276
18768
  console.warn(`SVG detected - using ${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS} media type instead of ${_mcpserversdk.MEDIA_TYPE_IMAGE}`);
19277
18769
  return _mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS;
@@ -19326,18 +18818,25 @@ function buildValueStructure(mediaTypeName, temporaryFileId) {
19326
18818
  value: { temporaryFileId }
19327
18819
  };
19328
18820
  }
19329
- async function createFileStream(sourceType, filePath, fileUrl, fileAsBase64, fileName) {
19330
- let tempFilePath = null;
19331
- let readStream;
18821
+ async function createFilePayload(sourceType, filePath, fileUrl, fileAsBase64, fileName) {
19332
18822
  switch (sourceType) {
19333
- case "filePath":
18823
+ case "filePath": {
19334
18824
  if (!filePath) {
19335
18825
  throw new Error("filePath is required when sourceType is 'filePath'");
19336
18826
  }
18827
+ if (typeof fs2.createReadStream !== "function") {
18828
+ throw new Error(
18829
+ "filePath source is not supported in this runtime (no filesystem). Use sourceType 'url' or 'base64' instead."
18830
+ );
18831
+ }
19337
18832
  const validatedPath = await validateFilePath(filePath);
19338
- readStream = fs2.createReadStream(validatedPath);
19339
- break;
19340
- case "url":
18833
+ const filename = fileName.includes(".") ? fileName : path2.basename(validatedPath);
18834
+ return {
18835
+ data: fs2.createReadStream(validatedPath),
18836
+ filename
18837
+ };
18838
+ }
18839
+ case "url": {
19341
18840
  if (!fileUrl) {
19342
18841
  throw new Error("fileUrl is required when sourceType is 'url'");
19343
18842
  }
@@ -19353,123 +18852,110 @@ async function createFileStream(sourceType, filePath, fileUrl, fileAsBase64, fil
19353
18852
  if (response.status >= 400) {
19354
18853
  throw new Error(`Failed to fetch file from URL: HTTP ${response.status} ${response.statusText}`);
19355
18854
  }
19356
- const arrayBuffer = await response.arrayBuffer();
19357
- let fileNameWithExtension2 = fileName;
18855
+ const buffer = Buffer.from(await response.arrayBuffer());
18856
+ let filename = fileName;
19358
18857
  if (!fileName.includes(".")) {
19359
18858
  const urlPath = new URL(fileUrl).pathname;
19360
18859
  const urlExtension = path2.extname(urlPath);
19361
18860
  if (urlExtension) {
19362
- fileNameWithExtension2 = `${fileName}${urlExtension}`;
18861
+ filename = `${fileName}${urlExtension}`;
19363
18862
  } else {
19364
18863
  const contentType = _nullishCoalesce(response.headers.get("content-type"), () => ( void 0));
19365
18864
  const extensionFromMime = getExtensionFromMimeType(contentType);
19366
- if (extensionFromMime) {
19367
- fileNameWithExtension2 = `${fileName}${extensionFromMime}`;
19368
- } else {
19369
- fileNameWithExtension2 = `${fileName}.bin`;
19370
- }
18865
+ filename = extensionFromMime ? `${fileName}${extensionFromMime}` : `${fileName}.bin`;
19371
18866
  }
19372
18867
  }
19373
- tempFilePath = path2.join(os.tmpdir(), fileNameWithExtension2);
19374
- fs2.writeFileSync(tempFilePath, Buffer.from(arrayBuffer));
19375
- readStream = fs2.createReadStream(tempFilePath);
18868
+ return { data: buffer, filename };
19376
18869
  } catch (error) {
19377
18870
  if (error.name === "AbortError") {
19378
18871
  throw new Error(`Request timeout after 30s fetching URL: ${fileUrl}`);
19379
18872
  }
19380
18873
  throw new Error(`Failed to fetch URL: ${fileUrl} - ${error.message}`);
19381
18874
  }
19382
- break;
19383
- case "base64":
18875
+ }
18876
+ case "base64": {
19384
18877
  if (!fileAsBase64) {
19385
18878
  throw new Error("fileAsBase64 is required when sourceType is 'base64'");
19386
18879
  }
19387
- const fileContent = Buffer.from(fileAsBase64, "base64");
19388
- let fileNameWithExtension = fileName;
18880
+ const buffer = Buffer.from(fileAsBase64, "base64");
18881
+ let filename = fileName;
19389
18882
  if (!fileName.includes(".")) {
19390
- const extension = _mcpserversdk.detectFileExtensionFromBuffer.call(void 0, fileContent);
19391
- fileNameWithExtension = `${fileName}${extension}`;
18883
+ const extension = _mcpserversdk.detectFileExtensionFromBuffer.call(void 0, buffer);
18884
+ filename = `${fileName}${extension}`;
19392
18885
  }
19393
- tempFilePath = path2.join(os.tmpdir(), fileNameWithExtension);
19394
- fs2.writeFileSync(tempFilePath, fileContent);
19395
- readStream = fs2.createReadStream(tempFilePath);
19396
- break;
19397
- }
19398
- return { readStream, tempFilePath };
19399
- }
19400
- function cleanupTempFile(tempFilePath) {
19401
- if (tempFilePath && fs2.existsSync(tempFilePath)) {
19402
- try {
19403
- fs2.unlinkSync(tempFilePath);
19404
- } catch (e) {
19405
- console.error("Failed to cleanup temp file:", e);
18886
+ return { data: buffer, filename };
19406
18887
  }
19407
18888
  }
19408
18889
  }
19409
18890
  async function uploadMediaFile(client, params) {
19410
- let tempFilePath = null;
18891
+ const validatedMediaTypeName = validateMediaTypeForSvg(
18892
+ params.filePath,
18893
+ params.fileUrl,
18894
+ params.name,
18895
+ params.mediaTypeName
18896
+ );
18897
+ const mediaTypeId = await fetchMediaTypeId(client, validatedMediaTypeName);
18898
+ const { data, filename } = await createFilePayload(
18899
+ params.sourceType,
18900
+ params.filePath,
18901
+ params.fileUrl,
18902
+ params.fileAsBase64,
18903
+ params.name
18904
+ );
19411
18905
  try {
19412
- const validatedMediaTypeName = validateMediaTypeForSvg(
19413
- params.filePath,
19414
- params.fileUrl,
19415
- params.name,
19416
- params.mediaTypeName
19417
- );
19418
- const mediaTypeId = await fetchMediaTypeId(client, validatedMediaTypeName);
19419
- const { readStream, tempFilePath: createdTempPath } = await createFileStream(
19420
- params.sourceType,
19421
- params.filePath,
19422
- params.fileUrl,
19423
- params.fileAsBase64,
19424
- params.name
19425
- );
19426
- tempFilePath = createdTempPath;
19427
- try {
19428
- await client.postTemporaryFile({
19429
- Id: params.temporaryFileId,
19430
- File: readStream
19431
- });
19432
- } catch (error) {
19433
- const err = error;
19434
- const errorData = _optionalChain([err, 'access', _22 => _22.response, 'optionalAccess', _23 => _23.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
19435
- throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _24 => _24.response, 'optionalAccess', _25 => _25.status]) || "Unknown error"} - ${errorData}`);
19436
- }
19437
- const valueStructure = buildValueStructure(validatedMediaTypeName, params.temporaryFileId);
19438
- let response;
19439
- try {
19440
- response = await client.postMedia({
19441
- mediaType: { id: mediaTypeId },
19442
- variants: [
19443
- {
19444
- culture: null,
19445
- segment: null,
19446
- name: params.name
19447
- // Use original name provided by user
19448
- }
19449
- ],
19450
- values: [valueStructure],
19451
- parent: params.parentId ? { id: params.parentId } : null
19452
- }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
19453
- } catch (error) {
19454
- const err = error;
19455
- throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _26 => _26.response, 'optionalAccess', _27 => _27.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _28 => _28.response, 'optionalAccess', _29 => _29.data])) || err.message}`);
19456
- }
19457
- if (response.status < 200 || response.status >= 300) {
19458
- throw new Error(`Request failed with status code ${response.status}`);
19459
- }
19460
- const locationHeader = _optionalChain([response, 'access', _30 => _30.headers, 'optionalAccess', _31 => _31.location]) || _optionalChain([response, 'access', _32 => _32.headers, 'optionalAccess', _33 => _33.Location]);
19461
- if (!locationHeader) {
19462
- throw new Error("No Location header in response - cannot determine created media ID");
19463
- }
19464
- const idMatch = locationHeader.match(/\/([a-f0-9-]{36})$/i);
19465
- if (!idMatch) {
19466
- throw new Error(`Could not extract ID from Location header: ${locationHeader}`);
19467
- }
19468
- const mediaId = idMatch[1];
19469
- return { name: params.name, id: mediaId };
19470
- } finally {
19471
- cleanupTempFile(tempFilePath);
18906
+ await client.postTemporaryFile({
18907
+ Id: params.temporaryFileId,
18908
+ File: data,
18909
+ FileName: filename
18910
+ });
18911
+ } catch (error) {
18912
+ const err = error;
18913
+ const errorData = _optionalChain([err, 'access', _36 => _36.response, 'optionalAccess', _37 => _37.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
18914
+ throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _38 => _38.response, 'optionalAccess', _39 => _39.status]) || "Unknown error"} - ${errorData}`);
18915
+ }
18916
+ const valueStructure = buildValueStructure(validatedMediaTypeName, params.temporaryFileId);
18917
+ let response;
18918
+ try {
18919
+ response = await client.postMedia({
18920
+ mediaType: { id: mediaTypeId },
18921
+ variants: [
18922
+ {
18923
+ culture: null,
18924
+ segment: null,
18925
+ name: params.name
18926
+ // Use original name provided by user
18927
+ }
18928
+ ],
18929
+ values: [valueStructure],
18930
+ parent: params.parentId ? { id: params.parentId } : null
18931
+ }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
18932
+ } catch (error) {
18933
+ const err = error;
18934
+ throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _40 => _40.response, 'optionalAccess', _41 => _41.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _42 => _42.response, 'optionalAccess', _43 => _43.data])) || err.message}`);
18935
+ }
18936
+ if (response.status < 200 || response.status >= 300) {
18937
+ throw new Error(`Request failed with status code ${response.status}`);
18938
+ }
18939
+ const locationHeader = _optionalChain([response, 'access', _44 => _44.headers, 'optionalAccess', _45 => _45.location]) || _optionalChain([response, 'access', _46 => _46.headers, 'optionalAccess', _47 => _47.Location]);
18940
+ if (!locationHeader) {
18941
+ throw new Error("No Location header in response - cannot determine created media ID");
19472
18942
  }
18943
+ const idMatch = locationHeader.match(/\/([a-f0-9-]{36})$/i);
18944
+ if (!idMatch) {
18945
+ throw new Error(`Could not extract ID from Location header: ${locationHeader}`);
18946
+ }
18947
+ const mediaId = idMatch[1];
18948
+ return { name: params.name, id: mediaId };
18949
+ }
18950
+
18951
+ // src/umb-management-api/tools/media/post/helpers/source-type-helpers.ts
18952
+ var FILE_PATH_ENTRY = `filePath - Most efficient for local files, works with any size
18953
+ SECURITY: Requires UMBRACO_ALLOWED_MEDIA_PATHS environment variable
18954
+ to be configured with comma-separated allowed directories.
18955
+ Example: UMBRACO_ALLOWED_MEDIA_PATHS="/tmp/uploads,/var/media"`;
18956
+ function buildSourceTypeSection(allowFilePath, otherSources) {
18957
+ const sources = allowFilePath ? [FILE_PATH_ENTRY, ...otherSources] : otherSources;
18958
+ return sources.map((s, i) => ` ${i + 1}. ${s}`).join("\n");
19473
18959
  }
19474
18960
 
19475
18961
  // src/umb-management-api/tools/media/post/create-media.ts
@@ -19484,23 +18970,30 @@ async function uploadMediaFile(client, params) {
19484
18970
 
19485
18971
 
19486
18972
 
19487
- var createMediaSchema = _zod.z.object({
19488
- sourceType: _zod.z.enum(["filePath", "url", "base64"]).describe("Media source type: 'filePath' for local files (most efficient), 'url' for web files, 'base64' for embedded data (small files only)"),
19489
- name: _zod.z.string().describe("The name of the media item"),
19490
- mediaTypeName: _zod.z.string().describe(`Media type: '${_mcpserversdk.MEDIA_TYPE_IMAGE}', '${_mcpserversdk.MEDIA_TYPE_ARTICLE}', '${_mcpserversdk.MEDIA_TYPE_AUDIO}', '${_mcpserversdk.MEDIA_TYPE_VIDEO}', '${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS}', '${_mcpserversdk.MEDIA_TYPE_FILE}', or custom media type name`),
19491
- filePath: _zod.z.string().optional().describe("Absolute path to the file (required if sourceType is 'filePath')"),
19492
- fileUrl: _zod.z.string().url().optional().describe("[raw] URL to fetch the file from (required if sourceType is 'url')"),
19493
- fileAsBase64: _zod.z.string().optional().describe("Base64 encoded file data (required if sourceType is 'base64')"),
19494
- parentId: _zod.z.string().uuid().optional().describe("Parent folder ID (defaults to root)")
19495
- });
19496
18973
  var createMediaOutputSchema = _zod.z.object({
19497
18974
  message: _zod.z.string(),
19498
18975
  name: _zod.z.string(),
19499
18976
  id: _zod.z.string().guid()
19500
18977
  });
19501
- var CreateMediaTool = {
19502
- name: "create-media",
19503
- description: `Upload any media file to Umbraco (images, documents, audio, video, SVG, or custom types).
18978
+ function createCreateMediaTool(options) {
18979
+ const sourceTypeValues = options.allowFilePath ? ["filePath", "url", "base64"] : ["url", "base64"];
18980
+ const sourceTypeDescription = options.allowFilePath ? "Media source type: 'filePath' for local files (most efficient), 'url' for web files, 'base64' for embedded data (small files only)" : "Media source type: 'url' for web files, 'base64' for embedded data (small files only)";
18981
+ const schema = _zod.z.object({
18982
+ sourceType: _zod.z.enum(sourceTypeValues).describe(sourceTypeDescription),
18983
+ name: _zod.z.string().describe("The name of the media item"),
18984
+ mediaTypeName: _zod.z.string().describe(`Media type: '${_mcpserversdk.MEDIA_TYPE_IMAGE}', '${_mcpserversdk.MEDIA_TYPE_ARTICLE}', '${_mcpserversdk.MEDIA_TYPE_AUDIO}', '${_mcpserversdk.MEDIA_TYPE_VIDEO}', '${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS}', '${_mcpserversdk.MEDIA_TYPE_FILE}', or custom media type name`),
18985
+ filePath: _zod.z.string().optional().describe("Absolute path to the file (required if sourceType is 'filePath')"),
18986
+ fileUrl: _zod.z.string().url().optional().describe("[raw] URL to fetch the file from (required if sourceType is 'url')"),
18987
+ fileAsBase64: _zod.z.string().optional().describe("Base64 encoded file data (required if sourceType is 'base64')"),
18988
+ parentId: _zod.z.string().uuid().optional().describe("Parent folder ID (defaults to root)")
18989
+ });
18990
+ const filePathSection = buildSourceTypeSection(options.allowFilePath, [
18991
+ "url - Fetch from web URL",
18992
+ "base64 - Only for small files (<10KB) due to token usage"
18993
+ ]);
18994
+ const tool = {
18995
+ name: "create-media",
18996
+ description: `Upload any media file to Umbraco (images, documents, audio, video, SVG, or custom types).
19504
18997
 
19505
18998
  Media Types:
19506
18999
  - ${_mcpserversdk.MEDIA_TYPE_IMAGE}: jpg, png, gif, webp, etc. (supports cropping)
@@ -19512,48 +19005,45 @@ var CreateMediaTool = {
19512
19005
  - Custom: any custom media type created in Umbraco
19513
19006
 
19514
19007
  Source Types:
19515
- 1. filePath - Most efficient for local files, works with any size
19516
- SECURITY: Requires UMBRACO_ALLOWED_MEDIA_PATHS environment variable
19517
- to be configured with comma-separated allowed directories.
19518
- Example: UMBRACO_ALLOWED_MEDIA_PATHS="/tmp/uploads,/var/media"
19519
- 2. url - Fetch from web URL
19520
- 3. base64 - Only for small files (<10KB) due to token usage
19008
+ ${filePathSection}
19521
19009
 
19522
19010
  The tool automatically:
19523
19011
  - Creates temporary files
19524
19012
  - Detects and validates media types (auto-corrects SVG vs Image)
19525
19013
  - Configures correct property editors (ImageCropper vs UploadField)
19526
19014
  - Cleans up temporary files`,
19527
- inputSchema: createMediaSchema.shape,
19528
- outputSchema: createMediaOutputSchema.shape,
19529
- slices: ["create"],
19530
- handler: (async (model) => {
19531
- try {
19532
- const client = UmbracoManagementClient3.getClient();
19533
- const temporaryFileId = _uuid.v4.call(void 0, );
19534
- const { name: actualName, id } = await uploadMediaFile(client, {
19535
- sourceType: model.sourceType,
19536
- name: model.name,
19537
- mediaTypeName: model.mediaTypeName,
19538
- filePath: model.filePath,
19539
- fileUrl: model.fileUrl,
19540
- fileAsBase64: model.fileAsBase64,
19541
- parentId: model.parentId,
19542
- temporaryFileId
19543
- });
19544
- return _mcpserversdk.createToolResult.call(void 0, {
19545
- message: `Media "${actualName}" created successfully`,
19546
- name: actualName,
19547
- id
19548
- });
19549
- } catch (error) {
19550
- return _mcpserversdk.createToolResultError.call(void 0, {
19551
- detail: `Error creating media: ${error.message}`
19552
- });
19553
- }
19554
- })
19555
- };
19556
- var create_media_default = _mcpserversdk.withStandardDecorators.call(void 0, CreateMediaTool);
19015
+ inputSchema: schema.shape,
19016
+ outputSchema: createMediaOutputSchema.shape,
19017
+ slices: ["create"],
19018
+ handler: (async (model) => {
19019
+ try {
19020
+ const client = UmbracoManagementClient3.getClient();
19021
+ const temporaryFileId = _uuid.v4.call(void 0, );
19022
+ const { name: actualName, id } = await uploadMediaFile(client, {
19023
+ sourceType: model.sourceType,
19024
+ name: model.name,
19025
+ mediaTypeName: model.mediaTypeName,
19026
+ filePath: model.filePath,
19027
+ fileUrl: model.fileUrl,
19028
+ fileAsBase64: model.fileAsBase64,
19029
+ parentId: model.parentId,
19030
+ temporaryFileId
19031
+ });
19032
+ return _mcpserversdk.createToolResult.call(void 0, {
19033
+ message: `Media "${actualName}" created successfully`,
19034
+ name: actualName,
19035
+ id
19036
+ });
19037
+ } catch (error) {
19038
+ return _mcpserversdk.createToolResultError.call(void 0, {
19039
+ detail: `Error creating media: ${error.message}`
19040
+ });
19041
+ }
19042
+ })
19043
+ };
19044
+ return _mcpserversdk.withStandardDecorators.call(void 0, tool);
19045
+ }
19046
+ var create_media_default = createCreateMediaTool({ allowFilePath: true });
19557
19047
 
19558
19048
  // src/umb-management-api/tools/media/post/create-media-multiple.ts
19559
19049
 
@@ -19569,16 +19059,6 @@ var create_media_default = _mcpserversdk.withStandardDecorators.call(void 0, Cre
19569
19059
 
19570
19060
 
19571
19061
 
19572
- var createMediaMultipleSchema = _zod.z.object({
19573
- sourceType: _zod.z.enum(["filePath", "url"]).describe("Media source type: 'filePath' for local files (most efficient), 'url' for web files. Base64 not supported for batch uploads due to token usage."),
19574
- files: _zod.z.array(_zod.z.object({
19575
- name: _zod.z.string().describe("The name of the media item"),
19576
- filePath: _zod.z.string().optional().describe("Absolute path to the file (required if sourceType is 'filePath')"),
19577
- fileUrl: _zod.z.string().url().optional().describe("URL to fetch the file from (required if sourceType is 'url')"),
19578
- mediaTypeName: _zod.z.string().optional().describe(`Optional override: '${_mcpserversdk.MEDIA_TYPE_IMAGE}', '${_mcpserversdk.MEDIA_TYPE_ARTICLE}', '${_mcpserversdk.MEDIA_TYPE_AUDIO}', '${_mcpserversdk.MEDIA_TYPE_VIDEO}', '${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS}', '${_mcpserversdk.MEDIA_TYPE_FILE}', or custom media type name. If not specified, defaults to '${_mcpserversdk.MEDIA_TYPE_FILE}'`)
19579
- })).describe("Array of files to upload (maximum 20 files per batch)"),
19580
- parentId: _zod.z.string().uuid().optional().describe("Parent folder ID (defaults to root)")
19581
- });
19582
19062
  var createMediaMultipleOutputSchema = _zod.z.object({
19583
19063
  summary: _zod.z.string(),
19584
19064
  results: _zod.z.array(_zod.z.object({
@@ -19588,70 +19068,84 @@ var createMediaMultipleOutputSchema = _zod.z.object({
19588
19068
  error: _zod.z.string().optional()
19589
19069
  }))
19590
19070
  });
19591
- var CreateMediaMultipleTool = {
19592
- name: "create-media-multiple",
19593
- description: `Batch upload multiple media files to Umbraco (maximum 20 files per batch).
19071
+ function createCreateMediaMultipleTool(options) {
19072
+ const sourceTypeValues = options.allowFilePath ? ["filePath", "url"] : ["url"];
19073
+ const sourceTypeDescription = options.allowFilePath ? "Media source type: 'filePath' for local files (most efficient), 'url' for web files. Base64 not supported for batch uploads due to token usage." : "Media source type: 'url' for web files. Base64 not supported for batch uploads due to token usage.";
19074
+ const schema = _zod.z.object({
19075
+ sourceType: _zod.z.enum(sourceTypeValues).describe(sourceTypeDescription),
19076
+ files: _zod.z.array(_zod.z.object({
19077
+ name: _zod.z.string().describe("The name of the media item"),
19078
+ filePath: _zod.z.string().optional().describe("Absolute path to the file (required if sourceType is 'filePath')"),
19079
+ fileUrl: _zod.z.string().url().optional().describe("URL to fetch the file from (required if sourceType is 'url')"),
19080
+ mediaTypeName: _zod.z.string().optional().describe(`Optional override: '${_mcpserversdk.MEDIA_TYPE_IMAGE}', '${_mcpserversdk.MEDIA_TYPE_ARTICLE}', '${_mcpserversdk.MEDIA_TYPE_AUDIO}', '${_mcpserversdk.MEDIA_TYPE_VIDEO}', '${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS}', '${_mcpserversdk.MEDIA_TYPE_FILE}', or custom media type name. If not specified, defaults to '${_mcpserversdk.MEDIA_TYPE_FILE}'`)
19081
+ })).describe("Array of files to upload (maximum 20 files per batch)"),
19082
+ parentId: _zod.z.string().uuid().optional().describe("Parent folder ID (defaults to root)")
19083
+ });
19084
+ const filePathSection = buildSourceTypeSection(options.allowFilePath, [
19085
+ "url - Fetch from web URL"
19086
+ ]);
19087
+ const tool = {
19088
+ name: "create-media-multiple",
19089
+ description: `Batch upload multiple media files to Umbraco (maximum 20 files per batch).
19594
19090
 
19595
19091
  Supports any file type: images, documents, audio, video, SVG, or custom types.
19596
19092
 
19597
19093
  Source Types:
19598
- 1. filePath - Most efficient for local files, works with any size
19599
- SECURITY: Requires UMBRACO_ALLOWED_MEDIA_PATHS environment variable
19600
- to be configured with comma-separated allowed directories.
19601
- Example: UMBRACO_ALLOWED_MEDIA_PATHS="/tmp/uploads,/var/media"
19602
- 2. url - Fetch from web URL
19094
+ ${filePathSection}
19603
19095
 
19604
19096
  Note: base64 is not supported for batch uploads due to token usage.
19605
19097
 
19606
19098
  The tool processes files sequentially and returns detailed results for each file.
19607
19099
  If some files fail, others will continue processing (continue-on-error strategy).`,
19608
- inputSchema: createMediaMultipleSchema.shape,
19609
- outputSchema: createMediaMultipleOutputSchema.shape,
19610
- slices: ["create"],
19611
- handler: (async (model) => {
19612
- if (model.files.length > 20) {
19613
- return _mcpserversdk.createToolResultError.call(void 0, {
19614
- detail: `Batch upload limited to 20 files per call. You provided ${model.files.length} files. Please split into multiple batches.`
19615
- });
19616
- }
19617
- const results = [];
19618
- const client = UmbracoManagementClient3.getClient();
19619
- for (const file of model.files) {
19620
- try {
19621
- const temporaryFileId = _uuid.v4.call(void 0, );
19622
- const defaultMediaType = file.mediaTypeName || _mcpserversdk.MEDIA_TYPE_FILE;
19623
- const { name: actualName, id: mediaId } = await uploadMediaFile(client, {
19624
- sourceType: model.sourceType,
19625
- name: file.name,
19626
- mediaTypeName: defaultMediaType,
19627
- filePath: file.filePath,
19628
- fileUrl: file.fileUrl,
19629
- fileAsBase64: void 0,
19630
- parentId: model.parentId,
19631
- temporaryFileId
19632
- });
19633
- results.push({
19634
- success: true,
19635
- name: actualName,
19636
- id: mediaId
19637
- });
19638
- } catch (error) {
19639
- results.push({
19640
- success: false,
19641
- name: file.name,
19642
- error: error.message
19100
+ inputSchema: schema.shape,
19101
+ outputSchema: createMediaMultipleOutputSchema.shape,
19102
+ slices: ["create"],
19103
+ handler: (async (model) => {
19104
+ if (model.files.length > 20) {
19105
+ return _mcpserversdk.createToolResultError.call(void 0, {
19106
+ detail: `Batch upload limited to 20 files per call. You provided ${model.files.length} files. Please split into multiple batches.`
19643
19107
  });
19644
19108
  }
19645
- }
19646
- const successCount = results.filter((r) => r.success).length;
19647
- const failureCount = results.filter((r) => !r.success).length;
19648
- return _mcpserversdk.createToolResult.call(void 0, {
19649
- summary: `Processed ${model.files.length} files: ${successCount} succeeded, ${failureCount} failed`,
19650
- results
19651
- });
19652
- })
19653
- };
19654
- var create_media_multiple_default = _mcpserversdk.withStandardDecorators.call(void 0, CreateMediaMultipleTool);
19109
+ const results = [];
19110
+ const client = UmbracoManagementClient3.getClient();
19111
+ for (const file of model.files) {
19112
+ try {
19113
+ const temporaryFileId = _uuid.v4.call(void 0, );
19114
+ const defaultMediaType = file.mediaTypeName || _mcpserversdk.MEDIA_TYPE_FILE;
19115
+ const { name: actualName, id: mediaId } = await uploadMediaFile(client, {
19116
+ sourceType: model.sourceType,
19117
+ name: file.name,
19118
+ mediaTypeName: defaultMediaType,
19119
+ filePath: file.filePath,
19120
+ fileUrl: file.fileUrl,
19121
+ fileAsBase64: void 0,
19122
+ parentId: model.parentId,
19123
+ temporaryFileId
19124
+ });
19125
+ results.push({
19126
+ success: true,
19127
+ name: actualName,
19128
+ id: mediaId
19129
+ });
19130
+ } catch (error) {
19131
+ results.push({
19132
+ success: false,
19133
+ name: file.name,
19134
+ error: error.message
19135
+ });
19136
+ }
19137
+ }
19138
+ const successCount = results.filter((r) => r.success).length;
19139
+ const failureCount = results.filter((r) => !r.success).length;
19140
+ return _mcpserversdk.createToolResult.call(void 0, {
19141
+ summary: `Processed ${model.files.length} files: ${successCount} succeeded, ${failureCount} failed`,
19142
+ results
19143
+ });
19144
+ })
19145
+ };
19146
+ return _mcpserversdk.withStandardDecorators.call(void 0, tool);
19147
+ }
19148
+ var create_media_multiple_default = createCreateMediaMultipleTool({ allowFilePath: true });
19655
19149
 
19656
19150
  // src/umb-management-api/tools/media/post/create-media-folder.ts
19657
19151
 
@@ -19695,7 +19189,7 @@ var CreateMediaFolderTool = {
19695
19189
  if (response.status < 200 || response.status >= 300) {
19696
19190
  throw new Error(`Request failed with status code ${response.status}`);
19697
19191
  }
19698
- const locationHeader = _optionalChain([response, 'access', _34 => _34.headers, 'optionalAccess', _35 => _35.location]) || _optionalChain([response, 'access', _36 => _36.headers, 'optionalAccess', _37 => _37.Location]);
19192
+ const locationHeader = _optionalChain([response, 'access', _48 => _48.headers, 'optionalAccess', _49 => _49.location]) || _optionalChain([response, 'access', _50 => _50.headers, 'optionalAccess', _51 => _51.Location]);
19699
19193
  if (!locationHeader) {
19700
19194
  throw new Error("No Location header in response - cannot determine created folder ID");
19701
19195
  }
@@ -19820,14 +19314,14 @@ var get_media_configuration_default = _mcpserversdk.withStandardDecorators.call(
19820
19314
 
19821
19315
 
19822
19316
 
19823
- var outputSchema27 = _zod.z.object({
19317
+ var outputSchema30 = _zod.z.object({
19824
19318
  items: getMediaUrlsResponse
19825
19319
  });
19826
19320
  var GetMediaUrlsTool = {
19827
19321
  name: "get-media-urls",
19828
19322
  description: "Gets the URLs for a media item.",
19829
19323
  inputSchema: getMediaUrlsQueryParams.shape,
19830
- outputSchema: outputSchema27.shape,
19324
+ outputSchema: outputSchema30.shape,
19831
19325
  annotations: { readOnlyHint: true },
19832
19326
  slices: ["read"],
19833
19327
  handler: (async (params) => {
@@ -19912,14 +19406,14 @@ var sort_media_default = _mcpserversdk.withStandardDecorators.call(void 0, SortM
19912
19406
 
19913
19407
 
19914
19408
 
19915
- var outputSchema28 = _zod.z.object({
19409
+ var outputSchema31 = _zod.z.object({
19916
19410
  items: getItemMediaResponse
19917
19411
  });
19918
19412
  var GetMediaByIdArrayTool = {
19919
19413
  name: "get-media-by-id-array",
19920
19414
  description: "Gets media items by an array of IDs",
19921
19415
  inputSchema: getItemMediaQueryParams.shape,
19922
- outputSchema: outputSchema28.shape,
19416
+ outputSchema: outputSchema31.shape,
19923
19417
  annotations: { readOnlyHint: true },
19924
19418
  slices: ["read"],
19925
19419
  handler: (async (params) => {
@@ -19964,14 +19458,14 @@ var move_media_default = _mcpserversdk.withStandardDecorators.call(void 0, MoveM
19964
19458
 
19965
19459
 
19966
19460
 
19967
- var outputSchema29 = _zod.z.object({
19461
+ var outputSchema32 = _zod.z.object({
19968
19462
  items: getTreeMediaAncestorsResponse
19969
19463
  });
19970
19464
  var GetMediaAncestorsTool = {
19971
19465
  name: "get-media-ancestors",
19972
19466
  description: "Gets ancestor items for a media.",
19973
19467
  inputSchema: getTreeMediaAncestorsQueryParams.shape,
19974
- outputSchema: outputSchema29.shape,
19468
+ outputSchema: outputSchema32.shape,
19975
19469
  annotations: { readOnlyHint: true },
19976
19470
  slices: ["tree"],
19977
19471
  handler: (async (params) => {
@@ -19989,7 +19483,7 @@ var get_ancestors_default6 = _mcpserversdk.withStandardDecorators.call(void 0, G
19989
19483
 
19990
19484
 
19991
19485
 
19992
- var outputSchema30 = _zod.z.object({
19486
+ var outputSchema33 = _zod.z.object({
19993
19487
  items: getItemMediaAncestorsResponse
19994
19488
  });
19995
19489
  var GetMediaAncestorsBatchTool = {
@@ -19998,7 +19492,7 @@ var GetMediaAncestorsBatchTool = {
19998
19492
  Returns one entry per requested Id, each containing that Id's chain of ancestors.
19999
19493
  Differs from get-media-ancestors which returns the tree-style ancestors of a single Id.`,
20000
19494
  inputSchema: getItemMediaAncestorsQueryParams.shape,
20001
- outputSchema: outputSchema30.shape,
19495
+ outputSchema: outputSchema33.shape,
20002
19496
  annotations: {
20003
19497
  readOnlyHint: true
20004
19498
  },
@@ -20420,6 +19914,37 @@ var GetRecycleBinMediaOriginalParentTool = {
20420
19914
  };
20421
19915
  var get_recycle_bin_media_original_parent_default = _mcpserversdk.withStandardDecorators.call(void 0, GetRecycleBinMediaOriginalParentTool);
20422
19916
 
19917
+ // src/umb-management-api/tools/media/get/get-media-type-schema.ts
19918
+
19919
+
19920
+
19921
+
19922
+
19923
+
19924
+ var outputSchema34 = _zod.z.object({
19925
+ schema: _zod.z.unknown()
19926
+ });
19927
+ var GetMediaTypeSchemaTool = {
19928
+ name: "get-media-type-schema",
19929
+ description: `Gets the JSON Schema for a media type by Id.
19930
+
19931
+ Returns a JSON Schema describing the structure for creating media of that type, including all property definitions and their value formats.
19932
+
19933
+ IMPORTANT: Use this tool BEFORE creating media to understand the expected property structure for a specific media type.`,
19934
+ inputSchema: getMediaTypeByIdSchemaParams.shape,
19935
+ outputSchema: outputSchema34.shape,
19936
+ annotations: {
19937
+ readOnlyHint: true
19938
+ },
19939
+ slices: ["read"],
19940
+ handler: async ({ id }) => {
19941
+ const client = UmbracoManagementClient3.getClient();
19942
+ const response = await client.getMediaTypeByIdSchema(id, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
19943
+ return _mcpserversdk.createToolResult.call(void 0, { schema: response.data });
19944
+ }
19945
+ };
19946
+ var get_media_type_schema_default = _mcpserversdk.withStandardDecorators.call(void 0, GetMediaTypeSchemaTool);
19947
+
20423
19948
  // src/umb-management-api/tools/media/index.ts
20424
19949
  var MediaCollection = {
20425
19950
  metadata: {
@@ -20439,8 +19964,9 @@ var MediaCollection = {
20439
19964
  tools.push(get_root_default6);
20440
19965
  }
20441
19966
  if (AuthorizationPolicies.SectionAccessMedia(user)) {
20442
- tools.push(create_media_default);
20443
- tools.push(create_media_multiple_default);
19967
+ const allowFilePath = isFilePathUploadAllowed();
19968
+ tools.push(createCreateMediaTool({ allowFilePath }));
19969
+ tools.push(createCreateMediaMultipleTool({ allowFilePath }));
20444
19970
  tools.push(create_media_folder_default);
20445
19971
  tools.push(delete_media_default);
20446
19972
  tools.push(update_media_default);
@@ -20466,6 +19992,9 @@ var MediaCollection = {
20466
19992
  tools.push(get_collection_media_default);
20467
19993
  tools.push(get_recycle_bin_media_referenced_by_default);
20468
19994
  tools.push(get_recycle_bin_media_original_parent_default);
19995
+ if (isUmbracoAtLeast(17, 4)) {
19996
+ tools.push(get_media_type_schema_default);
19997
+ }
20469
19998
  }
20470
19999
  return tools;
20471
20000
  }
@@ -20524,14 +20053,14 @@ var get_media_type_by_id_default = _mcpserversdk.withStandardDecorators.call(voi
20524
20053
  var inputSchema23 = _zod.z.object({
20525
20054
  ids: _zod.z.array(_zod.z.string())
20526
20055
  });
20527
- var outputSchema31 = _zod.z.object({
20056
+ var outputSchema35 = _zod.z.object({
20528
20057
  items: _zod.z.array(getMediaTypeByIdResponse)
20529
20058
  });
20530
20059
  var GetMediaTypeByIdsTool = {
20531
20060
  name: "get-media-type-by-ids",
20532
20061
  description: "Gets media types by ids",
20533
20062
  inputSchema: inputSchema23.shape,
20534
- outputSchema: outputSchema31.shape,
20063
+ outputSchema: outputSchema35.shape,
20535
20064
  annotations: { readOnlyHint: true },
20536
20065
  slices: ["list"],
20537
20066
  handler: (async ({ ids }) => {
@@ -20577,14 +20106,14 @@ var get_media_type_batch_default = _mcpserversdk.withStandardDecorators.call(voi
20577
20106
 
20578
20107
 
20579
20108
 
20580
- var outputSchema32 = _zod.z.object({
20109
+ var outputSchema36 = _zod.z.object({
20581
20110
  items: getItemMediaTypeResponse
20582
20111
  });
20583
20112
  var GetItemMediaTypeTool = {
20584
20113
  name: "get-item-media-type",
20585
20114
  description: "Gets media type items by their ids",
20586
20115
  inputSchema: getItemMediaTypeQueryParams.shape,
20587
- outputSchema: outputSchema32.shape,
20116
+ outputSchema: outputSchema36.shape,
20588
20117
  annotations: { readOnlyHint: true },
20589
20118
  slices: ["read"],
20590
20119
  handler: (async (params) => {
@@ -20696,14 +20225,14 @@ var get_media_type_allowed_parents_default = _mcpserversdk.withStandardDecorator
20696
20225
 
20697
20226
 
20698
20227
 
20699
- var outputSchema33 = _zod.z.object({
20228
+ var outputSchema37 = _zod.z.object({
20700
20229
  items: getMediaTypeByIdCompositionReferencesResponse
20701
20230
  });
20702
20231
  var GetMediaTypeCompositionReferencesTool = {
20703
20232
  name: "get-media-type-composition-references",
20704
20233
  description: "Gets the composition references for a media type",
20705
20234
  inputSchema: getMediaTypeByIdCompositionReferencesParams.shape,
20706
- outputSchema: outputSchema33.shape,
20235
+ outputSchema: outputSchema37.shape,
20707
20236
  annotations: { readOnlyHint: true },
20708
20237
  slices: ["read"],
20709
20238
  handler: (async ({ id }) => {
@@ -20784,14 +20313,14 @@ var get_siblings_default6 = _mcpserversdk.withStandardDecorators.call(void 0, Ge
20784
20313
 
20785
20314
 
20786
20315
 
20787
- var outputSchema34 = _zod.z.object({
20316
+ var outputSchema38 = _zod.z.object({
20788
20317
  items: getTreeMediaTypeAncestorsResponse
20789
20318
  });
20790
20319
  var GetMediaTypeAncestorsTool = {
20791
20320
  name: "get-media-type-ancestors",
20792
20321
  description: "Gets the ancestors of a media type",
20793
20322
  inputSchema: getTreeMediaTypeAncestorsQueryParams.shape,
20794
- outputSchema: outputSchema34.shape,
20323
+ outputSchema: outputSchema38.shape,
20795
20324
  annotations: { readOnlyHint: true },
20796
20325
  slices: ["tree"],
20797
20326
  handler: (async (params) => {
@@ -20809,7 +20338,7 @@ var get_ancestors_default7 = _mcpserversdk.withStandardDecorators.call(void 0, G
20809
20338
 
20810
20339
 
20811
20340
 
20812
- var outputSchema35 = _zod.z.object({
20341
+ var outputSchema39 = _zod.z.object({
20813
20342
  items: getItemMediaTypeAncestorsResponse
20814
20343
  });
20815
20344
  var GetMediaTypeAncestorsBatchTool = {
@@ -20818,7 +20347,7 @@ var GetMediaTypeAncestorsBatchTool = {
20818
20347
  Returns one entry per requested Id, each containing that Id's chain of ancestors.
20819
20348
  Differs from get-media-type-ancestors which returns the tree-style ancestors of a single Id.`,
20820
20349
  inputSchema: getItemMediaTypeAncestorsQueryParams.shape,
20821
- outputSchema: outputSchema35.shape,
20350
+ outputSchema: outputSchema39.shape,
20822
20351
  annotations: {
20823
20352
  readOnlyHint: true
20824
20353
  },
@@ -20897,7 +20426,7 @@ var CreateMediaTypeFolderTool = {
20897
20426
  validateStatus: () => true
20898
20427
  });
20899
20428
  if (response.status === 201) {
20900
- const locationHeader = _optionalChain([response, 'access', _38 => _38.headers, 'optionalAccess', _39 => _39["location"]]) || _optionalChain([response, 'access', _40 => _40.headers, 'optionalAccess', _41 => _41["Location"]]);
20429
+ const locationHeader = _optionalChain([response, 'access', _52 => _52.headers, 'optionalAccess', _53 => _53["location"]]) || _optionalChain([response, 'access', _54 => _54.headers, 'optionalAccess', _55 => _55["Location"]]);
20901
20430
  let createdId = model.id || "";
20902
20431
  if (locationHeader) {
20903
20432
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -21031,7 +20560,7 @@ var CreateMediaTypeTool = {
21031
20560
  validateStatus: () => true
21032
20561
  });
21033
20562
  if (response.status === 201) {
21034
- const locationHeader = _optionalChain([response, 'access', _42 => _42.headers, 'optionalAccess', _43 => _43["location"]]) || _optionalChain([response, 'access', _44 => _44.headers, 'optionalAccess', _45 => _45["Location"]]);
20563
+ const locationHeader = _optionalChain([response, 'access', _56 => _56.headers, 'optionalAccess', _57 => _57["location"]]) || _optionalChain([response, 'access', _58 => _58.headers, 'optionalAccess', _59 => _59["Location"]]);
21035
20564
  let createdId = model.id || "";
21036
20565
  if (locationHeader) {
21037
20566
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -21082,7 +20611,7 @@ var CopyMediaTypeTool = {
21082
20611
  validateStatus: () => true
21083
20612
  });
21084
20613
  if (response.status === 201) {
21085
- const locationHeader = _optionalChain([response, 'access', _46 => _46.headers, 'optionalAccess', _47 => _47["location"]]) || _optionalChain([response, 'access', _48 => _48.headers, 'optionalAccess', _49 => _49["Location"]]);
20614
+ const locationHeader = _optionalChain([response, 'access', _60 => _60.headers, 'optionalAccess', _61 => _61["location"]]) || _optionalChain([response, 'access', _62 => _62.headers, 'optionalAccess', _63 => _63["Location"]]);
21086
20615
  let createdId = "";
21087
20616
  if (locationHeader) {
21088
20617
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -21112,14 +20641,14 @@ var copy_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0,
21112
20641
 
21113
20642
 
21114
20643
 
21115
- var outputSchema36 = _zod.z.object({
20644
+ var outputSchema40 = _zod.z.object({
21116
20645
  items: postMediaTypeAvailableCompositionsResponse
21117
20646
  });
21118
20647
  var GetMediaTypeAvailableCompositionsTool = {
21119
20648
  name: "get-media-type-available-compositions",
21120
20649
  description: "Gets the available compositions for a media type",
21121
20650
  inputSchema: postMediaTypeAvailableCompositionsBody.shape,
21122
- outputSchema: outputSchema36.shape,
20651
+ outputSchema: outputSchema40.shape,
21123
20652
  annotations: { readOnlyHint: true },
21124
20653
  slices: ["configuration"],
21125
20654
  handler: (async (model) => {
@@ -21292,7 +20821,7 @@ var CreateMemberTool = {
21292
20821
  validateStatus: () => true
21293
20822
  });
21294
20823
  if (response.status === 201) {
21295
- const locationHeader = _optionalChain([response, 'access', _50 => _50.headers, 'optionalAccess', _51 => _51["location"]]) || _optionalChain([response, 'access', _52 => _52.headers, 'optionalAccess', _53 => _53["Location"]]);
20824
+ const locationHeader = _optionalChain([response, 'access', _64 => _64.headers, 'optionalAccess', _65 => _65["location"]]) || _optionalChain([response, 'access', _66 => _66.headers, 'optionalAccess', _67 => _67["Location"]]);
21296
20825
  let createdId = model.id || "";
21297
20826
  if (locationHeader) {
21298
20827
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -21519,6 +21048,37 @@ var GetItemMemberSearchTool = {
21519
21048
  };
21520
21049
  var get_item_member_search_default = _mcpserversdk.withStandardDecorators.call(void 0, GetItemMemberSearchTool);
21521
21050
 
21051
+ // src/umb-management-api/tools/member/get/get-member-type-schema.ts
21052
+
21053
+
21054
+
21055
+
21056
+
21057
+
21058
+ var outputSchema41 = _zod.z.object({
21059
+ schema: _zod.z.unknown()
21060
+ });
21061
+ var GetMemberTypeSchemaTool = {
21062
+ name: "get-member-type-schema",
21063
+ description: `Gets the JSON Schema for a member type by Id.
21064
+
21065
+ Returns a JSON Schema describing the structure for creating members of that type, including all property definitions and their value formats.
21066
+
21067
+ IMPORTANT: Use this tool BEFORE creating members to understand the expected property structure for a specific member type.`,
21068
+ inputSchema: getMemberTypeByIdSchemaParams.shape,
21069
+ outputSchema: outputSchema41.shape,
21070
+ annotations: {
21071
+ readOnlyHint: true
21072
+ },
21073
+ slices: ["read"],
21074
+ handler: async ({ id }) => {
21075
+ const client = UmbracoManagementClient3.getClient();
21076
+ const response = await client.getMemberTypeByIdSchema(id, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
21077
+ return _mcpserversdk.createToolResult.call(void 0, { schema: response.data });
21078
+ }
21079
+ };
21080
+ var get_member_type_schema_default = _mcpserversdk.withStandardDecorators.call(void 0, GetMemberTypeSchemaTool);
21081
+
21522
21082
  // src/umb-management-api/tools/member/get/get-member-ancestors-batch.ts
21523
21083
 
21524
21084
 
@@ -21526,7 +21086,7 @@ var get_item_member_search_default = _mcpserversdk.withStandardDecorators.call(v
21526
21086
 
21527
21087
 
21528
21088
 
21529
- var outputSchema37 = _zod.z.object({
21089
+ var outputSchema42 = _zod.z.object({
21530
21090
  items: getItemMemberAncestorsResponse
21531
21091
  });
21532
21092
  var GetMemberAncestorsBatchTool = {
@@ -21535,7 +21095,7 @@ var GetMemberAncestorsBatchTool = {
21535
21095
  Members are flat in Umbraco, so the ancestors array is typically empty;
21536
21096
  exposed for parity with the other entity ancestors-batch endpoints.`,
21537
21097
  inputSchema: getItemMemberAncestorsQueryParams.shape,
21538
- outputSchema: outputSchema37.shape,
21098
+ outputSchema: outputSchema42.shape,
21539
21099
  annotations: {
21540
21100
  readOnlyHint: true
21541
21101
  },
@@ -21568,6 +21128,9 @@ var MemberCollection = {
21568
21128
  tools.push(get_member_are_referenced_default);
21569
21129
  tools.push(get_member_by_id_referenced_by_default);
21570
21130
  tools.push(get_member_by_id_referenced_descendants_default);
21131
+ if (isUmbracoAtLeast(17, 4)) {
21132
+ tools.push(get_member_type_schema_default);
21133
+ }
21571
21134
  }
21572
21135
  tools.push(find_member_default);
21573
21136
  tools.push(get_item_member_search_default);
@@ -21606,14 +21169,14 @@ var get_member_group_default = _mcpserversdk.withStandardDecorators.call(void 0,
21606
21169
 
21607
21170
 
21608
21171
 
21609
- var outputSchema38 = _zod.z.object({
21172
+ var outputSchema43 = _zod.z.object({
21610
21173
  items: getItemMemberGroupResponse
21611
21174
  });
21612
21175
  var GetMemberGroupByIdArrayTool = {
21613
21176
  name: "get-member-group-by-id-array",
21614
21177
  description: "Gets member groups by an array of IDs",
21615
21178
  inputSchema: getItemMemberGroupQueryParams.shape,
21616
- outputSchema: outputSchema38.shape,
21179
+ outputSchema: outputSchema43.shape,
21617
21180
  annotations: {
21618
21181
  readOnlyHint: true
21619
21182
  },
@@ -21809,7 +21372,7 @@ var CreateMemberTypeTool = {
21809
21372
  validateStatus: () => true
21810
21373
  });
21811
21374
  if (response.status === 201) {
21812
- const locationHeader = _optionalChain([response, 'access', _54 => _54.headers, 'optionalAccess', _55 => _55["location"]]) || _optionalChain([response, 'access', _56 => _56.headers, 'optionalAccess', _57 => _57["Location"]]);
21375
+ const locationHeader = _optionalChain([response, 'access', _68 => _68.headers, 'optionalAccess', _69 => _69["location"]]) || _optionalChain([response, 'access', _70 => _70.headers, 'optionalAccess', _71 => _71["Location"]]);
21813
21376
  let createdId = model.id || "";
21814
21377
  if (locationHeader) {
21815
21378
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -21839,14 +21402,14 @@ var create_member_type_default = _mcpserversdk.withStandardDecorators.call(void
21839
21402
 
21840
21403
 
21841
21404
 
21842
- var outputSchema39 = _zod.z.object({
21405
+ var outputSchema44 = _zod.z.object({
21843
21406
  items: getItemMemberTypeResponse
21844
21407
  });
21845
21408
  var GetMemberTypesByIdArrayTool = {
21846
21409
  name: "get-member-types-by-id-array",
21847
21410
  description: "Gets member types by IDs (or empty array if no IDs are provided)",
21848
21411
  inputSchema: getItemMemberTypeQueryParams.shape,
21849
- outputSchema: outputSchema39.shape,
21412
+ outputSchema: outputSchema44.shape,
21850
21413
  annotations: { readOnlyHint: true },
21851
21414
  slices: ["list"],
21852
21415
  handler: (async (params) => {
@@ -21979,7 +21542,7 @@ var CopyMemberTypeTool = {
21979
21542
  validateStatus: () => true
21980
21543
  });
21981
21544
  if (response.status === 201) {
21982
- const locationHeader = _optionalChain([response, 'access', _58 => _58.headers, 'optionalAccess', _59 => _59["location"]]) || _optionalChain([response, 'access', _60 => _60.headers, 'optionalAccess', _61 => _61["Location"]]);
21545
+ const locationHeader = _optionalChain([response, 'access', _72 => _72.headers, 'optionalAccess', _73 => _73["location"]]) || _optionalChain([response, 'access', _74 => _74.headers, 'optionalAccess', _75 => _75["Location"]]);
21983
21546
  let createdId = "";
21984
21547
  if (locationHeader) {
21985
21548
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22009,14 +21572,14 @@ var copy_member_type_default = _mcpserversdk.withStandardDecorators.call(void 0,
22009
21572
 
22010
21573
 
22011
21574
 
22012
- var outputSchema40 = _zod.z.object({
21575
+ var outputSchema45 = _zod.z.object({
22013
21576
  items: postMemberTypeAvailableCompositionsResponse
22014
21577
  });
22015
21578
  var GetMemberTypeAvailableCompositionsTool = {
22016
21579
  name: "get-member-type-available-compositions",
22017
21580
  description: "Gets the available compositions for a member type",
22018
21581
  inputSchema: postMemberTypeAvailableCompositionsBody.shape,
22019
- outputSchema: outputSchema40.shape,
21582
+ outputSchema: outputSchema45.shape,
22020
21583
  annotations: { readOnlyHint: true },
22021
21584
  slices: ["configuration"],
22022
21585
  handler: (async (model) => {
@@ -22034,14 +21597,14 @@ var get_member_type_available_compositions_default = _mcpserversdk.withStandardD
22034
21597
 
22035
21598
 
22036
21599
 
22037
- var outputSchema41 = _zod.z.object({
21600
+ var outputSchema46 = _zod.z.object({
22038
21601
  items: getMemberTypeByIdCompositionReferencesResponse
22039
21602
  });
22040
21603
  var GetMemberTypeCompositionReferencesTool = {
22041
21604
  name: "get-member-type-composition-references",
22042
21605
  description: "Gets the composition references for a member type",
22043
21606
  inputSchema: getMemberTypeByIdCompositionReferencesParams.shape,
22044
- outputSchema: outputSchema41.shape,
21607
+ outputSchema: outputSchema46.shape,
22045
21608
  annotations: { readOnlyHint: true },
22046
21609
  slices: ["read"],
22047
21610
  handler: (async ({ id }) => {
@@ -22124,7 +21687,7 @@ var get_siblings_default7 = _mcpserversdk.withStandardDecorators.call(void 0, Ge
22124
21687
 
22125
21688
 
22126
21689
 
22127
- var outputSchema42 = _zod.z.object({
21690
+ var outputSchema47 = _zod.z.object({
22128
21691
  items: getItemMemberTypeAncestorsResponse
22129
21692
  });
22130
21693
  var GetMemberTypeAncestorsBatchTool = {
@@ -22132,7 +21695,7 @@ var GetMemberTypeAncestorsBatchTool = {
22132
21695
  description: `Gets the ancestor chain (breadcrumb) for multiple member type Ids in one call.
22133
21696
  Returns one entry per requested Id, each containing that Id's chain of ancestors.`,
22134
21697
  inputSchema: getItemMemberTypeAncestorsQueryParams.shape,
22135
- outputSchema: outputSchema42.shape,
21698
+ outputSchema: outputSchema47.shape,
22136
21699
  annotations: {
22137
21700
  readOnlyHint: true
22138
21701
  },
@@ -22339,7 +21902,7 @@ var CreatePartialViewTool = {
22339
21902
  validateStatus: () => true
22340
21903
  });
22341
21904
  if (response.status === 201) {
22342
- const locationHeader = _optionalChain([response, 'access', _62 => _62.headers, 'optionalAccess', _63 => _63["location"]]) || _optionalChain([response, 'access', _64 => _64.headers, 'optionalAccess', _65 => _65["Location"]]);
21905
+ const locationHeader = _optionalChain([response, 'access', _76 => _76.headers, 'optionalAccess', _77 => _77["location"]]) || _optionalChain([response, 'access', _78 => _78.headers, 'optionalAccess', _79 => _79["Location"]]);
22343
21906
  let createdPath = "";
22344
21907
  if (locationHeader) {
22345
21908
  const pathMatch = locationHeader.match(/partial-view\/(.+)$/);
@@ -22386,7 +21949,7 @@ var CreatePartialViewFolderTool = {
22386
21949
  validateStatus: () => true
22387
21950
  });
22388
21951
  if (response.status === 201) {
22389
- const locationHeader = _optionalChain([response, 'access', _66 => _66.headers, 'optionalAccess', _67 => _67["location"]]) || _optionalChain([response, 'access', _68 => _68.headers, 'optionalAccess', _69 => _69["Location"]]);
21952
+ const locationHeader = _optionalChain([response, 'access', _80 => _80.headers, 'optionalAccess', _81 => _81["location"]]) || _optionalChain([response, 'access', _82 => _82.headers, 'optionalAccess', _83 => _83["Location"]]);
22390
21953
  let createdPath = "";
22391
21954
  if (locationHeader) {
22392
21955
  const pathMatch = locationHeader.match(/partial-view\/folder\/(.+)$/);
@@ -22422,9 +21985,9 @@ var GetPartialViewByPathTool = {
22422
21985
  outputSchema: getPartialViewByPathResponse.shape,
22423
21986
  annotations: { readOnlyHint: true },
22424
21987
  slices: ["read"],
22425
- handler: (async ({ path: path4 }) => {
21988
+ handler: (async ({ path: path3 }) => {
22426
21989
  return _mcpserversdk.executeGetApiCall.call(void 0,
22427
- (client) => client.getPartialViewByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
21990
+ (client) => client.getPartialViewByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22428
21991
  );
22429
21992
  })
22430
21993
  };
@@ -22443,9 +22006,9 @@ var GetPartialViewFolderByPathTool = {
22443
22006
  outputSchema: getPartialViewFolderByPathResponse.shape,
22444
22007
  annotations: { readOnlyHint: true },
22445
22008
  slices: ["read", "folders"],
22446
- handler: (async ({ path: path4 }) => {
22009
+ handler: (async ({ path: path3 }) => {
22447
22010
  return _mcpserversdk.executeGetApiCall.call(void 0,
22448
- (client) => client.getPartialViewFolderByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22011
+ (client) => client.getPartialViewFolderByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22449
22012
  );
22450
22013
  })
22451
22014
  };
@@ -22520,9 +22083,9 @@ var DeletePartialViewTool = {
22520
22083
  destructiveHint: true
22521
22084
  },
22522
22085
  slices: ["delete"],
22523
- handler: (async ({ path: path4 }) => {
22086
+ handler: (async ({ path: path3 }) => {
22524
22087
  return _mcpserversdk.executeVoidApiCall.call(void 0,
22525
- (client) => client.deletePartialViewByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22088
+ (client) => client.deletePartialViewByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22526
22089
  );
22527
22090
  })
22528
22091
  };
@@ -22542,9 +22105,9 @@ var DeletePartialViewFolderTool = {
22542
22105
  destructiveHint: true
22543
22106
  },
22544
22107
  slices: ["delete", "folders"],
22545
- handler: (async ({ path: path4 }) => {
22108
+ handler: (async ({ path: path3 }) => {
22546
22109
  return _mcpserversdk.executeVoidApiCall.call(void 0,
22547
- (client) => client.deletePartialViewFolderByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22110
+ (client) => client.deletePartialViewFolderByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22548
22111
  );
22549
22112
  })
22550
22113
  };
@@ -22599,14 +22162,14 @@ var get_partial_view_snippet_by_id_default = _mcpserversdk.withStandardDecorator
22599
22162
 
22600
22163
 
22601
22164
 
22602
- var outputSchema43 = _zod.z.object({
22165
+ var outputSchema48 = _zod.z.object({
22603
22166
  items: getTreePartialViewAncestorsResponse
22604
22167
  });
22605
22168
  var GetPartialViewAncestorsTool = {
22606
22169
  name: "get-partial-view-ancestors",
22607
22170
  description: "Gets the ancestors of a partial view in the tree structure",
22608
22171
  inputSchema: getTreePartialViewAncestorsQueryParams.shape,
22609
- outputSchema: outputSchema43.shape,
22172
+ outputSchema: outputSchema48.shape,
22610
22173
  annotations: { readOnlyHint: true },
22611
22174
  slices: ["tree"],
22612
22175
  handler: (async (model) => {
@@ -22666,14 +22229,14 @@ var get_root_default10 = _mcpserversdk.withStandardDecorators.call(void 0, GetPa
22666
22229
 
22667
22230
 
22668
22231
 
22669
- var outputSchema44 = _zod.z.object({
22232
+ var outputSchema49 = _zod.z.object({
22670
22233
  items: getItemPartialViewResponse
22671
22234
  });
22672
22235
  var GetPartialViewSearchTool = {
22673
22236
  name: "get-partial-view-search",
22674
22237
  description: "Searches for partial views by name or path",
22675
22238
  inputSchema: getItemPartialViewQueryParams.shape,
22676
- outputSchema: outputSchema44.shape,
22239
+ outputSchema: outputSchema49.shape,
22677
22240
  annotations: { readOnlyHint: true },
22678
22241
  slices: ["search"],
22679
22242
  handler: (async (model) => {
@@ -22743,14 +22306,14 @@ var PartialViewCollection = {
22743
22306
 
22744
22307
 
22745
22308
 
22746
- var outputSchema45 = _zod.z.object({
22309
+ var outputSchema50 = _zod.z.object({
22747
22310
  isUsed: getPropertyTypeIsUsedResponse
22748
22311
  });
22749
22312
  var GetPropertyTypeIsUsedTool = {
22750
22313
  name: "get-property-type-is-used",
22751
22314
  description: "Checks if a property type is used within Umbraco",
22752
22315
  inputSchema: getPropertyTypeIsUsedQueryParams.shape,
22753
- outputSchema: outputSchema45.shape,
22316
+ outputSchema: outputSchema50.shape,
22754
22317
  annotations: { readOnlyHint: true },
22755
22318
  slices: ["read"],
22756
22319
  handler: (async ({ contentTypeId, propertyAlias }) => {
@@ -23030,9 +22593,9 @@ var GetScriptByPathTool = {
23030
22593
  outputSchema: getScriptByPathResponse.shape,
23031
22594
  annotations: { readOnlyHint: true },
23032
22595
  slices: ["read"],
23033
- handler: (async ({ path: path4 }) => {
22596
+ handler: (async ({ path: path3 }) => {
23034
22597
  return _mcpserversdk.executeGetApiCall.call(void 0,
23035
- (client) => client.getScriptByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22598
+ (client) => client.getScriptByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
23036
22599
  );
23037
22600
  })
23038
22601
  };
@@ -23051,9 +22614,9 @@ var GetScriptFolderByPathTool = {
23051
22614
  outputSchema: getScriptFolderByPathResponse.shape,
23052
22615
  annotations: { readOnlyHint: true },
23053
22616
  slices: ["read", "folders"],
23054
- handler: (async ({ path: path4 }) => {
22617
+ handler: (async ({ path: path3 }) => {
23055
22618
  return _mcpserversdk.executeGetApiCall.call(void 0,
23056
- (client) => client.getScriptFolderByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22619
+ (client) => client.getScriptFolderByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
23057
22620
  );
23058
22621
  })
23059
22622
  };
@@ -23066,14 +22629,14 @@ var get_script_folder_by_path_default = _mcpserversdk.withStandardDecorators.cal
23066
22629
 
23067
22630
 
23068
22631
 
23069
- var outputSchema46 = _zod.z.object({
22632
+ var outputSchema51 = _zod.z.object({
23070
22633
  items: getItemScriptResponse
23071
22634
  });
23072
22635
  var GetScriptItemsTool = {
23073
22636
  name: "get-script-items",
23074
22637
  description: "Gets script items",
23075
22638
  inputSchema: getItemScriptQueryParams.shape,
23076
- outputSchema: outputSchema46.shape,
22639
+ outputSchema: outputSchema51.shape,
23077
22640
  annotations: { readOnlyHint: true },
23078
22641
  slices: ["list"],
23079
22642
  handler: (async (model) => {
@@ -23091,14 +22654,14 @@ var get_script_items_default = _mcpserversdk.withStandardDecorators.call(void 0,
23091
22654
 
23092
22655
 
23093
22656
 
23094
- var outputSchema47 = _zod.z.object({
22657
+ var outputSchema52 = _zod.z.object({
23095
22658
  items: getTreeScriptAncestorsResponse
23096
22659
  });
23097
22660
  var GetScriptTreeAncestorsTool = {
23098
22661
  name: "get-script-tree-ancestors",
23099
22662
  description: "Gets script tree ancestors",
23100
22663
  inputSchema: getTreeScriptAncestorsQueryParams.shape,
23101
- outputSchema: outputSchema47.shape,
22664
+ outputSchema: outputSchema52.shape,
23102
22665
  annotations: { readOnlyHint: true },
23103
22666
  slices: ["tree"],
23104
22667
  handler: (async (model) => {
@@ -23208,7 +22771,7 @@ var CreateScriptTool = {
23208
22771
  validateStatus: () => true
23209
22772
  });
23210
22773
  if (response.status === 201) {
23211
- const locationHeader = _optionalChain([response, 'access', _70 => _70.headers, 'optionalAccess', _71 => _71["location"]]) || _optionalChain([response, 'access', _72 => _72.headers, 'optionalAccess', _73 => _73["Location"]]);
22774
+ const locationHeader = _optionalChain([response, 'access', _84 => _84.headers, 'optionalAccess', _85 => _85["location"]]) || _optionalChain([response, 'access', _86 => _86.headers, 'optionalAccess', _87 => _87["Location"]]);
23212
22775
  let createdPath = "";
23213
22776
  if (locationHeader) {
23214
22777
  const pathMatch = locationHeader.match(/script\/(.+)$/);
@@ -23255,7 +22818,7 @@ var CreateScriptFolderTool = {
23255
22818
  validateStatus: () => true
23256
22819
  });
23257
22820
  if (response.status === 201) {
23258
- const locationHeader = _optionalChain([response, 'access', _74 => _74.headers, 'optionalAccess', _75 => _75["location"]]) || _optionalChain([response, 'access', _76 => _76.headers, 'optionalAccess', _77 => _77["Location"]]);
22821
+ const locationHeader = _optionalChain([response, 'access', _88 => _88.headers, 'optionalAccess', _89 => _89["location"]]) || _optionalChain([response, 'access', _90 => _90.headers, 'optionalAccess', _91 => _91["Location"]]);
23259
22822
  let createdPath = "";
23260
22823
  if (locationHeader) {
23261
22824
  const pathMatch = locationHeader.match(/script\/folder\/(.+)$/);
@@ -23351,9 +22914,9 @@ var DeleteScriptTool = {
23351
22914
  destructiveHint: true
23352
22915
  },
23353
22916
  slices: ["delete"],
23354
- handler: (async ({ path: path4 }) => {
22917
+ handler: (async ({ path: path3 }) => {
23355
22918
  return _mcpserversdk.executeVoidApiCall.call(void 0,
23356
- (client) => client.deleteScriptByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22919
+ (client) => client.deleteScriptByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
23357
22920
  );
23358
22921
  })
23359
22922
  };
@@ -23373,9 +22936,9 @@ var DeleteScriptFolderTool = {
23373
22936
  destructiveHint: true
23374
22937
  },
23375
22938
  slices: ["delete", "folders"],
23376
- handler: (async ({ path: path4 }) => {
22939
+ handler: (async ({ path: path3 }) => {
23377
22940
  return _mcpserversdk.executeVoidApiCall.call(void 0,
23378
- (client) => client.deleteScriptFolderByPath(path4, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
22941
+ (client) => client.deleteScriptFolderByPath(path3, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
23379
22942
  );
23380
22943
  })
23381
22944
  };
@@ -23713,14 +23276,14 @@ var ServerCollection = {
23713
23276
 
23714
23277
 
23715
23278
 
23716
- var outputSchema48 = _zod.z.object({
23279
+ var outputSchema53 = _zod.z.object({
23717
23280
  items: getItemStaticFileResponse
23718
23281
  });
23719
23282
  var GetStaticFilesTool = {
23720
23283
  name: "get-static-files",
23721
23284
  description: "Lists static files with optional path filtering for browsing the file system",
23722
23285
  inputSchema: getItemStaticFileQueryParams.shape,
23723
- outputSchema: outputSchema48.shape,
23286
+ outputSchema: outputSchema53.shape,
23724
23287
  annotations: { readOnlyHint: true },
23725
23288
  slices: ["read"],
23726
23289
  handler: (async (params) => {
@@ -23780,14 +23343,14 @@ var get_children_default9 = _mcpserversdk.withStandardDecorators.call(void 0, Ge
23780
23343
 
23781
23344
 
23782
23345
 
23783
- var outputSchema49 = _zod.z.object({
23346
+ var outputSchema54 = _zod.z.object({
23784
23347
  items: getTreeStaticFileAncestorsResponse
23785
23348
  });
23786
23349
  var GetStaticFileAncestorsTool = {
23787
23350
  name: "get-static-file-ancestors",
23788
23351
  description: "Gets ancestor folders for navigation breadcrumbs by descendant path",
23789
23352
  inputSchema: getTreeStaticFileAncestorsQueryParams.shape,
23790
- outputSchema: outputSchema49.shape,
23353
+ outputSchema: outputSchema54.shape,
23791
23354
  annotations: { readOnlyHint: true },
23792
23355
  slices: ["tree"],
23793
23356
  handler: (async (params) => {
@@ -23852,7 +23415,7 @@ var CreateStylesheetTool = {
23852
23415
  validateStatus: () => true
23853
23416
  });
23854
23417
  if (response.status === 201) {
23855
- const locationHeader = _optionalChain([response, 'access', _78 => _78.headers, 'optionalAccess', _79 => _79["location"]]) || _optionalChain([response, 'access', _80 => _80.headers, 'optionalAccess', _81 => _81["Location"]]);
23418
+ const locationHeader = _optionalChain([response, 'access', _92 => _92.headers, 'optionalAccess', _93 => _93["location"]]) || _optionalChain([response, 'access', _94 => _94.headers, 'optionalAccess', _95 => _95["Location"]]);
23856
23419
  let createdPath = "";
23857
23420
  if (locationHeader) {
23858
23421
  const pathMatch = locationHeader.match(/stylesheet\/(.+)$/);
@@ -23899,7 +23462,7 @@ var CreateStylesheetFolderTool = {
23899
23462
  validateStatus: () => true
23900
23463
  });
23901
23464
  if (response.status === 201) {
23902
- const locationHeader = _optionalChain([response, 'access', _82 => _82.headers, 'optionalAccess', _83 => _83["location"]]) || _optionalChain([response, 'access', _84 => _84.headers, 'optionalAccess', _85 => _85["Location"]]);
23465
+ const locationHeader = _optionalChain([response, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97["location"]]) || _optionalChain([response, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99["Location"]]);
23903
23466
  let createdPath = "";
23904
23467
  if (locationHeader) {
23905
23468
  const pathMatch = locationHeader.match(/stylesheet\/folder\/(.+)$/);
@@ -23983,9 +23546,9 @@ var UpdateStylesheetTool = {
23983
23546
  annotations: { idempotentHint: true },
23984
23547
  slices: ["update"],
23985
23548
  handler: (async (model) => {
23986
- const { path: path4, ...updateModel } = model;
23549
+ const { path: path3, ...updateModel } = model;
23987
23550
  return _mcpserversdk.executeVoidApiCall.call(void 0,
23988
- (client) => client.putStylesheetByPath(path4, updateModel, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
23551
+ (client) => client.putStylesheetByPath(path3, updateModel, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
23989
23552
  );
23990
23553
  })
23991
23554
  };
@@ -24009,8 +23572,8 @@ var RenameStylesheetTool = {
24009
23572
  annotations: { idempotentHint: true },
24010
23573
  slices: ["rename"],
24011
23574
  handler: (async (model) => {
24012
- const { path: path4, ...renameModel } = model;
24013
- const normalizedPath = encodeURIComponent(path4);
23575
+ const { path: path3, ...renameModel } = model;
23576
+ const normalizedPath = encodeURIComponent(path3);
24014
23577
  return _mcpserversdk.executeVoidApiCall.call(void 0,
24015
23578
  (client) => client.putStylesheetByPathRename(normalizedPath, renameModel, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
24016
23579
  );
@@ -24069,14 +23632,14 @@ var delete_stylesheet_folder_default = _mcpserversdk.withStandardDecorators.call
24069
23632
 
24070
23633
 
24071
23634
 
24072
- var outputSchema50 = _zod.z.object({
23635
+ var outputSchema55 = _zod.z.object({
24073
23636
  items: getTreeStylesheetAncestorsResponse
24074
23637
  });
24075
23638
  var GetStylesheetAncestorsTool = {
24076
23639
  name: "get-stylesheet-ancestors",
24077
23640
  description: "Gets the ancestors of a stylesheet in the tree structure",
24078
23641
  inputSchema: getTreeStylesheetAncestorsQueryParams.shape,
24079
- outputSchema: outputSchema50.shape,
23642
+ outputSchema: outputSchema55.shape,
24080
23643
  annotations: { readOnlyHint: true },
24081
23644
  slices: ["tree"],
24082
23645
  handler: (async (model) => {
@@ -24136,14 +23699,14 @@ var get_root_default12 = _mcpserversdk.withStandardDecorators.call(void 0, GetSt
24136
23699
 
24137
23700
 
24138
23701
 
24139
- var outputSchema51 = _zod.z.object({
23702
+ var outputSchema56 = _zod.z.object({
24140
23703
  items: getItemStylesheetResponse
24141
23704
  });
24142
23705
  var GetStylesheetSearchTool = {
24143
23706
  name: "get-stylesheet-search",
24144
23707
  description: "Searches for stylesheets by name or path",
24145
23708
  inputSchema: getItemStylesheetQueryParams.shape,
24146
- outputSchema: outputSchema51.shape,
23709
+ outputSchema: outputSchema56.shape,
24147
23710
  annotations: { readOnlyHint: true },
24148
23711
  slices: ["search"],
24149
23712
  handler: (async (model) => {
@@ -24263,7 +23826,7 @@ var CreateTemplateTool = {
24263
23826
  validateStatus: () => true
24264
23827
  });
24265
23828
  if (response.status === 201) {
24266
- const locationHeader = _optionalChain([response, 'access', _86 => _86.headers, 'optionalAccess', _87 => _87["location"]]) || _optionalChain([response, 'access', _88 => _88.headers, 'optionalAccess', _89 => _89["Location"]]);
23829
+ const locationHeader = _optionalChain([response, 'access', _100 => _100.headers, 'optionalAccess', _101 => _101["location"]]) || _optionalChain([response, 'access', _102 => _102.headers, 'optionalAccess', _103 => _103["Location"]]);
24267
23830
  let createdId = "";
24268
23831
  if (locationHeader) {
24269
23832
  const idMatch = locationHeader.match(/template\/([a-f0-9-]+)$/i);
@@ -24335,14 +23898,14 @@ var get_template_configuration_default = _mcpserversdk.withStandardDecorators.ca
24335
23898
 
24336
23899
 
24337
23900
 
24338
- var outputSchema52 = _zod.z.object({
23901
+ var outputSchema57 = _zod.z.object({
24339
23902
  items: getItemTemplateResponse
24340
23903
  });
24341
23904
  var GetTemplatesByIdArrayTool = {
24342
23905
  name: "get-templates-by-id-array",
24343
23906
  description: "Gets templates by IDs (or empty array if no IDs are provided)",
24344
23907
  inputSchema: getItemTemplateQueryParams.shape,
24345
- outputSchema: outputSchema52.shape,
23908
+ outputSchema: outputSchema57.shape,
24346
23909
  annotations: { readOnlyHint: true },
24347
23910
  slices: ["list"],
24348
23911
  handler: (async (params) => {
@@ -24458,14 +24021,14 @@ var get_template_query_settings_default = _mcpserversdk.withStandardDecorators.c
24458
24021
 
24459
24022
 
24460
24023
 
24461
- var outputSchema53 = _zod.z.object({
24024
+ var outputSchema58 = _zod.z.object({
24462
24025
  items: getTreeTemplateAncestorsResponse
24463
24026
  });
24464
24027
  var GetTemplateAncestorsTool = {
24465
24028
  name: "get-template-ancestors",
24466
24029
  description: "Gets the ancestors of a template by Id",
24467
24030
  inputSchema: getTreeTemplateAncestorsQueryParams.shape,
24468
- outputSchema: outputSchema53.shape,
24031
+ outputSchema: outputSchema58.shape,
24469
24032
  annotations: { readOnlyHint: true },
24470
24033
  slices: ["tree"],
24471
24034
  handler: (async (params) => {
@@ -24483,7 +24046,7 @@ var get_ancestors_default11 = _mcpserversdk.withStandardDecorators.call(void 0,
24483
24046
 
24484
24047
 
24485
24048
 
24486
- var outputSchema54 = _zod.z.object({
24049
+ var outputSchema59 = _zod.z.object({
24487
24050
  items: getItemTemplateAncestorsResponse
24488
24051
  });
24489
24052
  var GetTemplateAncestorsBatchTool = {
@@ -24492,7 +24055,7 @@ var GetTemplateAncestorsBatchTool = {
24492
24055
  Returns one entry per requested Id, each containing that Id's chain of ancestors.
24493
24056
  Differs from get-template-ancestors which returns the tree-style ancestors of a single Id.`,
24494
24057
  inputSchema: getItemTemplateAncestorsQueryParams.shape,
24495
- outputSchema: outputSchema54.shape,
24058
+ outputSchema: outputSchema59.shape,
24496
24059
  annotations: {
24497
24060
  readOnlyHint: true
24498
24061
  },
@@ -24627,9 +24190,6 @@ var TemplateCollection = {
24627
24190
 
24628
24191
 
24629
24192
 
24630
-
24631
-
24632
-
24633
24193
  var createTemporaryFileSchema = _zod.z.object({
24634
24194
  id: _zod.z.string().uuid().describe("Unique identifier for the temporary file"),
24635
24195
  fileName: _zod.z.string().describe("Name of the file"),
@@ -24652,7 +24212,6 @@ var CreateTemporaryFileTool = {
24652
24212
  outputSchema: createTemporaryFileOutputSchema.shape,
24653
24213
  slices: ["create"],
24654
24214
  handler: (async (model) => {
24655
- let tempFilePath = null;
24656
24215
  try {
24657
24216
  const fileContent = Buffer.from(model.fileAsBase64, "base64");
24658
24217
  let fileName = model.fileName;
@@ -24660,13 +24219,11 @@ var CreateTemporaryFileTool = {
24660
24219
  const extension = _mcpserversdk.detectFileExtensionFromBuffer.call(void 0, fileContent);
24661
24220
  fileName = `${fileName}${extension}`;
24662
24221
  }
24663
- tempFilePath = path3.join(os2.tmpdir(), `umbraco-upload-${model.id}-${fileName}`);
24664
- fs3.writeFileSync(tempFilePath, fileContent);
24665
- const readStream = fs3.createReadStream(tempFilePath);
24666
24222
  const client = UmbracoManagementClient3.getClient();
24667
24223
  await client.postTemporaryFile({
24668
24224
  Id: model.id,
24669
- File: readStream
24225
+ File: fileContent,
24226
+ FileName: fileName
24670
24227
  });
24671
24228
  return _mcpserversdk.createToolResult.call(void 0, {
24672
24229
  message: "Temporary file created successfully",
@@ -24676,14 +24233,6 @@ var CreateTemporaryFileTool = {
24676
24233
  return _mcpserversdk.createToolResultError.call(void 0, {
24677
24234
  detail: `Error creating temporary file: ${error.message}`
24678
24235
  });
24679
- } finally {
24680
- if (tempFilePath && fs3.existsSync(tempFilePath)) {
24681
- try {
24682
- fs3.unlinkSync(tempFilePath);
24683
- } catch (e) {
24684
- console.error("Failed to cleanup temp file:", e);
24685
- }
24686
- }
24687
24236
  }
24688
24237
  })
24689
24238
  };
@@ -24694,14 +24243,15 @@ var create_temporary_file_default = _mcpserversdk.withStandardDecorators.call(vo
24694
24243
 
24695
24244
  var postTemporaryFileBody = _zod.z.object({
24696
24245
  Id: _zod.z.string().uuid(),
24697
- File: _zod.z.instanceof(_fs.ReadStream)
24246
+ File: _zod.z.union([_zod.z.instanceof(Buffer), _zod.z.instanceof(_fs.ReadStream)]),
24247
+ FileName: _zod.z.string().min(1)
24698
24248
  });
24699
24249
  var getTemporaryFileByIdParams = _zod.z.object({
24700
24250
  id: _zod.z.string().uuid()
24701
24251
  });
24702
24252
  var getTemporaryFileByIdResponse = _zod.z.object({
24703
24253
  id: _zod.z.string().guid(),
24704
- availableUntil: _zod.z.string().datetime({ local: true }).nullish(),
24254
+ availableUntil: _zod.z.string().datetime({ local: true, offset: true }).nullish(),
24705
24255
  fileName: _zod.z.string().min(1)
24706
24256
  });
24707
24257
  var deleteTemporaryFileByIdParams = _zod.z.object({
@@ -24872,14 +24422,14 @@ var find_user_default = _mcpserversdk.withStandardDecorators.call(void 0, FindUs
24872
24422
 
24873
24423
 
24874
24424
 
24875
- var outputSchema55 = _zod.z.object({
24425
+ var outputSchema60 = _zod.z.object({
24876
24426
  items: getItemUserResponse
24877
24427
  });
24878
24428
  var GetItemUserTool = {
24879
24429
  name: "get-item-user",
24880
24430
  description: "Gets user items for selection lists and pickers",
24881
24431
  inputSchema: getItemUserQueryParams.shape,
24882
- outputSchema: outputSchema55.shape,
24432
+ outputSchema: outputSchema60.shape,
24883
24433
  annotations: { readOnlyHint: true },
24884
24434
  slices: ["read"],
24885
24435
  handler: (async (params) => {
@@ -24960,14 +24510,14 @@ var get_user_current_configuration_default = _mcpserversdk.withStandardDecorator
24960
24510
 
24961
24511
 
24962
24512
 
24963
- var outputSchema56 = _zod.z.object({
24513
+ var outputSchema61 = _zod.z.object({
24964
24514
  items: getUserCurrentLoginProvidersResponse
24965
24515
  });
24966
24516
  var GetUserCurrentLoginProvidersTool = {
24967
24517
  name: "get-user-current-login-providers",
24968
24518
  description: "Gets the current user's available login providers",
24969
24519
  inputSchema: {},
24970
- outputSchema: outputSchema56.shape,
24520
+ outputSchema: outputSchema61.shape,
24971
24521
  annotations: { readOnlyHint: true },
24972
24522
  slices: ["current-user"],
24973
24523
  handler: (async () => {
@@ -25006,14 +24556,14 @@ var get_user_current_permissions_default = _mcpserversdk.withStandardDecorators.
25006
24556
 
25007
24557
 
25008
24558
 
25009
- var outputSchema57 = _zod.z.object({
24559
+ var outputSchema62 = _zod.z.object({
25010
24560
  items: getUserCurrentPermissionsDocumentResponse
25011
24561
  });
25012
24562
  var GetUserCurrentPermissionsDocumentTool = {
25013
24563
  name: "get-user-current-permissions-document",
25014
24564
  description: "Gets the current user's document permissions for specific documents",
25015
24565
  inputSchema: getUserCurrentPermissionsDocumentQueryParams.shape,
25016
- outputSchema: outputSchema57.shape,
24566
+ outputSchema: outputSchema62.shape,
25017
24567
  annotations: { readOnlyHint: true },
25018
24568
  slices: ["permissions"],
25019
24569
  handler: (async (params) => {
@@ -25186,7 +24736,7 @@ var CreateUserDataTool = {
25186
24736
  validateStatus: () => true
25187
24737
  });
25188
24738
  if (response.status === 201) {
25189
- const locationHeader = _optionalChain([response, 'access', _90 => _90.headers, 'optionalAccess', _91 => _91["location"]]) || _optionalChain([response, 'access', _92 => _92.headers, 'optionalAccess', _93 => _93["Location"]]);
24739
+ const locationHeader = _optionalChain([response, 'access', _104 => _104.headers, 'optionalAccess', _105 => _105["location"]]) || _optionalChain([response, 'access', _106 => _106.headers, 'optionalAccess', _107 => _107["Location"]]);
25190
24740
  let createdId = "";
25191
24741
  if (locationHeader) {
25192
24742
  const idMatch = locationHeader.match(/user-data\/([a-f0-9-]+)$/i);
@@ -25340,14 +24890,14 @@ var get_user_group_default = _mcpserversdk.withStandardDecorators.call(void 0, G
25340
24890
 
25341
24891
 
25342
24892
 
25343
- var outputSchema58 = _zod.z.object({
24893
+ var outputSchema63 = _zod.z.object({
25344
24894
  items: getItemUserGroupResponse
25345
24895
  });
25346
24896
  var GetUserGroupByIdArrayTool = {
25347
24897
  name: "get-user-group-by-id-array",
25348
24898
  description: "Gets user groups by an array of IDs",
25349
24899
  inputSchema: getItemUserGroupQueryParams.shape,
25350
- outputSchema: outputSchema58.shape,
24900
+ outputSchema: outputSchema63.shape,
25351
24901
  annotations: { readOnlyHint: true },
25352
24902
  slices: ["list"],
25353
24903
  handler: (async (params) => {
@@ -25424,7 +24974,7 @@ var CreateUserGroupTool = {
25424
24974
  validateStatus: () => true
25425
24975
  });
25426
24976
  if (response.status === 201) {
25427
- const locationHeader = _optionalChain([response, 'access', _94 => _94.headers, 'optionalAccess', _95 => _95["location"]]) || _optionalChain([response, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97["Location"]]);
24977
+ const locationHeader = _optionalChain([response, 'access', _108 => _108.headers, 'optionalAccess', _109 => _109["location"]]) || _optionalChain([response, 'access', _110 => _110.headers, 'optionalAccess', _111 => _111["Location"]]);
25428
24978
  let createdId = "";
25429
24979
  if (locationHeader) {
25430
24980
  const idMatch = locationHeader.match(/user-group\/([a-f0-9-]+)$/i);
@@ -25568,14 +25118,14 @@ var get_webhook_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0
25568
25118
 
25569
25119
 
25570
25120
 
25571
- var outputSchema59 = _zod.z.object({
25121
+ var outputSchema64 = _zod.z.object({
25572
25122
  items: getItemWebhookResponse
25573
25123
  });
25574
25124
  var GetWebhookItemTool = {
25575
25125
  name: "get-webhook-item",
25576
25126
  description: "Gets webhooks by IDs (or empty array if no IDs are provided)",
25577
25127
  inputSchema: getItemWebhookQueryParams.shape,
25578
- outputSchema: outputSchema59.shape,
25128
+ outputSchema: outputSchema64.shape,
25579
25129
  annotations: { readOnlyHint: true },
25580
25130
  slices: ["list"],
25581
25131
  handler: (async (params) => {
@@ -25722,7 +25272,7 @@ var CreateWebhookTool = {
25722
25272
  validateStatus: () => true
25723
25273
  });
25724
25274
  if (response.status === 201) {
25725
- const locationHeader = _optionalChain([response, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99["location"]]) || _optionalChain([response, 'access', _100 => _100.headers, 'optionalAccess', _101 => _101["Location"]]);
25275
+ const locationHeader = _optionalChain([response, 'access', _112 => _112.headers, 'optionalAccess', _113 => _113["location"]]) || _optionalChain([response, 'access', _114 => _114.headers, 'optionalAccess', _115 => _115["Location"]]);
25726
25276
  let createdId = "";
25727
25277
  if (locationHeader) {
25728
25278
  const idMatch = locationHeader.match(/webhook\/([a-f0-9-]+)$/i);
@@ -25955,5 +25505,7 @@ var allSliceNames = [...toolSliceNames, "other"];
25955
25505
 
25956
25506
 
25957
25507
 
25958
- exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.UmbracoManagementClient = UmbracoManagementClient3; exports.availableCollections = availableCollections; exports.allModes = allModes; exports.allModeNames = allModeNames; exports.allSliceNames = allSliceNames;
25959
- //# sourceMappingURL=chunk-6IL4IQKW.cjs.map
25508
+
25509
+
25510
+ exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.UmbracoManagementClient = UmbracoManagementClient3; exports.setAllowFilePathUploads = setAllowFilePathUploads; exports.setUmbracoVersion = setUmbracoVersion; exports.availableCollections = availableCollections; exports.allModes = allModes; exports.allModeNames = allModeNames; exports.allSliceNames = allSliceNames;
25511
+ //# sourceMappingURL=chunk-H5ZIS43M.cjs.map