@umbraco-cms/mcp-dev 18.1.9 → 18.1.11

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(); } } 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(); } } 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;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -5137,35 +5137,16 @@ var getTemporaryFileAPI = () => ({
5137
5137
  const formData = new FormData();
5138
5138
  formData.append("Id", postTemporaryFileBody2.Id);
5139
5139
  const file = postTemporaryFileBody2.File;
5140
- console.log("[temp-file] incoming file:", {
5141
- typeofFile: typeof file,
5142
- isBuffer: Buffer.isBuffer(file),
5143
- ctorName: _optionalChain([file, 'optionalAccess', _ => _.constructor, 'optionalAccess', _2 => _2.name]),
5144
- hasByteLength: typeof _optionalChain([file, 'optionalAccess', _3 => _3.byteLength]),
5145
- hasLength: typeof _optionalChain([file, 'optionalAccess', _4 => _4.length]),
5146
- keys: file ? Object.keys(file).slice(0, 10) : []
5147
- });
5148
5140
  const buffer = Buffer.isBuffer(file) ? file : await readStreamToBuffer(file);
5149
- console.log("[temp-file] buffer:", { length: buffer.byteLength });
5150
5141
  const bytes = new Uint8Array(buffer.byteLength);
5151
5142
  bytes.set(buffer);
5152
5143
  const blob = new Blob([bytes]);
5153
- console.log("[temp-file] blob:", { size: blob.size, type: blob.type, fileName: postTemporaryFileBody2.FileName });
5154
5144
  formData.append("File", blob, postTemporaryFileBody2.FileName);
5155
- const entries = [];
5156
- for (const [k, v] of formData.entries()) {
5157
- entries.push({
5158
- name: k,
5159
- valueKind: typeof v === "string" ? "string" : _nullishCoalesce(_optionalChain([v, 'optionalAccess', _5 => _5.constructor, 'optionalAccess', _6 => _6.name]), () => ( typeof v)),
5160
- valueSize: typeof v === "string" ? v.length : _nullishCoalesce(_optionalChain([v, 'optionalAccess', _7 => _7.size]), () => ( void 0))
5161
- });
5162
- }
5163
- console.log("[temp-file] formData entries:", entries);
5164
5145
  return _mcpserversdk.UmbracoManagementClient.call(void 0,
5165
5146
  {
5166
5147
  url: `/umbraco/management/api/v1/temporary-file`,
5167
5148
  method: "POST",
5168
- headers: _optionalChain([options, 'optionalAccess', _8 => _8.headers]),
5149
+ headers: _optionalChain([options, 'optionalAccess', _ => _.headers]),
5169
5150
  data: formData
5170
5151
  },
5171
5152
  options
@@ -14330,6 +14311,8 @@ var get_data_type_configuration_default = _mcpserversdk.withStandardDecorators.c
14330
14311
 
14331
14312
 
14332
14313
 
14314
+
14315
+
14333
14316
  var dataTypeSchemaOutputSchema = _zod.z.object({
14334
14317
  valueTypeName: _zod.z.string().nullish(),
14335
14318
  jsonSchema: _zod.z.unknown().nullish()
@@ -14354,6 +14337,13 @@ IMPORTANT: Use this tool BEFORE creating data types to understand the expected c
14354
14337
  id,
14355
14338
  _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
14356
14339
  );
14340
+ if (typeof response.status !== "number") {
14341
+ console.warn(
14342
+ "[get-data-type-schema] API response had no numeric status; treating as success. Did the generated client's CAPTURE_RAW_HTTP_RESPONSE wiring change?"
14343
+ );
14344
+ } else if (response.status < 200 || response.status >= 300) {
14345
+ throw new (0, _mcpserversdk.UmbracoApiError)(_mcpserversdk.toProblemDetails.call(void 0, response));
14346
+ }
14357
14347
  return _mcpserversdk.createToolResult.call(void 0, _nullishCoalesce(response.data, () => ( {})));
14358
14348
  }
14359
14349
  };
@@ -14449,7 +14439,7 @@ var CopyDataTypeTool = {
14449
14439
  validateStatus: () => true
14450
14440
  });
14451
14441
  if (response.status === 201) {
14452
- const location = _optionalChain([response, 'access', _9 => _9.headers, 'optionalAccess', _10 => _10.location]) || "";
14442
+ const location = _optionalChain([response, 'access', _2 => _2.headers, 'optionalAccess', _3 => _3.location]) || "";
14453
14443
  const newId = location.split("/").pop() || "";
14454
14444
  const output = {
14455
14445
  message: "Data type copied successfully",
@@ -14523,6 +14513,11 @@ var move_data_type_default = _mcpserversdk.withStandardDecorators.call(void 0, M
14523
14513
 
14524
14514
 
14525
14515
 
14516
+
14517
+ var inputSchema = _zod.z.object({
14518
+ ...getDataTypeByIdReferencedByParams.shape,
14519
+ ...getDataTypeByIdReferencedByQueryParams.shape
14520
+ });
14526
14521
  var GetReferencesDataTypeTool = {
14527
14522
  name: "get-references-data-type",
14528
14523
  description: `Gets the document types and properties that use a specific data type.
@@ -14536,16 +14531,20 @@ var GetReferencesDataTypeTool = {
14536
14531
 
14537
14532
  Returns a detailed list with content type information (id, type, name, icon) and all properties
14538
14533
  (name, alias) that use the specified data type.
14534
+
14535
+ Results are paginated (20 per page by default). Check the returned "total" against the number of
14536
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
14537
+ to page through the remaining references so the list is complete before acting on it.
14539
14538
  `,
14540
- inputSchema: getDataTypeByIdReferencedByParams.shape,
14539
+ inputSchema: inputSchema.shape,
14541
14540
  outputSchema: getDataTypeByIdReferencedByResponse.shape,
14542
14541
  annotations: {
14543
14542
  readOnlyHint: true
14544
14543
  },
14545
14544
  slices: ["references"],
14546
- handler: (async ({ id }) => {
14545
+ handler: (async ({ id, skip, take }) => {
14547
14546
  return _mcpserversdk.executeGetApiCall.call(void 0,
14548
- (client) => client.getDataTypeByIdReferencedBy(id, void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14547
+ (client) => client.getDataTypeByIdReferencedBy(id, { skip, take }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
14549
14548
  );
14550
14549
  })
14551
14550
  };
@@ -15090,7 +15089,7 @@ var CreateDictionaryItemTool = {
15090
15089
  validateStatus: () => true
15091
15090
  });
15092
15091
  if (response.status === 201) {
15093
- const locationHeader = _optionalChain([response, 'access', _11 => _11.headers, 'optionalAccess', _12 => _12["location"]]) || _optionalChain([response, 'access', _13 => _13.headers, 'optionalAccess', _14 => _14["Location"]]);
15092
+ const locationHeader = _optionalChain([response, 'access', _4 => _4.headers, 'optionalAccess', _5 => _5["location"]]) || _optionalChain([response, 'access', _6 => _6.headers, 'optionalAccess', _7 => _7["Location"]]);
15094
15093
  let createdId = model.id || "";
15095
15094
  if (locationHeader) {
15096
15095
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -15888,7 +15887,7 @@ var get_document_notifications_default = _mcpserversdk.withStandardDecorators.ca
15888
15887
 
15889
15888
 
15890
15889
 
15891
- var inputSchema = _zod.z.object({
15890
+ var inputSchema2 = _zod.z.object({
15892
15891
  ...getDocumentByIdPublicAccessParams.shape,
15893
15892
  ...getDocumentByIdPublicAccessQueryParams.shape
15894
15893
  });
@@ -15897,7 +15896,7 @@ var GetDocumentPublicAccessTool = {
15897
15896
  description: `Gets the public access settings for a document by Id.
15898
15897
  Set includeAncestors=true to also resolve protection inherited from an ancestor
15899
15898
  (the response's isProtectedByAncestor field reflects this).`,
15900
- inputSchema: inputSchema.shape,
15899
+ inputSchema: inputSchema2.shape,
15901
15900
  outputSchema: getDocumentByIdPublicAccessResponse.shape,
15902
15901
  annotations: {
15903
15902
  readOnlyHint: true
@@ -15918,14 +15917,14 @@ var get_document_public_access_default = _mcpserversdk.withStandardDecorators.ca
15918
15917
 
15919
15918
 
15920
15919
 
15921
- var inputSchema2 = {
15920
+ var inputSchema3 = {
15922
15921
  id: getDocumentByIdAuditLogParams.shape.id,
15923
15922
  ...getDocumentByIdAuditLogQueryParams.shape
15924
15923
  };
15925
15924
  var GetDocumentAuditLogTool = {
15926
15925
  name: "get-document-audit-log",
15927
15926
  description: "Fetches the audit log for a document by Id.",
15928
- inputSchema: inputSchema2,
15927
+ inputSchema: inputSchema3,
15929
15928
  outputSchema: getDocumentByIdAuditLogResponse.shape,
15930
15929
  annotations: {
15931
15930
  readOnlyHint: true
@@ -15965,6 +15964,32 @@ var GetDocumentPublishTool = {
15965
15964
  };
15966
15965
  var get_document_publish_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentPublishTool);
15967
15966
 
15967
+ // src/umbraco-api/tools/document/get/get-document-publish-with-descendants-result.ts
15968
+
15969
+
15970
+
15971
+
15972
+
15973
+ var GetDocumentPublishWithDescendantsResultTool = {
15974
+ name: "get-document-publish-with-descendants-result",
15975
+ description: `Gets the status/result of an in-progress or previously-polled publish-with-descendants operation by Id and taskId.
15976
+ Use this to follow up after publish-document-with-descendants reports the publish is still running, or returned an error.
15977
+ Returns isComplete: true once the publish has finished. If some descendants failed to publish, this returns an error result carrying the failed branch items.`,
15978
+ inputSchema: getDocumentByIdPublishWithDescendantsResultByTaskIdParams.shape,
15979
+ outputSchema: getDocumentByIdPublishWithDescendantsResultByTaskIdResponse.shape,
15980
+ annotations: {
15981
+ readOnlyHint: true
15982
+ },
15983
+ slices: ["publish"],
15984
+ enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
15985
+ handler: (async ({ id, taskId }) => {
15986
+ return _mcpserversdk.executeGetApiCall.call(void 0,
15987
+ (client) => client.getDocumentByIdPublishWithDescendantsResultByTaskId(id, taskId, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
15988
+ );
15989
+ })
15990
+ };
15991
+ var get_document_publish_with_descendants_result_default = _mcpserversdk.withStandardDecorators.call(void 0, GetDocumentPublishWithDescendantsResultTool);
15992
+
15968
15993
  // src/umbraco-api/tools/document/get/get-document-configuration.ts
15969
15994
 
15970
15995
 
@@ -16022,6 +16047,8 @@ var get_document_urls_default = _mcpserversdk.withStandardDecorators.call(void 0
16022
16047
 
16023
16048
 
16024
16049
 
16050
+
16051
+
16025
16052
  var documentTypeSchemaOutputSchema = _zod.z.object({
16026
16053
  schema: _zod.z.unknown()
16027
16054
  });
@@ -16045,6 +16072,13 @@ IMPORTANT: Use this tool BEFORE creating documents to understand the expected pr
16045
16072
  id,
16046
16073
  _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
16047
16074
  );
16075
+ if (typeof response.status !== "number") {
16076
+ console.warn(
16077
+ "[get-document-type-schema] API response had no numeric status; treating as success. Did the generated client's CAPTURE_RAW_HTTP_RESPONSE wiring change?"
16078
+ );
16079
+ } else if (response.status < 200 || response.status >= 300) {
16080
+ throw new (0, _mcpserversdk.UmbracoApiError)(_mcpserversdk.toProblemDetails.call(void 0, response));
16081
+ }
16048
16082
  return _mcpserversdk.createToolResult.call(void 0, { schema: response.data });
16049
16083
  }
16050
16084
  };
@@ -16080,7 +16114,7 @@ var search_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
16080
16114
 
16081
16115
 
16082
16116
 
16083
- var inputSchema3 = _zod.z.object({
16117
+ var inputSchema4 = _zod.z.object({
16084
16118
  ...getCollectionDocumentByIdParams.shape,
16085
16119
  ...getCollectionDocumentByIdQueryParams.shape
16086
16120
  });
@@ -16088,7 +16122,7 @@ var GetCollectionDocumentByIdTool = {
16088
16122
  name: "get-collection-document-by-id",
16089
16123
  description: `Get a collection of document items
16090
16124
  Use this to retrieve a filtered and paginated collection of document items based on various criteria like data type, ordering, and filtering.`,
16091
- inputSchema: inputSchema3.shape,
16125
+ inputSchema: inputSchema4.shape,
16092
16126
  outputSchema: getCollectionDocumentByIdResponse.shape,
16093
16127
  annotations: {
16094
16128
  readOnlyHint: true
@@ -16167,7 +16201,7 @@ var get_document_are_referenced_default = _mcpserversdk.withStandardDecorators.c
16167
16201
 
16168
16202
 
16169
16203
 
16170
- var inputSchema4 = _zod.z.object({
16204
+ var inputSchema5 = _zod.z.object({
16171
16205
  ...getDocumentByIdReferencedByParams.shape,
16172
16206
  ...getDocumentByIdReferencedByQueryParams.shape
16173
16207
  });
@@ -16175,7 +16209,7 @@ var GetDocumentByIdReferencedByTool = {
16175
16209
  name: "get-document-by-id-referenced-by",
16176
16210
  description: `Get items that reference a specific document item
16177
16211
  Use this to find all content, documents, or other items that are currently referencing a specific document item.`,
16178
- inputSchema: inputSchema4.shape,
16212
+ inputSchema: inputSchema5.shape,
16179
16213
  outputSchema: getDocumentByIdReferencedByResponse.shape,
16180
16214
  annotations: {
16181
16215
  readOnlyHint: true
@@ -16196,7 +16230,7 @@ var get_document_by_id_referenced_by_default = _mcpserversdk.withStandardDecorat
16196
16230
 
16197
16231
 
16198
16232
 
16199
- var inputSchema5 = _zod.z.object({
16233
+ var inputSchema6 = _zod.z.object({
16200
16234
  ...getDocumentByIdReferencedDescendantsParams.shape,
16201
16235
  ...getDocumentByIdReferencedDescendantsQueryParams.shape
16202
16236
  });
@@ -16209,7 +16243,7 @@ var GetDocumentByIdReferencedDescendantsTool = {
16209
16243
  \u2022 Impact analysis: Before deleting a document folder, see what content would be affected
16210
16244
  \u2022 Dependency tracking: Find all content using documents from a specific folder hierarchy
16211
16245
  \u2022 Content auditing: Identify which descendant document items are actually being used`,
16212
- inputSchema: inputSchema5.shape,
16246
+ inputSchema: inputSchema6.shape,
16213
16247
  outputSchema: getDocumentByIdReferencedDescendantsResponse.shape,
16214
16248
  annotations: {
16215
16249
  readOnlyHint: true
@@ -16230,7 +16264,7 @@ var get_document_by_id_referenced_descendants_default = _mcpserversdk.withStanda
16230
16264
 
16231
16265
 
16232
16266
 
16233
- var inputSchema6 = _zod.z.object({
16267
+ var inputSchema7 = _zod.z.object({
16234
16268
  ...getDocumentByIdAvailableSegmentOptionsParams.shape,
16235
16269
  ...getDocumentByIdAvailableSegmentOptionsQueryParams.shape
16236
16270
  });
@@ -16244,7 +16278,7 @@ var GetDocumentAvailableSegmentOptionsTool = {
16244
16278
  \u2022 Understanding what content variations are available for a document
16245
16279
  \u2022 Determining which segments can be used when creating or editing document content
16246
16280
  \u2022 Viewing segment names, aliases, and associated cultures`,
16247
- inputSchema: inputSchema6.shape,
16281
+ inputSchema: inputSchema7.shape,
16248
16282
  outputSchema: getDocumentByIdAvailableSegmentOptionsResponse.shape,
16249
16283
  annotations: {
16250
16284
  readOnlyHint: true
@@ -16313,14 +16347,14 @@ var get_recycle_bin_document_referenced_by_default = _mcpserversdk.withStandardD
16313
16347
 
16314
16348
 
16315
16349
 
16316
- var inputSchema7 = {
16350
+ var inputSchema8 = {
16317
16351
  id: postDocumentByIdPublicAccessParams.shape.id,
16318
16352
  data: _zod.z.object(postDocumentByIdPublicAccessBody.shape)
16319
16353
  };
16320
16354
  var PostDocumentPublicAccessTool = {
16321
16355
  name: "post-document-public-access",
16322
16356
  description: "Adds public access settings to a document by Id.",
16323
- inputSchema: inputSchema7,
16357
+ inputSchema: inputSchema8,
16324
16358
  slices: ["public-access"],
16325
16359
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.PublicAccess),
16326
16360
  handler: (async (model) => {
@@ -16401,7 +16435,7 @@ var CopyDocumentTool = {
16401
16435
  validateStatus: () => true
16402
16436
  });
16403
16437
  if (response.status === 201) {
16404
- const location = _optionalChain([response, 'access', _15 => _15.headers, 'optionalAccess', _16 => _16.location]) || "";
16438
+ const location = _optionalChain([response, 'access', _8 => _8.headers, 'optionalAccess', _9 => _9.location]) || "";
16405
16439
  const newId = location.split("/").pop() || "";
16406
16440
  const output = { id: newId };
16407
16441
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -16545,7 +16579,7 @@ var CreateDocumentTool = {
16545
16579
  template = { id: model.templateId };
16546
16580
  } else {
16547
16581
  const docType = await client.getDocumentTypeById(model.documentTypeId);
16548
- template = _optionalChain([docType, 'access', _17 => _17.defaultTemplate, 'optionalAccess', _18 => _18.id]) ? { id: docType.defaultTemplate.id } : null;
16582
+ template = _optionalChain([docType, 'access', _10 => _10.defaultTemplate, 'optionalAccess', _11 => _11.id]) ? { id: docType.defaultTemplate.id } : null;
16549
16583
  }
16550
16584
  const payload = {
16551
16585
  id: documentId,
@@ -16723,7 +16757,7 @@ var CreateAndPublishDocumentTool = {
16723
16757
  template = { id: model.templateId };
16724
16758
  } else {
16725
16759
  const docType = await client.getDocumentTypeById(model.documentTypeId);
16726
- template = _optionalChain([docType, 'access', _19 => _19.defaultTemplate, 'optionalAccess', _20 => _20.id]) ? { id: docType.defaultTemplate.id } : null;
16760
+ template = _optionalChain([docType, 'access', _12 => _12.defaultTemplate, 'optionalAccess', _13 => _13.id]) ? { id: docType.defaultTemplate.id } : null;
16727
16761
  }
16728
16762
  const payload = {
16729
16763
  id: documentId,
@@ -16761,14 +16795,14 @@ var create_and_publish_document_default = _mcpserversdk.withStandardDecorators.c
16761
16795
 
16762
16796
 
16763
16797
 
16764
- var inputSchema8 = {
16798
+ var inputSchema9 = {
16765
16799
  id: putDocumentByIdPublicAccessParams.shape.id,
16766
16800
  data: _zod.z.object(putDocumentByIdPublicAccessBody.shape)
16767
16801
  };
16768
16802
  var PutDocumentPublicAccessTool = {
16769
16803
  name: "put-document-public-access",
16770
16804
  description: "Updates public access settings for a document by Id.",
16771
- inputSchema: inputSchema8,
16805
+ inputSchema: inputSchema9,
16772
16806
  annotations: {
16773
16807
  idempotentHint: true
16774
16808
  },
@@ -16789,7 +16823,7 @@ var put_document_public_access_default = _mcpserversdk.withStandardDecorators.ca
16789
16823
 
16790
16824
 
16791
16825
 
16792
- var inputSchema9 = {
16826
+ var inputSchema10 = {
16793
16827
  id: putDocumentByIdDomainsParams.shape.id,
16794
16828
  data: _zod.z.object(putDocumentByIdDomainsBody.shape)
16795
16829
  };
@@ -16797,7 +16831,7 @@ var PutDocumentDomainsTool = {
16797
16831
  name: "put-document-domains",
16798
16832
  description: `Updates the domains assigned to a document by Id. Default value of the defaultIsoCode is null.
16799
16833
  Domain isoCode in the domains array should be in the format of 'en-US' amd be a valid domain name from the Umbraco instance.`,
16800
- inputSchema: inputSchema9,
16834
+ inputSchema: inputSchema10,
16801
16835
  annotations: {
16802
16836
  idempotentHint: true
16803
16837
  },
@@ -16818,14 +16852,14 @@ var put_document_domains_default = _mcpserversdk.withStandardDecorators.call(voi
16818
16852
 
16819
16853
 
16820
16854
 
16821
- var inputSchema10 = {
16855
+ var inputSchema11 = {
16822
16856
  id: putDocumentByIdNotificationsParams.shape.id,
16823
16857
  data: _zod.z.object(putDocumentByIdNotificationsBody.shape)
16824
16858
  };
16825
16859
  var PutDocumentNotificationsTool = {
16826
16860
  name: "put-document-notifications",
16827
16861
  description: "Updates the notifications for a document by Id.",
16828
- inputSchema: inputSchema10,
16862
+ inputSchema: inputSchema11,
16829
16863
  annotations: {
16830
16864
  idempotentHint: true
16831
16865
  },
@@ -16843,16 +16877,25 @@ var put_document_notifications_default = _mcpserversdk.withStandardDecorators.ca
16843
16877
 
16844
16878
 
16845
16879
 
16846
- var inputSchema11 = {
16880
+
16881
+
16882
+
16883
+ var inputSchema12 = {
16847
16884
  id: _zod.z.string().uuid(),
16848
16885
  data: _zod.z.object(putDocumentByIdPublishWithDescendantsBody.shape)
16849
16886
  };
16850
16887
  var PublishDocumentWithDescendantsTool = {
16851
16888
  name: "publish-document-with-descendants",
16852
16889
  description: `Publishes a document and its descendants by Id. This is an asynchronous operation that may take time for large document trees.
16853
- The tool will poll for completion and return the final result when finished.`,
16854
- inputSchema: inputSchema11,
16855
- annotations: {},
16890
+ The tool polls for completion for up to 60 seconds. If the publish is still running or ambiguous when that limit is reached, follow up with get-document-publish-with-descendants-result using the returned taskId.`,
16891
+ inputSchema: inputSchema12,
16892
+ annotations: {
16893
+ // Unlike the other document put/ tools, this one starts a new async,
16894
+ // recursive publish task on every call rather than converging to the
16895
+ // same end state — a retried call fires a second concurrent job over
16896
+ // the same subtree, so it is not safe to advertise as idempotent.
16897
+ idempotentHint: false
16898
+ },
16856
16899
  slices: ["publish"],
16857
16900
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
16858
16901
  handler: (async (model) => {
@@ -16877,12 +16920,25 @@ var PublishDocumentWithDescendantsTool = {
16877
16920
  while (attempts < maxAttempts) {
16878
16921
  attempts++;
16879
16922
  await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
16923
+ let statusResponse;
16880
16924
  try {
16881
- const statusResponse = await client.getDocumentByIdPublishWithDescendantsResultByTaskId(
16925
+ statusResponse = await client.getDocumentByIdPublishWithDescendantsResultByTaskId(
16882
16926
  model.id,
16883
- initialResponse.taskId
16927
+ initialResponse.taskId,
16928
+ _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
16884
16929
  );
16885
- if (statusResponse.isComplete) {
16930
+ } catch (error) {
16931
+ return _mcpserversdk.createToolResultError.call(void 0, {
16932
+ type: "Error",
16933
+ title: "Failed to poll publish-with-descendants status",
16934
+ detail: error instanceof Error ? error.message : String(error),
16935
+ status: 500,
16936
+ taskId: initialResponse.taskId
16937
+ });
16938
+ }
16939
+ if (statusResponse.status >= 200 && statusResponse.status < 300) {
16940
+ const data = statusResponse.data;
16941
+ if (_optionalChain([data, 'optionalAccess', _14 => _14.isComplete])) {
16886
16942
  return {
16887
16943
  content: [
16888
16944
  {
@@ -16892,29 +16948,22 @@ var PublishDocumentWithDescendantsTool = {
16892
16948
  ]
16893
16949
  };
16894
16950
  }
16895
- } catch (error) {
16896
- return {
16897
- content: [
16898
- {
16899
- type: "text",
16900
- text: JSON.stringify({
16901
- status: "error",
16902
- taskId: initialResponse.taskId,
16903
- message: `Failed to poll status: ${error}. You can manually check status using taskId.`
16904
- })
16905
- }
16906
- ]
16907
- };
16951
+ continue;
16908
16952
  }
16953
+ return _mcpserversdk.createToolResultError.call(void 0, {
16954
+ ..._mcpserversdk.toProblemDetails.call(void 0, statusResponse),
16955
+ documentId: model.id,
16956
+ taskId: initialResponse.taskId
16957
+ });
16909
16958
  }
16910
16959
  return {
16911
16960
  content: [
16912
16961
  {
16913
16962
  type: "text",
16914
16963
  text: JSON.stringify({
16915
- status: "timeout",
16964
+ status: "in-progress",
16916
16965
  taskId: initialResponse.taskId,
16917
- message: "Publish operation timed out after 1 minute. The operation may still be running. Use the taskId to check status manually."
16966
+ message: `Publishing is still in progress after 60 seconds. Use get-document-publish-with-descendants-result with id "${model.id}" and taskId "${initialResponse.taskId}" to check whether it has finished.`
16918
16967
  })
16919
16968
  }
16920
16969
  ]
@@ -16930,15 +16979,17 @@ var publish_document_with_descendants_default = _mcpserversdk.withStandardDecora
16930
16979
 
16931
16980
 
16932
16981
 
16933
- var inputSchema12 = {
16982
+ var inputSchema13 = {
16934
16983
  id: _zod.z.string().uuid(),
16935
16984
  data: _zod.z.object(putDocumentByIdUnpublishBody.shape)
16936
16985
  };
16937
16986
  var UnpublishDocumentTool = {
16938
16987
  name: "unpublish-document",
16939
16988
  description: "Unpublishes a document by Id.",
16940
- inputSchema: inputSchema12,
16941
- annotations: {},
16989
+ inputSchema: inputSchema13,
16990
+ annotations: {
16991
+ idempotentHint: true
16992
+ },
16942
16993
  slices: ["publish"],
16943
16994
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Unpublish),
16944
16995
  handler: (async (model) => {
@@ -16960,7 +17011,9 @@ var SortDocumentTool = {
16960
17011
  name: "sort-document",
16961
17012
  description: "Sorts the order of documents under a parent.",
16962
17013
  inputSchema: putDocumentSortBody.shape,
16963
- annotations: {},
17014
+ annotations: {
17015
+ idempotentHint: true
17016
+ },
16964
17017
  slices: ["sort"],
16965
17018
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
16966
17019
  handler: (async (model) => {
@@ -16978,7 +17031,7 @@ var sort_document_default = _mcpserversdk.withStandardDecorators.call(void 0, So
16978
17031
 
16979
17032
 
16980
17033
 
16981
- var inputSchema13 = {
17034
+ var inputSchema14 = {
16982
17035
  id: putDocumentByIdSortChildrenParams.shape.id,
16983
17036
  data: _zod.z.object(putDocumentByIdSortChildrenBody.shape)
16984
17037
  };
@@ -16989,8 +17042,10 @@ var SortDocumentChildrenTool = {
16989
17042
  This is DIFFERENT from sort-document: sort-document reorders children according to an explicit list of ids and sort orders you provide, whereas sort-document-children sorts every child of {id} automatically by the chosen field and direction - no explicit ordering is required.
16990
17043
 
16991
17044
  When sorting by Name, an optional culture selects which variant name to sort by; the culture is not validated, so children that do not vary by it (or an unrecognised culture) fall back to the invariant name.`,
16992
- inputSchema: inputSchema13,
16993
- annotations: {},
17045
+ inputSchema: inputSchema14,
17046
+ annotations: {
17047
+ idempotentHint: true
17048
+ },
16994
17049
  slices: ["sort"],
16995
17050
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
16996
17051
  handler: (async (model) => {
@@ -17015,7 +17070,9 @@ var SortDocumentRootChildrenTool = {
17015
17070
 
17016
17071
  When sorting by Name, an optional culture selects which variant name to sort by; the culture is not validated, so documents that do not vary by it (or an unrecognised culture) fall back to the invariant name.`,
17017
17072
  inputSchema: putDocumentRootSortChildrenBody.shape,
17018
- annotations: {},
17073
+ annotations: {
17074
+ idempotentHint: true
17075
+ },
17019
17076
  slices: ["sort"],
17020
17077
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
17021
17078
  handler: (async (model) => {
@@ -17033,15 +17090,17 @@ var sort_document_root_children_default = _mcpserversdk.withStandardDecorators.c
17033
17090
 
17034
17091
 
17035
17092
 
17036
- var inputSchema14 = {
17093
+ var inputSchema15 = {
17037
17094
  id: _zod.z.string().uuid(),
17038
17095
  data: _zod.z.object(putDocumentByIdMoveBody.shape)
17039
17096
  };
17040
17097
  var MoveDocumentTool = {
17041
17098
  name: "move-document",
17042
17099
  description: "Move a document to a new location",
17043
- inputSchema: inputSchema14,
17044
- annotations: {},
17100
+ inputSchema: inputSchema15,
17101
+ annotations: {
17102
+ idempotentHint: true
17103
+ },
17045
17104
  slices: ["move"],
17046
17105
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Move),
17047
17106
  handler: (async (model) => {
@@ -17059,7 +17118,7 @@ var move_document_default = _mcpserversdk.withStandardDecorators.call(void 0, Mo
17059
17118
 
17060
17119
 
17061
17120
 
17062
- var inputSchema15 = {
17121
+ var inputSchema16 = {
17063
17122
  id: _zod.z.string().uuid(),
17064
17123
  data: _zod.z.object(putDocumentByIdPublishBody.shape)
17065
17124
  };
@@ -17069,8 +17128,10 @@ var PublishDocumentTool = {
17069
17128
  This function bypasses approval workflows and publishes directly to the live site.
17070
17129
  When the culture is not provided, the default culture is null.
17071
17130
  When the schedule is not provided, the default schedule is null.`,
17072
- inputSchema: inputSchema15,
17073
- annotations: {},
17131
+ inputSchema: inputSchema16,
17132
+ annotations: {
17133
+ idempotentHint: true
17134
+ },
17074
17135
  slices: ["publish"],
17075
17136
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
17076
17137
  handler: (async (model) => {
@@ -17117,7 +17178,9 @@ var RestoreFromRecycleBinTool = {
17117
17178
  name: "restore-document-from-recycle-bin",
17118
17179
  description: "Restores a document from the recycle bin.",
17119
17180
  inputSchema: putRecycleBinDocumentByIdRestoreParams.shape,
17120
- annotations: {},
17181
+ annotations: {
17182
+ idempotentHint: true
17183
+ },
17121
17184
  slices: ["move", "recycle-bin"],
17122
17185
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Delete),
17123
17186
  handler: (async ({ id }) => {
@@ -17138,7 +17201,9 @@ var MoveDocumentToRecycleBinTool = {
17138
17201
  name: "move-document-to-recycle-bin",
17139
17202
  description: "Move a document to the recycle bin",
17140
17203
  inputSchema: putDocumentByIdMoveToRecycleBinParams.shape,
17141
- annotations: {},
17204
+ annotations: {
17205
+ idempotentHint: true
17206
+ },
17142
17207
  slices: ["move", "recycle-bin"],
17143
17208
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Delete),
17144
17209
  handler: (async ({ id }) => {
@@ -17157,7 +17222,7 @@ var move_to_recycle_bin_default = _mcpserversdk.withStandardDecorators.call(void
17157
17222
 
17158
17223
 
17159
17224
 
17160
- var inputSchema16 = {
17225
+ var inputSchema17 = {
17161
17226
  id: putDocumentByIdParams.shape.id,
17162
17227
  data: _zod.z.object(putDocumentByIdBody.shape),
17163
17228
  confirmClearValues: _zod.z.boolean().optional().describe(
@@ -17184,21 +17249,21 @@ var UpdateDocumentTool = {
17184
17249
  Always include the full, unmodified "values" array from the document you just read unless you
17185
17250
  intend to clear every property. If the document currently has values, an empty "values" array is
17186
17251
  rejected unless "confirmClearValues" is set to true.`,
17187
- inputSchema: inputSchema16,
17252
+ inputSchema: inputSchema17,
17188
17253
  annotations: {
17189
17254
  idempotentHint: true
17190
17255
  },
17191
17256
  slices: ["update"],
17192
17257
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Update),
17193
17258
  handler: (async (model) => {
17194
- const incomingValues = _optionalChain([model, 'access', _21 => _21.data, 'optionalAccess', _22 => _22.values]);
17259
+ const incomingValues = _optionalChain([model, 'access', _15 => _15.data, 'optionalAccess', _16 => _16.values]);
17195
17260
  if (Array.isArray(incomingValues) && incomingValues.length === 0 && !model.confirmClearValues) {
17196
17261
  const client = UmbracoManagementClient3.getClient();
17197
17262
  let currentDocument;
17198
17263
  try {
17199
17264
  currentDocument = await client.getDocumentById(model.id);
17200
17265
  } catch (error) {
17201
- const status = _optionalChain([error, 'optionalAccess', _23 => _23.response, 'optionalAccess', _24 => _24.status]);
17266
+ const status = _optionalChain([error, 'optionalAccess', _17 => _17.response, 'optionalAccess', _18 => _18.status]);
17202
17267
  if (status !== 404) {
17203
17268
  throw error;
17204
17269
  }
@@ -17224,7 +17289,7 @@ var update_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
17224
17289
 
17225
17290
 
17226
17291
 
17227
- var inputSchema17 = {
17292
+ var inputSchema18 = {
17228
17293
  id: putDocumentByIdUpdateAndPublishParams.shape.id,
17229
17294
  data: _zod.z.object(putDocumentByIdUpdateAndPublishBody.shape)
17230
17295
  };
@@ -17245,7 +17310,7 @@ var UpdateAndPublishDocumentTool = {
17245
17310
  - Always read the current document value first
17246
17311
  - Only update the required values
17247
17312
  - Don't miss any properties from the original document`,
17248
- inputSchema: inputSchema17,
17313
+ inputSchema: inputSchema18,
17249
17314
  annotations: {
17250
17315
  idempotentHint: true
17251
17316
  },
@@ -17267,20 +17332,25 @@ async function getAllDocumentTypeProperties(documentTypeId) {
17267
17332
  const client = UmbracoManagementClient3.getClient();
17268
17333
  const visitedIds = /* @__PURE__ */ new Set();
17269
17334
  const properties = [];
17270
- async function resolveDocumentType(docTypeId) {
17335
+ const rootDocType = await client.getDocumentTypeById(documentTypeId);
17336
+ const rootVariesByCulture = rootDocType.variesByCulture;
17337
+ const rootVariesBySegment = rootDocType.variesBySegment;
17338
+ async function resolveDocumentType(docTypeId, preloaded) {
17271
17339
  if (visitedIds.has(docTypeId)) {
17272
17340
  return;
17273
17341
  }
17274
17342
  visitedIds.add(docTypeId);
17275
- const docType = await client.getDocumentTypeById(docTypeId);
17343
+ const docType = await _asyncNullishCoalesce(preloaded, async () => ( await client.getDocumentTypeById(docTypeId)));
17276
17344
  for (const prop of docType.properties) {
17277
17345
  if (!properties.some((p) => p.alias === prop.alias)) {
17278
17346
  properties.push({
17279
17347
  alias: prop.alias,
17280
17348
  name: prop.name,
17281
17349
  dataTypeId: prop.dataType.id,
17282
- variesByCulture: prop.variesByCulture,
17283
- variesBySegment: prop.variesBySegment
17350
+ // AND with the root document type's own flag: a composition's property can't
17351
+ // vary more than the document type it's actually used on.
17352
+ variesByCulture: prop.variesByCulture && rootVariesByCulture,
17353
+ variesBySegment: prop.variesBySegment && rootVariesBySegment
17284
17354
  });
17285
17355
  }
17286
17356
  }
@@ -17288,7 +17358,7 @@ async function getAllDocumentTypeProperties(documentTypeId) {
17288
17358
  await resolveDocumentType(composition.documentType.id);
17289
17359
  }
17290
17360
  }
17291
- await resolveDocumentType(documentTypeId);
17361
+ await resolveDocumentType(documentTypeId, rootDocType);
17292
17362
  return properties;
17293
17363
  }
17294
17364
  function validateCultureSegment(prop, def) {
@@ -18163,14 +18233,14 @@ function removeRteBlockElement(markup, contentKey) {
18163
18233
  return markup.slice(0, start) + markup.slice(end);
18164
18234
  }
18165
18235
  function getBlockTypeConfigurations(dataTypeValues) {
18166
- const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _25 => _25.find, 'call', _26 => _26((v) => v.alias === "blocks"), 'optionalAccess', _27 => _27.value]);
18236
+ const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _19 => _19.find, 'call', _20 => _20((v) => v.alias === "blocks"), 'optionalAccess', _21 => _21.value]);
18167
18237
  return Array.isArray(blocks) ? blocks : [];
18168
18238
  }
18169
18239
  function findBlockTypeConfiguration(configs, contentElementTypeKey) {
18170
18240
  return configs.find((c) => c.contentElementTypeKey === contentElementTypeKey);
18171
18241
  }
18172
18242
  function findAreaConfiguration(configs, parentContentTypeKey, areaKey) {
18173
- return _optionalChain([findBlockTypeConfiguration, 'call', _28 => _28(configs, parentContentTypeKey), 'optionalAccess', _29 => _29.areas, 'optionalAccess', _30 => _30.find, 'call', _31 => _31((a) => a.key === areaKey)]);
18243
+ return _optionalChain([findBlockTypeConfiguration, 'call', _22 => _22(configs, parentContentTypeKey), 'optionalAccess', _23 => _23.areas, 'optionalAccess', _24 => _24.find, 'call', _25 => _25((a) => a.key === areaKey)]);
18174
18244
  }
18175
18245
  function checkAllowedInArea(blockConfig, area) {
18176
18246
  if (blockConfig.allowInAreas === false) {
@@ -18280,7 +18350,10 @@ async function saveDocumentValues(documentId, document) {
18280
18350
 
18281
18351
 
18282
18352
 
18283
- var createDocumentBlockOutputSchema = updateBlockPropertyOutputSchema;
18353
+ var blockEditorKindSchema = _zod.z.enum(["BlockList", "BlockGrid", "RichText"]);
18354
+ var createDocumentBlockOutputSchema = updateBlockPropertyOutputSchema.extend({
18355
+ kind: blockEditorKindSchema
18356
+ });
18284
18357
  var blockPropertyValueSchema = _zod.z.object({
18285
18358
  alias: _zod.z.string().min(1).describe("The property alias on the block's element type"),
18286
18359
  value: _zod.z.any().nullish().describe("The property value"),
@@ -18312,9 +18385,10 @@ var createDocumentBlockSchema = {
18312
18385
  properties: _zod.z.array(blockPropertyValueSchema).optional().describe("Content property values for the new block"),
18313
18386
  settings: _zod.z.object({
18314
18387
  properties: _zod.z.array(blockPropertyValueSchema).describe("Settings property values")
18315
- }).optional().describe("Settings for the new block; the settings element type comes from the data type configuration"),
18388
+ }).optional().describe("Settings for the new block; the settings element type comes from the data type configuration. When the block type has a settings element type, a settings entry is always created (empty if this is omitted), as the backoffice does"),
18316
18389
  placement: placementSchema.optional().describe("Where to place the block relative to siblings (default: append)"),
18317
- grid: gridSchema.optional().describe("BlockGrid-only layout options. Rejected for BlockList/RichText properties")
18390
+ grid: gridSchema.optional().describe("BlockGrid-only layout options. Rejected for BlockList/RichText properties"),
18391
+ expectedKind: blockEditorKindSchema.optional().describe("Optional guard: the editor the property must use. If the property uses a different editor, nothing is written and the call is rejected")
18318
18392
  };
18319
18393
  async function validateBlockProperties(elementTypeKey, properties, label) {
18320
18394
  if (properties.length === 0) {
@@ -18349,7 +18423,9 @@ var CreateDocumentBlockTool = {
18349
18423
  or the named area given in grid.
18350
18424
  - grid (BlockGrid only): columnSpan (default 12), rowSpan (default 1), and areaKey + parentContentKey
18351
18425
  to insert into a named area of an existing block.
18352
- - New block keys are generated; the result returns the new contentKey.
18426
+ - expectedKind (optional): "BlockList" | "BlockGrid" | "RichText". When given, the call is rejected
18427
+ without writing anything if the property uses a different editor.
18428
+ - New block keys are generated; the result returns the new contentKey and the property's editor kind.
18353
18429
  - The document is saved, not published.
18354
18430
 
18355
18431
  Example: { documentId: "...", propertyAlias: "mainContent", contentTypeKey: "...",
@@ -18367,15 +18443,21 @@ var CreateDocumentBlockTool = {
18367
18443
  const { kind, container, blockConfigs } = ctx;
18368
18444
  const placement = _nullishCoalesce(model.placement, () => ( { position: "append" }));
18369
18445
  const contentProperties = _nullishCoalesce(model.properties, () => ( []));
18370
- const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _32 => _32.settings, 'optionalAccess', _33 => _33.properties]), () => ( []));
18446
+ const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _26 => _26.settings, 'optionalAccess', _27 => _27.properties]), () => ( []));
18447
+ if (model.expectedKind && kind !== model.expectedKind) {
18448
+ throw new (0, _mcpserversdk.ToolValidationError)({
18449
+ title: "Unexpected block editor",
18450
+ detail: `Property '${model.propertyAlias}' is a ${kind} property, not ${model.expectedKind}`
18451
+ });
18452
+ }
18371
18453
  if (model.grid && kind !== "BlockGrid") {
18372
18454
  throw new (0, _mcpserversdk.ToolValidationError)({
18373
18455
  title: "grid options not supported",
18374
18456
  detail: `'grid' only applies to BlockGrid properties; '${model.propertyAlias}' is a ${kind} property`
18375
18457
  });
18376
18458
  }
18377
- const areaKey = _optionalChain([model, 'access', _34 => _34.grid, 'optionalAccess', _35 => _35.areaKey]);
18378
- const parentContentKey = _optionalChain([model, 'access', _36 => _36.grid, 'optionalAccess', _37 => _37.parentContentKey]);
18459
+ const areaKey = _optionalChain([model, 'access', _28 => _28.grid, 'optionalAccess', _29 => _29.areaKey]);
18460
+ const parentContentKey = _optionalChain([model, 'access', _30 => _30.grid, 'optionalAccess', _31 => _31.parentContentKey]);
18379
18461
  if (!!areaKey !== !!parentContentKey) {
18380
18462
  throw new (0, _mcpserversdk.ToolValidationError)({
18381
18463
  title: "Incomplete area target",
@@ -18425,7 +18507,7 @@ var CreateDocumentBlockTool = {
18425
18507
  title: "Area not found",
18426
18508
  detail: `Area '${key}' is not configured for block type '${parentBlock.contentTypeKey}'`,
18427
18509
  extensions: {
18428
- availableAreas: (_nullishCoalesce(_optionalChain([findBlockTypeConfiguration, 'call', _38 => _38(blockConfigs, parentBlock.contentTypeKey), 'optionalAccess', _39 => _39.areas]), () => ( []))).map((a) => ({ key: a.key, alias: _nullishCoalesce(a.alias, () => ( null)) }))
18510
+ availableAreas: (_nullishCoalesce(_optionalChain([findBlockTypeConfiguration, 'call', _32 => _32(blockConfigs, parentBlock.contentTypeKey), 'optionalAccess', _33 => _33.areas]), () => ( []))).map((a) => ({ key: a.key, alias: _nullishCoalesce(a.alias, () => ( null)) }))
18429
18511
  }
18430
18512
  });
18431
18513
  }
@@ -18447,7 +18529,7 @@ var CreateDocumentBlockTool = {
18447
18529
  detail: `No block with contentKey '${placement.contentKey}' exists in property '${model.propertyAlias}'`
18448
18530
  });
18449
18531
  }
18450
- if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _40 => _40.parent, 'optionalAccess', _41 => _41.contentKey]) !== parentContentKey)) {
18532
+ if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _34 => _34.parent, 'optionalAccess', _35 => _35.contentKey]) !== parentContentKey)) {
18451
18533
  throw new (0, _mcpserversdk.ToolValidationError)({
18452
18534
  title: "Sibling not in target area",
18453
18535
  detail: `Block '${placement.contentKey}' is not in area '${areaKey}' of block '${parentContentKey}'`
@@ -18488,12 +18570,12 @@ var CreateDocumentBlockTool = {
18488
18570
  }
18489
18571
  }
18490
18572
  const contentKey = _uuid.v4.call(void 0, );
18491
- const settingsKey = model.settings ? _uuid.v4.call(void 0, ) : null;
18573
+ const settingsKey = blockConfig.settingsElementTypeKey ? _uuid.v4.call(void 0, ) : null;
18492
18574
  const layoutEntry = buildLayoutEntry(kind, {
18493
18575
  contentKey,
18494
18576
  settingsKey,
18495
- columnSpan: _optionalChain([model, 'access', _42 => _42.grid, 'optionalAccess', _43 => _43.columnSpan]),
18496
- rowSpan: _optionalChain([model, 'access', _44 => _44.grid, 'optionalAccess', _45 => _45.rowSpan]),
18577
+ columnSpan: _optionalChain([model, 'access', _36 => _36.grid, 'optionalAccess', _37 => _37.columnSpan]),
18578
+ rowSpan: _optionalChain([model, 'access', _38 => _38.grid, 'optionalAccess', _39 => _39.rowSpan]),
18497
18579
  areaKeys: (_nullishCoalesce(blockConfig.areas, () => ( []))).map((a) => a.key)
18498
18580
  });
18499
18581
  const elementType = await client.getDocumentTypeById(model.contentTypeKey);
@@ -18542,6 +18624,7 @@ var CreateDocumentBlockTool = {
18542
18624
  return _mcpserversdk.createToolResult.call(void 0, {
18543
18625
  success: true,
18544
18626
  message: `Created 1 block in ${kind} property '${getPropertyKey(model.propertyAlias, model.culture, model.segment)}'`,
18627
+ kind,
18545
18628
  results: [{
18546
18629
  success: true,
18547
18630
  contentKey,
@@ -18849,6 +18932,7 @@ var DocumentCollection = {
18849
18932
  if (AuthorizationPolicies.TreeAccessDocuments(user)) {
18850
18933
  tools.push(get_document_by_id_default);
18851
18934
  tools.push(get_document_publish_default);
18935
+ tools.push(get_document_publish_with_descendants_result_default);
18852
18936
  tools.push(get_document_configuration_default);
18853
18937
  tools.push(get_document_type_schema_default);
18854
18938
  tools.push(copy_document_default);
@@ -18983,6 +19067,8 @@ var createDocumentTypeSchema = _zod.z.object({
18983
19067
  compositions: _zod.z.array(_zod.z.string().uuid("Must be a valid document type UUID")).default([]),
18984
19068
  allowedDocumentTypes: _zod.z.array(_zod.z.string().uuid("Must be a valid document type UUID")).default([]),
18985
19069
  collection: _zod.z.string().uuid("Must be a valid collection data type UUID").optional(),
19070
+ variesByCulture: _zod.z.boolean().optional(),
19071
+ variesBySegment: _zod.z.boolean().optional(),
18986
19072
  properties: _zod.z.array(
18987
19073
  _zod.z.object({
18988
19074
  name: _zod.z.string().min(1, "Property name is required"),
@@ -18992,7 +19078,9 @@ var createDocumentTypeSchema = _zod.z.object({
18992
19078
  group: _zod.z.string().optional(),
18993
19079
  description: _zod.z.string().optional(),
18994
19080
  mandatory: _zod.z.boolean().optional(),
18995
- sortOrder: _zod.z.number().int().nonnegative().max(2147483647).optional()
19081
+ sortOrder: _zod.z.number().int().nonnegative().max(2147483647).optional(),
19082
+ variesByCulture: _zod.z.boolean().optional(),
19083
+ variesBySegment: _zod.z.boolean().optional()
18996
19084
  }).refine(
18997
19085
  (data) => data.tab || data.group,
18998
19086
  {
@@ -19027,7 +19115,11 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
19027
19115
  8. Properties optionally accept 'description', 'mandatory' and 'sortOrder':
19028
19116
  - 'description' sets the property's help text (defaults to none)
19029
19117
  - 'mandatory' marks the property as required (defaults to false)
19030
- - 'sortOrder' controls the property's position (defaults to the next position not already claimed by another property's explicit sortOrder)`,
19118
+ - 'sortOrder' controls the property's position (defaults to the next position not already claimed by another property's explicit sortOrder)
19119
+ 9. 'variesByCulture' and 'variesBySegment' (both default to false) can be set on the document type and on each property:
19120
+ - 'variesByCulture' enables language/culture variation
19121
+ - 'variesBySegment' enables segment variation (e.g. for A/B testing or audience targeting)
19122
+ - A property only varies if the document type has the same flag set; otherwise Umbraco ignores the property's flag`,
19031
19123
  inputSchema: createDocumentTypeSchema.shape,
19032
19124
  outputSchema: createDocumentTypeOutputSchema.shape,
19033
19125
  slices: ["create"],
@@ -19075,8 +19167,8 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
19075
19167
  regExMessage: null,
19076
19168
  mandatoryMessage: null
19077
19169
  },
19078
- variesByCulture: false,
19079
- variesBySegment: false,
19170
+ variesByCulture: _nullishCoalesce(prop.variesByCulture, () => ( false)),
19171
+ variesBySegment: _nullishCoalesce(prop.variesBySegment, () => ( false)),
19080
19172
  container: containerId ? { id: containerId } : void 0
19081
19173
  };
19082
19174
  });
@@ -19098,8 +19190,8 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
19098
19190
  })),
19099
19191
  allowedAsRoot: model.allowedAsRoot,
19100
19192
  allowedInLibrary: true,
19101
- variesByCulture: false,
19102
- variesBySegment: false,
19193
+ variesByCulture: _nullishCoalesce(model.variesByCulture, () => ( false)),
19194
+ variesBySegment: _nullishCoalesce(model.variesBySegment, () => ( false)),
19103
19195
  allowedTemplates: [],
19104
19196
  allowedDocumentTypes: model.allowedDocumentTypes.map((id, index) => ({
19105
19197
  documentType: { id },
@@ -19227,7 +19319,7 @@ var CopyDocumentTypeTool = {
19227
19319
  validateStatus: () => true
19228
19320
  });
19229
19321
  if (response.status === 201) {
19230
- const location = _optionalChain([response, 'access', _46 => _46.headers, 'optionalAccess', _47 => _47.location]) || "";
19322
+ const location = _optionalChain([response, 'access', _40 => _40.headers, 'optionalAccess', _41 => _41.location]) || "";
19231
19323
  const newId = location.split("/").pop() || "";
19232
19324
  const output = { id: newId };
19233
19325
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -20677,14 +20769,14 @@ var get_element_configuration_default = _mcpserversdk.withStandardDecorators.cal
20677
20769
 
20678
20770
 
20679
20771
 
20680
- var inputSchema18 = {
20772
+ var inputSchema19 = {
20681
20773
  id: getElementByIdAuditLogParams.shape.id,
20682
20774
  ...getElementByIdAuditLogQueryParams.shape
20683
20775
  };
20684
20776
  var GetElementAuditLogTool = {
20685
20777
  name: "get-element-audit-log",
20686
20778
  description: "Fetches the audit log for an element by Id.",
20687
- inputSchema: inputSchema18,
20779
+ inputSchema: inputSchema19,
20688
20780
  outputSchema: getElementByIdAuditLogResponse.shape,
20689
20781
  annotations: {
20690
20782
  readOnlyHint: true
@@ -20732,7 +20824,7 @@ var get_element_are_referenced_default = _mcpserversdk.withStandardDecorators.ca
20732
20824
 
20733
20825
 
20734
20826
 
20735
- var inputSchema19 = _zod.z.object({
20827
+ var inputSchema20 = _zod.z.object({
20736
20828
  ...getElementByIdReferencedByParams.shape,
20737
20829
  ...getElementByIdReferencedByQueryParams.shape
20738
20830
  });
@@ -20740,7 +20832,7 @@ var GetElementByIdReferencedByTool = {
20740
20832
  name: "get-element-by-id-referenced-by",
20741
20833
  description: `Get items that reference a specific element item
20742
20834
  Use this to find all content, documents, or other items that are currently referencing a specific element item.`,
20743
- inputSchema: inputSchema19.shape,
20835
+ inputSchema: inputSchema20.shape,
20744
20836
  outputSchema: getElementByIdReferencedByResponse.shape,
20745
20837
  annotations: {
20746
20838
  readOnlyHint: true
@@ -20762,7 +20854,7 @@ var get_element_by_id_referenced_by_default = _mcpserversdk.withStandardDecorato
20762
20854
 
20763
20855
 
20764
20856
 
20765
- var inputSchema20 = _zod.z.object({
20857
+ var inputSchema21 = _zod.z.object({
20766
20858
  ...getElementFolderByIdReferencedDescendantsParams.shape,
20767
20859
  ...getElementFolderByIdReferencedDescendantsQueryParams.shape
20768
20860
  });
@@ -20775,7 +20867,7 @@ var GetElementFolderReferencedDescendantsTool = {
20775
20867
  \u2022 Impact analysis: Before deleting an element folder, see what content would be affected
20776
20868
  \u2022 Dependency tracking: Find all content using elements from a specific folder hierarchy
20777
20869
  \u2022 Content auditing: Identify which descendant element items are actually being used`,
20778
- inputSchema: inputSchema20.shape,
20870
+ inputSchema: inputSchema21.shape,
20779
20871
  outputSchema: getElementFolderByIdReferencedDescendantsResponse.shape,
20780
20872
  annotations: {
20781
20873
  readOnlyHint: true
@@ -21476,7 +21568,7 @@ var CopyElementTool = {
21476
21568
  validateStatus: () => true
21477
21569
  });
21478
21570
  if (response.status === 201) {
21479
- const location = _optionalChain([response, 'access', _48 => _48.headers, 'optionalAccess', _49 => _49.location]) || "";
21571
+ const location = _optionalChain([response, 'access', _42 => _42.headers, 'optionalAccess', _43 => _43.location]) || "";
21480
21572
  const newId = location.split("/").pop() || "";
21481
21573
  const output = { id: newId };
21482
21574
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -21544,7 +21636,7 @@ var rollback_element_version_default = _mcpserversdk.withStandardDecorators.call
21544
21636
 
21545
21637
 
21546
21638
 
21547
- var inputSchema21 = {
21639
+ var inputSchema22 = {
21548
21640
  id: putElementByIdParams.shape.id,
21549
21641
  data: _zod.z.object(putElementByIdBody.shape)
21550
21642
  };
@@ -21560,7 +21652,7 @@ var UpdateElementTool = {
21560
21652
  - Always read the current element first with get-element-by-id.
21561
21653
  - Send the full set of values AND variants \u2014 they are replaced wholesale, so any value or variant you omit is removed.
21562
21654
  - Include one variant entry per existing culture; do not drop variants you aren't changing.`,
21563
- inputSchema: inputSchema21,
21655
+ inputSchema: inputSchema22,
21564
21656
  annotations: {
21565
21657
  idempotentHint: true
21566
21658
  },
@@ -21581,7 +21673,7 @@ var update_element_default = _mcpserversdk.withStandardDecorators.call(void 0, U
21581
21673
 
21582
21674
 
21583
21675
 
21584
- var inputSchema22 = {
21676
+ var inputSchema23 = {
21585
21677
  id: putElementByIdUpdateAndPublishParams.shape.id,
21586
21678
  data: _zod.z.object(putElementByIdUpdateAndPublishBody.shape)
21587
21679
  };
@@ -21599,7 +21691,7 @@ var UpdateAndPublishElementTool = {
21599
21691
  - Always read the current element first with get-element-by-id.
21600
21692
  - Send the full set of values AND variants \u2014 they are replaced wholesale, so any value or variant you omit is removed.
21601
21693
  - Include one variant entry per existing culture; do not drop variants you aren't changing.`,
21602
- inputSchema: inputSchema22,
21694
+ inputSchema: inputSchema23,
21603
21695
  annotations: {
21604
21696
  idempotentHint: true
21605
21697
  },
@@ -22047,14 +22139,14 @@ var update_element_block_property_default = _mcpserversdk.withStandardDecorators
22047
22139
 
22048
22140
 
22049
22141
 
22050
- var inputSchema23 = {
22142
+ var inputSchema24 = {
22051
22143
  id: _zod.z.string().uuid(),
22052
22144
  data: _zod.z.object(putElementByIdMoveBody.shape)
22053
22145
  };
22054
22146
  var MoveElementTool = {
22055
22147
  name: "move-element",
22056
22148
  description: "Move an element to a new location",
22057
- inputSchema: inputSchema23,
22149
+ inputSchema: inputSchema24,
22058
22150
  annotations: {},
22059
22151
  slices: ["move"],
22060
22152
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Move),
@@ -22094,7 +22186,7 @@ var move_element_to_recycle_bin_default = _mcpserversdk.withStandardDecorators.c
22094
22186
 
22095
22187
 
22096
22188
 
22097
- var inputSchema24 = {
22189
+ var inputSchema25 = {
22098
22190
  id: _zod.z.string().uuid(),
22099
22191
  data: _zod.z.object(putElementByIdPublishBody.shape)
22100
22192
  };
@@ -22104,7 +22196,7 @@ var PublishElementTool = {
22104
22196
  This function bypasses approval workflows and publishes directly to the live site.
22105
22197
  When the culture is not provided, the default culture is null.
22106
22198
  When the schedule is not provided, the default schedule is null.`,
22107
- inputSchema: inputSchema24,
22199
+ inputSchema: inputSchema25,
22108
22200
  annotations: {},
22109
22201
  slices: ["publish"],
22110
22202
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Publish),
@@ -22126,14 +22218,14 @@ var publish_element_default = _mcpserversdk.withStandardDecorators.call(void 0,
22126
22218
 
22127
22219
 
22128
22220
 
22129
- var inputSchema25 = {
22221
+ var inputSchema26 = {
22130
22222
  id: _zod.z.string().uuid(),
22131
22223
  data: _zod.z.object(putElementByIdUnpublishBody.shape)
22132
22224
  };
22133
22225
  var UnpublishElementTool = {
22134
22226
  name: "unpublish-element",
22135
22227
  description: "Unpublishes an element by Id.",
22136
- inputSchema: inputSchema25,
22228
+ inputSchema: inputSchema26,
22137
22229
  annotations: {},
22138
22230
  slices: ["publish"],
22139
22231
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Unpublish),
@@ -22153,14 +22245,14 @@ var unpublish_element_default = _mcpserversdk.withStandardDecorators.call(void 0
22153
22245
 
22154
22246
 
22155
22247
 
22156
- var inputSchema26 = {
22248
+ var inputSchema27 = {
22157
22249
  id: _zod.z.string().uuid(),
22158
22250
  data: _zod.z.object(putElementByIdValidateBody.shape)
22159
22251
  };
22160
22252
  var ValidateElementUpdateTool = {
22161
22253
  name: "validate-element-update",
22162
22254
  description: "Validates the request model for updating an element without actually updating it.",
22163
- inputSchema: inputSchema26,
22255
+ inputSchema: inputSchema27,
22164
22256
  annotations: {},
22165
22257
  slices: ["update"],
22166
22258
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Update),
@@ -22391,14 +22483,14 @@ var update_element_folder_default = _mcpserversdk.withStandardDecorators.call(vo
22391
22483
 
22392
22484
 
22393
22485
 
22394
- var inputSchema27 = {
22486
+ var inputSchema28 = {
22395
22487
  id: _zod.z.string().uuid(),
22396
22488
  data: _zod.z.object(putElementFolderByIdMoveBody.shape)
22397
22489
  };
22398
22490
  var MoveElementFolderTool = {
22399
22491
  name: "move-element-folder",
22400
22492
  description: "Moves an element folder to a new location",
22401
- inputSchema: inputSchema27,
22493
+ inputSchema: inputSchema28,
22402
22494
  annotations: {},
22403
22495
  slices: ["move", "folders"],
22404
22496
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Move),
@@ -22957,14 +23049,14 @@ var create_language_default = _mcpserversdk.withStandardDecorators.call(void 0,
22957
23049
 
22958
23050
 
22959
23051
 
22960
- var inputSchema28 = {
23052
+ var inputSchema29 = {
22961
23053
  isoCode: putLanguageByIsoCodeParams.shape.isoCode,
22962
23054
  data: _zod.z.object(putLanguageByIsoCodeBody.shape)
22963
23055
  };
22964
23056
  var UpdateLanguageTool = {
22965
23057
  name: "update-language",
22966
23058
  description: "Updates an existing language by ISO code",
22967
- inputSchema: inputSchema28,
23059
+ inputSchema: inputSchema29,
22968
23060
  annotations: {
22969
23061
  idempotentHint: true
22970
23062
  },
@@ -23424,6 +23516,11 @@ async function validateFilePath(filePath, allowedPaths) {
23424
23516
 
23425
23517
 
23426
23518
 
23519
+
23520
+
23521
+
23522
+
23523
+
23427
23524
  var BASE64_MAX_BYTES = 10 * 1024;
23428
23525
  function getExtensionFromMimeType(mimeType) {
23429
23526
  if (!mimeType) return void 0;
@@ -23432,19 +23529,47 @@ function getExtensionFromMimeType(mimeType) {
23432
23529
  return extension ? `.${extension}` : void 0;
23433
23530
  }
23434
23531
  function validateMediaTypeForSvg(filePath, fileUrl, fileName, mediaTypeName) {
23435
- const isSvg = _optionalChain([filePath, 'optionalAccess', _50 => _50.toLowerCase, 'call', _51 => _51(), 'access', _52 => _52.endsWith, 'call', _53 => _53(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _54 => _54.toLowerCase, 'call', _55 => _55(), 'access', _56 => _56.endsWith, 'call', _57 => _57(".svg")]) || fileName.toLowerCase().endsWith(".svg");
23436
- if (isSvg && mediaTypeName === _mcpserversdk.MEDIA_TYPE_IMAGE) {
23532
+ const isSvg = _optionalChain([filePath, 'optionalAccess', _44 => _44.toLowerCase, 'call', _45 => _45(), 'access', _46 => _46.endsWith, 'call', _47 => _47(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _48 => _48.toLowerCase, 'call', _49 => _49(), 'access', _50 => _50.endsWith, 'call', _51 => _51(".svg")]) || fileName.toLowerCase().endsWith(".svg");
23533
+ if (isSvg && mediaTypeName.toLowerCase() === _mcpserversdk.MEDIA_TYPE_IMAGE.toLowerCase()) {
23437
23534
  console.warn(`SVG detected - using ${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS} media type instead of ${_mcpserversdk.MEDIA_TYPE_IMAGE}`);
23438
23535
  return _mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS;
23439
23536
  }
23440
23537
  return mediaTypeName;
23441
23538
  }
23539
+ var BUILT_IN_MEDIA_TYPES = {
23540
+ [_mcpserversdk.MEDIA_TYPE_IMAGE.toLowerCase()]: { name: _mcpserversdk.MEDIA_TYPE_IMAGE, alias: _mcpserversdk.MEDIA_TYPE_ALIASES.Image, fallbackToFile: false },
23541
+ [_mcpserversdk.MEDIA_TYPE_FILE.toLowerCase()]: { name: _mcpserversdk.MEDIA_TYPE_FILE, alias: _mcpserversdk.MEDIA_TYPE_ALIASES.File, fallbackToFile: false },
23542
+ [_mcpserversdk.MEDIA_TYPE_VIDEO.toLowerCase()]: { name: _mcpserversdk.MEDIA_TYPE_VIDEO, alias: _mcpserversdk.MEDIA_TYPE_ALIASES.Video, fallbackToFile: true },
23543
+ [_mcpserversdk.MEDIA_TYPE_AUDIO.toLowerCase()]: { name: _mcpserversdk.MEDIA_TYPE_AUDIO, alias: _mcpserversdk.MEDIA_TYPE_ALIASES.Audio, fallbackToFile: true },
23544
+ [_mcpserversdk.MEDIA_TYPE_ARTICLE.toLowerCase()]: { name: _mcpserversdk.MEDIA_TYPE_ARTICLE, alias: _mcpserversdk.MEDIA_TYPE_ALIASES.Article, fallbackToFile: true },
23545
+ [_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS.toLowerCase()]: { name: _mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS, alias: _mcpserversdk.MEDIA_TYPE_ALIASES.VectorGraphics, fallbackToFile: true }
23546
+ };
23547
+ function getSubstitutedMediaType(requestedName, resolved) {
23548
+ return requestedName.toLowerCase() === resolved.name.toLowerCase() ? void 0 : requestedName;
23549
+ }
23550
+ function getMediaTypeWarning(result) {
23551
+ return result.substitutedFor ? `This site has no '${result.substitutedFor}' media type, so '${result.mediaTypeName}' was used instead.` : void 0;
23552
+ }
23553
+ function formatMediaCreatedMessage(result) {
23554
+ return result.substitutedFor ? `Media "${result.name}" created as '${result.mediaTypeName}' \u2014 this site has no '${result.substitutedFor}' media type.` : `Media "${result.name}" created successfully`;
23555
+ }
23442
23556
  async function fetchMediaTypeId(client, mediaTypeName) {
23443
- const standardTypeKey = Object.keys(_mcpserversdk.STANDARD_MEDIA_TYPES).find(
23444
- (key) => key.toLowerCase() === mediaTypeName.toLowerCase()
23445
- );
23446
- if (standardTypeKey) {
23447
- return _mcpserversdk.STANDARD_MEDIA_TYPES[standardTypeKey];
23557
+ const builtIn = BUILT_IN_MEDIA_TYPES[mediaTypeName.toLowerCase()];
23558
+ if (builtIn) {
23559
+ const id = await _mcpserversdk.resolveMediaTypeId.call(void 0, builtIn.alias);
23560
+ if (id) {
23561
+ return { id, name: builtIn.name };
23562
+ }
23563
+ if (builtIn.fallbackToFile) {
23564
+ const fileId = await _mcpserversdk.resolveMediaTypeId.call(void 0, _mcpserversdk.MEDIA_TYPE_ALIASES.File);
23565
+ if (fileId) {
23566
+ console.warn(`Media type '${builtIn.name}' not found on this site - using ${_mcpserversdk.MEDIA_TYPE_FILE} instead`);
23567
+ return { id: fileId, name: _mcpserversdk.MEDIA_TYPE_FILE };
23568
+ }
23569
+ }
23570
+ throw new Error(
23571
+ `Media type '${builtIn.name}' (alias '${builtIn.alias}') not found on this site` + (builtIn.fallbackToFile ? `, and no '${_mcpserversdk.MEDIA_TYPE_FILE}' media type to fall back to` : "")
23572
+ );
23448
23573
  }
23449
23574
  const response = await client.getItemMediaTypeSearch({ query: mediaTypeName });
23450
23575
  const mediaType = response.items.find(
@@ -23456,7 +23581,7 @@ async function fetchMediaTypeId(client, mediaTypeName) {
23456
23581
  `Media type '${mediaTypeName}' not found. Available types: ${availableTypes || "None found"}`
23457
23582
  );
23458
23583
  }
23459
- return mediaType.id;
23584
+ return { id: mediaType.id, name: mediaType.name };
23460
23585
  }
23461
23586
  function getEditorAlias(mediaTypeName) {
23462
23587
  return mediaTypeName === _mcpserversdk.MEDIA_TYPE_IMAGE ? "Umbraco.ImageCropper" : "Umbraco.UploadField";
@@ -23570,7 +23695,7 @@ async function uploadMediaFile(client, params) {
23570
23695
  params.name,
23571
23696
  params.mediaTypeName
23572
23697
  );
23573
- const mediaTypeId = await fetchMediaTypeId(client, validatedMediaTypeName);
23698
+ const mediaType = await fetchMediaTypeId(client, validatedMediaTypeName);
23574
23699
  const { data, filename } = await createFilePayload(
23575
23700
  params.sourceType,
23576
23701
  params.filePath,
@@ -23586,14 +23711,14 @@ async function uploadMediaFile(client, params) {
23586
23711
  });
23587
23712
  } catch (error) {
23588
23713
  const err = error;
23589
- const errorData = _optionalChain([err, 'access', _58 => _58.response, 'optionalAccess', _59 => _59.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
23590
- throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _60 => _60.response, 'optionalAccess', _61 => _61.status]) || "Unknown error"} - ${errorData}`);
23714
+ const errorData = _optionalChain([err, 'access', _52 => _52.response, 'optionalAccess', _53 => _53.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
23715
+ throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _54 => _54.response, 'optionalAccess', _55 => _55.status]) || "Unknown error"} - ${errorData}`);
23591
23716
  }
23592
- const valueStructure = buildValueStructure(validatedMediaTypeName, params.temporaryFileId);
23717
+ const valueStructure = buildValueStructure(mediaType.name, params.temporaryFileId);
23593
23718
  let response;
23594
23719
  try {
23595
23720
  response = await client.postMedia({
23596
- mediaType: { id: mediaTypeId },
23721
+ mediaType: { id: mediaType.id },
23597
23722
  variants: [
23598
23723
  {
23599
23724
  culture: null,
@@ -23607,12 +23732,12 @@ async function uploadMediaFile(client, params) {
23607
23732
  }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
23608
23733
  } catch (error) {
23609
23734
  const err = error;
23610
- throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _62 => _62.response, 'optionalAccess', _63 => _63.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _64 => _64.response, 'optionalAccess', _65 => _65.data])) || err.message}`);
23735
+ throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _56 => _56.response, 'optionalAccess', _57 => _57.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _58 => _58.response, 'optionalAccess', _59 => _59.data])) || err.message}`);
23611
23736
  }
23612
23737
  if (response.status < 200 || response.status >= 300) {
23613
23738
  throw new Error(`Request failed with status code ${response.status}`);
23614
23739
  }
23615
- const locationHeader = _optionalChain([response, 'access', _66 => _66.headers, 'optionalAccess', _67 => _67.location]) || _optionalChain([response, 'access', _68 => _68.headers, 'optionalAccess', _69 => _69.Location]);
23740
+ const locationHeader = _optionalChain([response, 'access', _60 => _60.headers, 'optionalAccess', _61 => _61.location]) || _optionalChain([response, 'access', _62 => _62.headers, 'optionalAccess', _63 => _63.Location]);
23616
23741
  if (!locationHeader) {
23617
23742
  throw new Error("No Location header in response - cannot determine created media ID");
23618
23743
  }
@@ -23621,7 +23746,12 @@ async function uploadMediaFile(client, params) {
23621
23746
  throw new Error(`Could not extract ID from Location header: ${locationHeader}`);
23622
23747
  }
23623
23748
  const mediaId = idMatch[1];
23624
- return { name: params.name, id: mediaId };
23749
+ return {
23750
+ name: params.name,
23751
+ id: mediaId,
23752
+ mediaTypeName: mediaType.name,
23753
+ substitutedFor: getSubstitutedMediaType(validatedMediaTypeName, mediaType)
23754
+ };
23625
23755
  }
23626
23756
 
23627
23757
  // src/umbraco-api/tools/media/post/helpers/source-type-helpers.ts
@@ -23644,7 +23774,7 @@ function buildSourceTypeSection(allowFilePath, otherSources) {
23644
23774
 
23645
23775
 
23646
23776
  function isStreamingUploadAvailable() {
23647
- return _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _70 => _70.umbracoAuth]) !== void 0;
23777
+ return _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _64 => _64.umbracoAuth]) !== void 0;
23648
23778
  }
23649
23779
  async function resolveAuth() {
23650
23780
  const { accessToken, baseUrl } = await _mcpserversdk.getSessionUmbracoAuth.call(void 0, );
@@ -23652,7 +23782,7 @@ async function resolveAuth() {
23652
23782
  }
23653
23783
  function ensureExtension(name, contentType, urlPath) {
23654
23784
  if (name.includes(".")) return name;
23655
- const fromUrl = _optionalChain([urlPath, 'access', _71 => _71.match, 'call', _72 => _72(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _73 => _73[0]]);
23785
+ const fromUrl = _optionalChain([urlPath, 'access', _65 => _65.match, 'call', _66 => _66(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _67 => _67[0]]);
23656
23786
  if (fromUrl) return `${name}${fromUrl}`;
23657
23787
  if (contentType) {
23658
23788
  const subtype = contentType.split(";")[0].split("/")[1];
@@ -23670,7 +23800,7 @@ async function streamingUploadFromUrl(params) {
23670
23800
  params.name,
23671
23801
  params.mediaTypeName
23672
23802
  );
23673
- const [mediaTypeId, auth] = await Promise.all([
23803
+ const [mediaType, auth] = await Promise.all([
23674
23804
  fetchMediaTypeId(client, validatedMediaTypeName),
23675
23805
  resolveAuth()
23676
23806
  ]);
@@ -23745,10 +23875,10 @@ Content-Type: ${sourceContentType}\r
23745
23875
  `Umbraco temporary-file POST failed: HTTP ${tempResp.status} ${tempResp.statusText} - ${errBody}`
23746
23876
  );
23747
23877
  }
23748
- const valueStructure = buildValueStructure(validatedMediaTypeName, temporaryFileId);
23878
+ const valueStructure = buildValueStructure(mediaType.name, temporaryFileId);
23749
23879
  const response = await client.postMedia(
23750
23880
  {
23751
- mediaType: { id: mediaTypeId },
23881
+ mediaType: { id: mediaType.id },
23752
23882
  variants: [{ culture: null, segment: null, name: params.name }],
23753
23883
  values: [valueStructure],
23754
23884
  parent: params.parentId ? { id: params.parentId } : null
@@ -23758,25 +23888,32 @@ Content-Type: ${sourceContentType}\r
23758
23888
  if (response.status < 200 || response.status >= 300) {
23759
23889
  throw new Error(`postMedia failed with status ${response.status}`);
23760
23890
  }
23761
- const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _74 => _74.headers, 'optionalAccess', _75 => _75.location]), () => ( _optionalChain([response, 'access', _76 => _76.headers, 'optionalAccess', _77 => _77.Location])));
23762
- const idMatch = _optionalChain([locationHeader, 'optionalAccess', _78 => _78.match, 'call', _79 => _79(/\/([a-f0-9-]{36})$/i)]);
23891
+ const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _68 => _68.headers, 'optionalAccess', _69 => _69.location]), () => ( _optionalChain([response, 'access', _70 => _70.headers, 'optionalAccess', _71 => _71.Location])));
23892
+ const idMatch = _optionalChain([locationHeader, 'optionalAccess', _72 => _72.match, 'call', _73 => _73(/\/([a-f0-9-]{36})$/i)]);
23763
23893
  if (!idMatch) {
23764
23894
  throw new Error(
23765
23895
  `Could not extract media id from Location header: ${_nullishCoalesce(locationHeader, () => ( "(missing)"))}`
23766
23896
  );
23767
23897
  }
23768
- return { name: params.name, id: idMatch[1] };
23898
+ return {
23899
+ name: params.name,
23900
+ id: idMatch[1],
23901
+ mediaTypeName: mediaType.name,
23902
+ substitutedFor: getSubstitutedMediaType(validatedMediaTypeName, mediaType)
23903
+ };
23769
23904
  } finally {
23770
23905
  clearTimeout(overallTimeout);
23771
23906
  }
23772
23907
  }
23773
23908
  async function streamingUploadToToolResult(params) {
23774
23909
  try {
23775
- const { name, id } = await streamingUploadFromUrl(params);
23910
+ const result = await streamingUploadFromUrl(params);
23911
+ const warning = getMediaTypeWarning(result);
23776
23912
  return _mcpserversdk.createToolResult.call(void 0, {
23777
- message: `Media "${name}" created successfully`,
23778
- name,
23779
- id
23913
+ message: formatMediaCreatedMessage(result),
23914
+ name: result.name,
23915
+ id: result.id,
23916
+ ...warning ? { warning } : {}
23780
23917
  });
23781
23918
  } catch (error) {
23782
23919
  return _mcpserversdk.createToolResultError.call(void 0, {
@@ -23806,7 +23943,9 @@ var fileObjectSchema = _zod.z.object({
23806
23943
  var createMediaOutputSchema = _zod.z.object({
23807
23944
  message: _zod.z.string(),
23808
23945
  name: _zod.z.string(),
23809
- id: _zod.z.string().guid()
23946
+ id: _zod.z.string().guid(),
23947
+ /** Set only when the site lacks the requested media type and another was used (e.g. Video → File). */
23948
+ warning: _zod.z.string().optional()
23810
23949
  });
23811
23950
  function createCreateMediaTool(options) {
23812
23951
  const sourceTypeValues = options.allowFilePath ? ["filePath", "url", "file", "base64"] : ["url", "file", "base64"];
@@ -23864,7 +24003,7 @@ ${filePathSection}
23864
24003
  let effectiveSourceType;
23865
24004
  let effectiveFileUrl = model.fileUrl;
23866
24005
  if (model.sourceType === "file") {
23867
- if (!_optionalChain([model, 'access', _80 => _80.file, 'optionalAccess', _81 => _81.download_url])) {
24006
+ if (!_optionalChain([model, 'access', _74 => _74.file, 'optionalAccess', _75 => _75.download_url])) {
23868
24007
  return _mcpserversdk.createToolResultError.call(void 0, {
23869
24008
  detail: "Error creating media: sourceType is 'file' but no file object was provided. ChatGPT's connector should inject this automatically when a file is attached \u2014 if it didn't, the user has nothing attached or your client doesn't support openai/fileParams."
23870
24009
  });
@@ -23890,7 +24029,7 @@ ${filePathSection}
23890
24029
  try {
23891
24030
  const client = UmbracoManagementClient3.getClient();
23892
24031
  const temporaryFileId = _uuid.v4.call(void 0, );
23893
- const { name: actualName, id } = await uploadMediaFile(client, {
24032
+ const result = await uploadMediaFile(client, {
23894
24033
  sourceType: effectiveSourceType,
23895
24034
  name: model.name,
23896
24035
  mediaTypeName: model.mediaTypeName,
@@ -23900,10 +24039,12 @@ ${filePathSection}
23900
24039
  parentId: model.parentId,
23901
24040
  temporaryFileId
23902
24041
  });
24042
+ const warning = getMediaTypeWarning(result);
23903
24043
  return _mcpserversdk.createToolResult.call(void 0, {
23904
- message: `Media "${actualName}" created successfully`,
23905
- name: actualName,
23906
- id
24044
+ message: formatMediaCreatedMessage(result),
24045
+ name: result.name,
24046
+ id: result.id,
24047
+ ...warning ? { warning } : {}
23907
24048
  });
23908
24049
  } catch (error) {
23909
24050
  return _mcpserversdk.createToolResultError.call(void 0, {
@@ -23936,9 +24077,15 @@ var createMediaMultipleOutputSchema = _zod.z.object({
23936
24077
  success: _zod.z.boolean(),
23937
24078
  name: _zod.z.string(),
23938
24079
  id: _zod.z.string().guid().optional(),
23939
- error: _zod.z.string().optional()
24080
+ error: _zod.z.string().optional(),
24081
+ /** Set only when the site lacks the requested media type and another was used (e.g. Video → File). */
24082
+ warning: _zod.z.string().optional()
23940
24083
  }))
23941
24084
  });
24085
+ function toSuccessResult(upload) {
24086
+ const warning = getMediaTypeWarning(upload);
24087
+ return { success: true, name: upload.name, id: upload.id, ...warning ? { warning } : {} };
24088
+ }
23942
24089
  var fileObjectSchema2 = _zod.z.object({
23943
24090
  download_url: _zod.z.string().describe("Temporary URL the host provides to fetch the file bytes"),
23944
24091
  file_id: _zod.z.string().describe("Persistent file identifier from the host"),
@@ -24013,7 +24160,7 @@ ${filePathSection}
24013
24160
  let effectiveSourceType;
24014
24161
  let effectiveFileUrl = file.fileUrl;
24015
24162
  if (model.sourceType === "file") {
24016
- if (!_optionalChain([file, 'access', _82 => _82.file, 'optionalAccess', _83 => _83.download_url])) {
24163
+ if (!_optionalChain([file, 'access', _76 => _76.file, 'optionalAccess', _77 => _77.download_url])) {
24017
24164
  return {
24018
24165
  success: false,
24019
24166
  name: file.name,
@@ -24033,16 +24180,16 @@ ${filePathSection}
24033
24180
  error: "fileUrl is required when sourceType is 'url'."
24034
24181
  };
24035
24182
  }
24036
- const { name: actualName2, id: mediaId2 } = await streamingUploadFromUrl({
24183
+ const upload2 = await streamingUploadFromUrl({
24037
24184
  sourceUrl: effectiveFileUrl,
24038
24185
  name: file.name,
24039
24186
  mediaTypeName,
24040
24187
  parentId: model.parentId
24041
24188
  });
24042
- return { success: true, name: actualName2, id: mediaId2 };
24189
+ return toSuccessResult(upload2);
24043
24190
  }
24044
24191
  const temporaryFileId = _uuid.v4.call(void 0, );
24045
- const { name: actualName, id: mediaId } = await uploadMediaFile(client, {
24192
+ const upload = await uploadMediaFile(client, {
24046
24193
  sourceType: effectiveSourceType,
24047
24194
  name: file.name,
24048
24195
  mediaTypeName,
@@ -24052,7 +24199,7 @@ ${filePathSection}
24052
24199
  parentId: model.parentId,
24053
24200
  temporaryFileId
24054
24201
  });
24055
- return { success: true, name: actualName, id: mediaId };
24202
+ return toSuccessResult(upload);
24056
24203
  } catch (error) {
24057
24204
  return { success: false, name: file.name, error: error.message };
24058
24205
  }
@@ -24079,6 +24226,7 @@ var create_media_multiple_default = createCreateMediaMultipleTool({ allowFilePat
24079
24226
 
24080
24227
 
24081
24228
 
24229
+
24082
24230
  var createMediaFolderSchema = _zod.z.object({
24083
24231
  name: _zod.z.string().describe("The name of the folder"),
24084
24232
  parentId: _zod.z.string().uuid().optional().describe("Parent folder ID. If not provided, the folder will be created at the root of the media library.")
@@ -24097,6 +24245,12 @@ var CreateMediaFolderTool = {
24097
24245
  handler: (async (model) => {
24098
24246
  try {
24099
24247
  const client = UmbracoManagementClient3.getClient();
24248
+ const folderMediaTypeId = await _mcpserversdk.resolveMediaTypeId.call(void 0, _mcpserversdk.MEDIA_TYPE_ALIASES.Folder);
24249
+ if (!folderMediaTypeId) {
24250
+ return _mcpserversdk.createToolResultError.call(void 0, {
24251
+ detail: `Error creating media folder: no media type with alias '${_mcpserversdk.MEDIA_TYPE_ALIASES.Folder}' was found on this Umbraco site.`
24252
+ });
24253
+ }
24100
24254
  const response = await client.postMedia({
24101
24255
  values: [],
24102
24256
  variants: [
@@ -24107,12 +24261,12 @@ var CreateMediaFolderTool = {
24107
24261
  }
24108
24262
  ],
24109
24263
  parent: model.parentId ? { id: model.parentId } : null,
24110
- mediaType: { id: _mcpserversdk.FOLDER_MEDIA_TYPE_ID }
24264
+ mediaType: { id: folderMediaTypeId }
24111
24265
  }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
24112
24266
  if (response.status < 200 || response.status >= 300) {
24113
24267
  throw new Error(`Request failed with status code ${response.status}`);
24114
24268
  }
24115
- const locationHeader = _optionalChain([response, 'access', _84 => _84.headers, 'optionalAccess', _85 => _85.location]) || _optionalChain([response, 'access', _86 => _86.headers, 'optionalAccess', _87 => _87.Location]);
24269
+ const locationHeader = _optionalChain([response, 'access', _78 => _78.headers, 'optionalAccess', _79 => _79.location]) || _optionalChain([response, 'access', _80 => _80.headers, 'optionalAccess', _81 => _81.Location]);
24116
24270
  if (!locationHeader) {
24117
24271
  throw new Error("No Location header in response - cannot determine created folder ID");
24118
24272
  }
@@ -24186,7 +24340,7 @@ var get_media_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0,
24186
24340
 
24187
24341
 
24188
24342
 
24189
- var inputSchema29 = {
24343
+ var inputSchema30 = {
24190
24344
  id: putMediaByIdParams.shape.id,
24191
24345
  data: _zod.z.object(putMediaByIdBody.shape)
24192
24346
  };
@@ -24196,7 +24350,7 @@ var UpdateMediaTool = {
24196
24350
  Always read the current media value first and only update the required values.
24197
24351
  Don't miss any properties from the original media that you are updating.
24198
24352
  This cannot be used for moving media to a new folder. Use the move endpoint to do that.`,
24199
- inputSchema: inputSchema29,
24353
+ inputSchema: inputSchema30,
24200
24354
  annotations: {
24201
24355
  idempotentHint: true
24202
24356
  },
@@ -24282,14 +24436,14 @@ var validate_media_default = _mcpserversdk.withStandardDecorators.call(void 0, V
24282
24436
 
24283
24437
 
24284
24438
 
24285
- var inputSchema30 = {
24439
+ var inputSchema31 = {
24286
24440
  id: putMediaByIdValidateParams.shape.id,
24287
24441
  data: _zod.z.object(putMediaByIdValidateBody.shape)
24288
24442
  };
24289
24443
  var ValidateMediaUpdateTool = {
24290
24444
  name: "validate-media-update",
24291
24445
  description: "Validates media data before updating an existing media item by Id",
24292
- inputSchema: inputSchema30,
24446
+ inputSchema: inputSchema31,
24293
24447
  annotations: { readOnlyHint: true },
24294
24448
  slices: ["validate"],
24295
24449
  handler: (async (model) => {
@@ -24329,7 +24483,7 @@ var sort_media_default = _mcpserversdk.withStandardDecorators.call(void 0, SortM
24329
24483
 
24330
24484
 
24331
24485
 
24332
- var inputSchema31 = {
24486
+ var inputSchema32 = {
24333
24487
  id: putMediaByIdSortChildrenParams.shape.id,
24334
24488
  data: _zod.z.object(putMediaByIdSortChildrenBody.shape)
24335
24489
  };
@@ -24338,7 +24492,7 @@ var SortMediaChildrenTool = {
24338
24492
  description: `Sorts the children of the media item identified by Id by a system field (Name, CreateDate or UpdateDate) in the given direction (Ascending or Descending).
24339
24493
 
24340
24494
  This is DIFFERENT from sort-media: sort-media reorders children according to an explicit list of ids and sort orders you provide, whereas sort-media-children sorts every child of {id} automatically by the chosen field and direction - no explicit ordering is required.`,
24341
- inputSchema: inputSchema31,
24495
+ inputSchema: inputSchema32,
24342
24496
  annotations: {},
24343
24497
  slices: ["sort"],
24344
24498
  handler: (async (model) => {
@@ -24403,14 +24557,14 @@ var get_media_by_id_array_default = _mcpserversdk.withStandardDecorators.call(vo
24403
24557
 
24404
24558
 
24405
24559
 
24406
- var inputSchema32 = {
24560
+ var inputSchema33 = {
24407
24561
  id: putMediaByIdMoveParams.shape.id,
24408
24562
  data: _zod.z.object(putMediaByIdMoveBody.shape)
24409
24563
  };
24410
24564
  var MoveMediaTool = {
24411
24565
  name: "move-media",
24412
24566
  description: "Move a media item to a new location",
24413
- inputSchema: inputSchema32,
24567
+ inputSchema: inputSchema33,
24414
24568
  annotations: {
24415
24569
  idempotentHint: true
24416
24570
  },
@@ -24546,14 +24700,14 @@ var get_root_default6 = _mcpserversdk.withStandardDecorators.call(void 0, GetMed
24546
24700
 
24547
24701
 
24548
24702
 
24549
- var inputSchema33 = {
24703
+ var inputSchema34 = {
24550
24704
  id: getMediaByIdAuditLogParams.shape.id,
24551
24705
  ...getMediaByIdAuditLogQueryParams.shape
24552
24706
  };
24553
24707
  var GetMediaAuditLogTool = {
24554
24708
  name: "get-media-audit-log",
24555
24709
  description: "Fetches the audit log for a media item by Id.",
24556
- inputSchema: inputSchema33,
24710
+ inputSchema: inputSchema34,
24557
24711
  outputSchema: getMediaByIdAuditLogResponse.shape,
24558
24712
  annotations: { readOnlyHint: true },
24559
24713
  slices: ["audit"],
@@ -24768,7 +24922,7 @@ var get_media_are_referenced_default = _mcpserversdk.withStandardDecorators.call
24768
24922
 
24769
24923
 
24770
24924
 
24771
- var inputSchema34 = _zod.z.object({
24925
+ var inputSchema35 = _zod.z.object({
24772
24926
  ...getMediaByIdReferencedByParams.shape,
24773
24927
  ...getMediaByIdReferencedByQueryParams.shape
24774
24928
  }).shape;
@@ -24776,7 +24930,7 @@ var GetMediaByIdReferencedByTool = {
24776
24930
  name: "get-media-by-id-referenced-by",
24777
24931
  description: `Get items that reference a specific media item
24778
24932
  Use this to find all content, documents, or other items that are currently referencing a specific media item.`,
24779
- inputSchema: inputSchema34,
24933
+ inputSchema: inputSchema35,
24780
24934
  outputSchema: getMediaByIdReferencedByResponse.shape,
24781
24935
  annotations: { readOnlyHint: true },
24782
24936
  slices: ["references"],
@@ -24795,7 +24949,7 @@ var get_media_by_id_referenced_by_default = _mcpserversdk.withStandardDecorators
24795
24949
 
24796
24950
 
24797
24951
 
24798
- var inputSchema35 = _zod.z.object({
24952
+ var inputSchema36 = _zod.z.object({
24799
24953
  ...getMediaByIdReferencedDescendantsParams.shape,
24800
24954
  ...getMediaByIdReferencedDescendantsQueryParams.shape
24801
24955
  }).shape;
@@ -24808,7 +24962,7 @@ var GetMediaByIdReferencedDescendantsTool = {
24808
24962
  \u2022 Impact analysis: Before deleting a media folder, see what content would be affected
24809
24963
  \u2022 Dependency tracking: Find all content using media from a specific folder hierarchy
24810
24964
  \u2022 Content auditing: Identify which descendant media items are actually being used`,
24811
- inputSchema: inputSchema35,
24965
+ inputSchema: inputSchema36,
24812
24966
  outputSchema: getMediaByIdReferencedDescendantsResponse.shape,
24813
24967
  annotations: { readOnlyHint: true },
24814
24968
  slices: ["references"],
@@ -25022,7 +25176,7 @@ var get_media_type_by_id_default = _mcpserversdk.withStandardDecorators.call(voi
25022
25176
 
25023
25177
 
25024
25178
 
25025
- var inputSchema36 = _zod.z.object({
25179
+ var inputSchema37 = _zod.z.object({
25026
25180
  ids: _zod.z.array(_zod.z.string())
25027
25181
  });
25028
25182
  var outputSchema39 = _zod.z.object({
@@ -25031,7 +25185,7 @@ var outputSchema39 = _zod.z.object({
25031
25185
  var GetMediaTypeByIdsTool = {
25032
25186
  name: "get-media-type-by-ids",
25033
25187
  description: "Gets media types by ids",
25034
- inputSchema: inputSchema36.shape,
25188
+ inputSchema: inputSchema37.shape,
25035
25189
  outputSchema: outputSchema39.shape,
25036
25190
  annotations: { readOnlyHint: true },
25037
25191
  slices: ["list"],
@@ -25144,13 +25298,13 @@ var get_media_type_allowed_at_root_default = _mcpserversdk.withStandardDecorator
25144
25298
 
25145
25299
 
25146
25300
 
25147
- var inputSchema37 = getMediaTypeByIdAllowedChildrenParams.merge(
25301
+ var inputSchema38 = getMediaTypeByIdAllowedChildrenParams.merge(
25148
25302
  getMediaTypeByIdAllowedChildrenQueryParams
25149
25303
  );
25150
25304
  var GetMediaTypeAllowedChildrenTool = {
25151
25305
  name: "get-media-type-allowed-children",
25152
25306
  description: "Gets the media types that are allowed as children of a media type",
25153
- inputSchema: inputSchema37.shape,
25307
+ inputSchema: inputSchema38.shape,
25154
25308
  outputSchema: getMediaTypeByIdAllowedChildrenResponse.shape,
25155
25309
  annotations: { readOnlyHint: true },
25156
25310
  slices: ["configuration"],
@@ -25398,7 +25552,7 @@ var CreateMediaTypeFolderTool = {
25398
25552
  validateStatus: () => true
25399
25553
  });
25400
25554
  if (response.status === 201) {
25401
- const locationHeader = _optionalChain([response, 'access', _88 => _88.headers, 'optionalAccess', _89 => _89["location"]]) || _optionalChain([response, 'access', _90 => _90.headers, 'optionalAccess', _91 => _91["Location"]]);
25555
+ const locationHeader = _optionalChain([response, 'access', _82 => _82.headers, 'optionalAccess', _83 => _83["location"]]) || _optionalChain([response, 'access', _84 => _84.headers, 'optionalAccess', _85 => _85["Location"]]);
25402
25556
  let createdId = model.id || "";
25403
25557
  if (locationHeader) {
25404
25558
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25450,14 +25604,14 @@ var delete_folder_default4 = _mcpserversdk.withStandardDecorators.call(void 0, D
25450
25604
 
25451
25605
 
25452
25606
 
25453
- var inputSchema38 = _zod.z.object({
25607
+ var inputSchema39 = _zod.z.object({
25454
25608
  id: putMediaTypeFolderByIdParams.shape.id,
25455
25609
  data: _zod.z.object(putMediaTypeFolderByIdBody.shape)
25456
25610
  });
25457
25611
  var UpdateMediaTypeFolderTool = {
25458
25612
  name: "update-media-type-folder",
25459
25613
  description: "Updates a media type folder by Id",
25460
- inputSchema: inputSchema38.shape,
25614
+ inputSchema: inputSchema39.shape,
25461
25615
  annotations: { idempotentHint: true },
25462
25616
  slices: ["update", "folders"],
25463
25617
  handler: (async (model) => {
@@ -25533,7 +25687,7 @@ var CreateMediaTypeTool = {
25533
25687
  validateStatus: () => true
25534
25688
  });
25535
25689
  if (response.status === 201) {
25536
- const locationHeader = _optionalChain([response, 'access', _92 => _92.headers, 'optionalAccess', _93 => _93["location"]]) || _optionalChain([response, 'access', _94 => _94.headers, 'optionalAccess', _95 => _95["Location"]]);
25690
+ const locationHeader = _optionalChain([response, 'access', _86 => _86.headers, 'optionalAccess', _87 => _87["location"]]) || _optionalChain([response, 'access', _88 => _88.headers, 'optionalAccess', _89 => _89["Location"]]);
25537
25691
  let createdId = model.id || "";
25538
25692
  if (locationHeader) {
25539
25693
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25563,7 +25717,7 @@ var create_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
25563
25717
 
25564
25718
 
25565
25719
 
25566
- var inputSchema39 = _zod.z.object({
25720
+ var inputSchema40 = _zod.z.object({
25567
25721
  id: _zod.z.string().uuid(),
25568
25722
  data: _zod.z.object(postMediaTypeByIdCopyBody.shape)
25569
25723
  });
@@ -25574,7 +25728,7 @@ var copyMediaTypeOutputSchema = _zod.z.object({
25574
25728
  var CopyMediaTypeTool = {
25575
25729
  name: "copy-media-type",
25576
25730
  description: "Copy a media type to a new location",
25577
- inputSchema: inputSchema39.shape,
25731
+ inputSchema: inputSchema40.shape,
25578
25732
  outputSchema: copyMediaTypeOutputSchema.shape,
25579
25733
  slices: ["copy"],
25580
25734
  handler: (async (model) => {
@@ -25584,7 +25738,7 @@ var CopyMediaTypeTool = {
25584
25738
  validateStatus: () => true
25585
25739
  });
25586
25740
  if (response.status === 201) {
25587
- const locationHeader = _optionalChain([response, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97["location"]]) || _optionalChain([response, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99["Location"]]);
25741
+ const locationHeader = _optionalChain([response, 'access', _90 => _90.headers, 'optionalAccess', _91 => _91["location"]]) || _optionalChain([response, 'access', _92 => _92.headers, 'optionalAccess', _93 => _93["Location"]]);
25588
25742
  let createdId = "";
25589
25743
  if (locationHeader) {
25590
25744
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25639,14 +25793,14 @@ var get_media_type_available_compositions_default = _mcpserversdk.withStandardDe
25639
25793
 
25640
25794
 
25641
25795
 
25642
- var inputSchema40 = _zod.z.object({
25796
+ var inputSchema41 = _zod.z.object({
25643
25797
  id: putMediaTypeByIdParams.shape.id,
25644
25798
  data: _zod.z.object(putMediaTypeByIdBody.shape)
25645
25799
  });
25646
25800
  var UpdateMediaTypeTool = {
25647
25801
  name: "update-media-type",
25648
25802
  description: "Updates a media type by Id",
25649
- inputSchema: inputSchema40.shape,
25803
+ inputSchema: inputSchema41.shape,
25650
25804
  annotations: { idempotentHint: true },
25651
25805
  slices: ["update"],
25652
25806
  handler: (async (model) => {
@@ -25664,14 +25818,14 @@ var update_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
25664
25818
 
25665
25819
 
25666
25820
 
25667
- var inputSchema41 = _zod.z.object({
25821
+ var inputSchema42 = _zod.z.object({
25668
25822
  id: _zod.z.string().uuid(),
25669
25823
  data: _zod.z.object(putMediaTypeByIdMoveBody.shape)
25670
25824
  });
25671
25825
  var MoveMediaTypeTool = {
25672
25826
  name: "move-media-type",
25673
25827
  description: "Move a media type to a new location",
25674
- inputSchema: inputSchema41.shape,
25828
+ inputSchema: inputSchema42.shape,
25675
25829
  annotations: { idempotentHint: true },
25676
25830
  slices: ["move"],
25677
25831
  handler: (async (model) => {
@@ -25794,7 +25948,7 @@ var CreateMemberTool = {
25794
25948
  validateStatus: () => true
25795
25949
  });
25796
25950
  if (response.status === 201) {
25797
- const locationHeader = _optionalChain([response, 'access', _100 => _100.headers, 'optionalAccess', _101 => _101["location"]]) || _optionalChain([response, 'access', _102 => _102.headers, 'optionalAccess', _103 => _103["Location"]]);
25951
+ const locationHeader = _optionalChain([response, 'access', _94 => _94.headers, 'optionalAccess', _95 => _95["location"]]) || _optionalChain([response, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97["Location"]]);
25798
25952
  let createdId = model.id || "";
25799
25953
  if (locationHeader) {
25800
25954
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25867,14 +26021,14 @@ var delete_member_default = _mcpserversdk.withStandardDecorators.call(void 0, De
25867
26021
 
25868
26022
 
25869
26023
 
25870
- var inputSchema42 = _zod.z.object({
26024
+ var inputSchema43 = _zod.z.object({
25871
26025
  id: putMemberByIdParams.shape.id,
25872
26026
  data: _zod.z.object(putMemberByIdBody.shape)
25873
26027
  });
25874
26028
  var UpdateMemberTool = {
25875
26029
  name: "update-member",
25876
26030
  description: "Updates a member by Id",
25877
- inputSchema: inputSchema42.shape,
26031
+ inputSchema: inputSchema43.shape,
25878
26032
  annotations: { idempotentHint: true },
25879
26033
  slices: ["update"],
25880
26034
  handler: (async (model) => {
@@ -25892,7 +26046,7 @@ var update_member_default = _mcpserversdk.withStandardDecorators.call(void 0, Up
25892
26046
 
25893
26047
 
25894
26048
 
25895
- var inputSchema43 = _zod.z.object({
26049
+ var inputSchema44 = _zod.z.object({
25896
26050
  id: putMemberByIdValidateParams.shape.id,
25897
26051
  data: _zod.z.object(putMemberByIdValidateBody.shape)
25898
26052
  });
@@ -25900,7 +26054,7 @@ var ValidateMemberUpdateTool = {
25900
26054
  name: "validate-member-update",
25901
26055
  description: `Validates member data before updating using the Umbraco API.
25902
26056
  Use this endpoint to validate member data structure, properties, and business rules before attempting to update an existing member.`,
25903
- inputSchema: inputSchema43.shape,
26057
+ inputSchema: inputSchema44.shape,
25904
26058
  annotations: { readOnlyHint: true },
25905
26059
  slices: ["validate"],
25906
26060
  handler: (async (model) => {
@@ -25960,12 +26114,12 @@ var get_member_are_referenced_default = _mcpserversdk.withStandardDecorators.cal
25960
26114
 
25961
26115
 
25962
26116
 
25963
- var inputSchema44 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
26117
+ var inputSchema45 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
25964
26118
  var GetMemberByIdReferencedByTool = {
25965
26119
  name: "get-member-by-id-referenced-by",
25966
26120
  description: `Get items that reference a specific member
25967
26121
  Use this to find all content, documents, or other items that are currently referencing a specific member account.`,
25968
- inputSchema: inputSchema44.shape,
26122
+ inputSchema: inputSchema45.shape,
25969
26123
  outputSchema: getMemberByIdReferencedByResponse.shape,
25970
26124
  annotations: { readOnlyHint: true },
25971
26125
  slices: ["references"],
@@ -25983,12 +26137,12 @@ var get_member_by_id_referenced_by_default = _mcpserversdk.withStandardDecorator
25983
26137
 
25984
26138
 
25985
26139
 
25986
- var inputSchema45 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
26140
+ var inputSchema46 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
25987
26141
  var GetMemberByIdReferencedDescendantsTool = {
25988
26142
  name: "get-member-by-id-referenced-descendants",
25989
26143
  description: `Get descendant references for a member
25990
26144
  Use this to find all descendant references that are being referenced for a specific member account.`,
25991
- inputSchema: inputSchema45.shape,
26145
+ inputSchema: inputSchema46.shape,
25992
26146
  outputSchema: getMemberByIdReferencedDescendantsResponse.shape,
25993
26147
  annotations: { readOnlyHint: true },
25994
26148
  slices: ["references"],
@@ -26252,14 +26406,14 @@ var create_member_group_default = _mcpserversdk.withStandardDecorators.call(void
26252
26406
 
26253
26407
 
26254
26408
 
26255
- var inputSchema46 = {
26409
+ var inputSchema47 = {
26256
26410
  id: putMemberGroupByIdParams.shape.id,
26257
26411
  data: _zod.z.object(putMemberGroupByIdBody.shape)
26258
26412
  };
26259
26413
  var UpdateMemberGroupTool = {
26260
26414
  name: "update-member-group",
26261
26415
  description: "Updates a member group by Id",
26262
- inputSchema: inputSchema46,
26416
+ inputSchema: inputSchema47,
26263
26417
  annotations: {
26264
26418
  idempotentHint: true
26265
26419
  },
@@ -26343,7 +26497,7 @@ var CreateMemberTypeTool = {
26343
26497
  validateStatus: () => true
26344
26498
  });
26345
26499
  if (response.status === 201) {
26346
- const locationHeader = _optionalChain([response, 'access', _104 => _104.headers, 'optionalAccess', _105 => _105["location"]]) || _optionalChain([response, 'access', _106 => _106.headers, 'optionalAccess', _107 => _107["Location"]]);
26500
+ const locationHeader = _optionalChain([response, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99["location"]]) || _optionalChain([response, 'access', _100 => _100.headers, 'optionalAccess', _101 => _101["Location"]]);
26347
26501
  let createdId = model.id || "";
26348
26502
  if (locationHeader) {
26349
26503
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -26468,14 +26622,14 @@ var delete_member_type_default = _mcpserversdk.withStandardDecorators.call(void
26468
26622
 
26469
26623
 
26470
26624
 
26471
- var inputSchema47 = _zod.z.object({
26625
+ var inputSchema48 = _zod.z.object({
26472
26626
  id: putMemberTypeByIdParams.shape.id,
26473
26627
  data: _zod.z.object(putMemberTypeByIdBody.shape)
26474
26628
  });
26475
26629
  var UpdateMemberTypeTool = {
26476
26630
  name: "update-member-type",
26477
26631
  description: "Updates a member type by id",
26478
- inputSchema: inputSchema47.shape,
26632
+ inputSchema: inputSchema48.shape,
26479
26633
  annotations: { idempotentHint: true },
26480
26634
  slices: ["update"],
26481
26635
  handler: (async (model) => {
@@ -26493,7 +26647,7 @@ var update_member_type_default = _mcpserversdk.withStandardDecorators.call(void
26493
26647
 
26494
26648
 
26495
26649
 
26496
- var inputSchema48 = _zod.z.object({
26650
+ var inputSchema49 = _zod.z.object({
26497
26651
  id: _zod.z.string().uuid()
26498
26652
  });
26499
26653
  var copyMemberTypeOutputSchema = _zod.z.object({
@@ -26503,7 +26657,7 @@ var copyMemberTypeOutputSchema = _zod.z.object({
26503
26657
  var CopyMemberTypeTool = {
26504
26658
  name: "copy-member-type",
26505
26659
  description: "Copy a member type to a new location",
26506
- inputSchema: inputSchema48.shape,
26660
+ inputSchema: inputSchema49.shape,
26507
26661
  outputSchema: copyMemberTypeOutputSchema.shape,
26508
26662
  slices: ["copy"],
26509
26663
  handler: (async (model) => {
@@ -26513,7 +26667,7 @@ var CopyMemberTypeTool = {
26513
26667
  validateStatus: () => true
26514
26668
  });
26515
26669
  if (response.status === 201) {
26516
- const locationHeader = _optionalChain([response, 'access', _108 => _108.headers, 'optionalAccess', _109 => _109["location"]]) || _optionalChain([response, 'access', _110 => _110.headers, 'optionalAccess', _111 => _111["Location"]]);
26670
+ const locationHeader = _optionalChain([response, 'access', _102 => _102.headers, 'optionalAccess', _103 => _103["location"]]) || _optionalChain([response, 'access', _104 => _104.headers, 'optionalAccess', _105 => _105["Location"]]);
26517
26671
  let createdId = "";
26518
26672
  if (locationHeader) {
26519
26673
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -26873,7 +27027,7 @@ var CreatePartialViewTool = {
26873
27027
  validateStatus: () => true
26874
27028
  });
26875
27029
  if (response.status === 201) {
26876
- const locationHeader = _optionalChain([response, 'access', _112 => _112.headers, 'optionalAccess', _113 => _113["location"]]) || _optionalChain([response, 'access', _114 => _114.headers, 'optionalAccess', _115 => _115["Location"]]);
27030
+ const locationHeader = _optionalChain([response, 'access', _106 => _106.headers, 'optionalAccess', _107 => _107["location"]]) || _optionalChain([response, 'access', _108 => _108.headers, 'optionalAccess', _109 => _109["Location"]]);
26877
27031
  let createdPath = "";
26878
27032
  if (locationHeader) {
26879
27033
  const pathMatch = locationHeader.match(/partial-view\/(.+)$/);
@@ -26920,7 +27074,7 @@ var CreatePartialViewFolderTool = {
26920
27074
  validateStatus: () => true
26921
27075
  });
26922
27076
  if (response.status === 201) {
26923
- const locationHeader = _optionalChain([response, 'access', _116 => _116.headers, 'optionalAccess', _117 => _117["location"]]) || _optionalChain([response, 'access', _118 => _118.headers, 'optionalAccess', _119 => _119["Location"]]);
27077
+ const locationHeader = _optionalChain([response, 'access', _110 => _110.headers, 'optionalAccess', _111 => _111["location"]]) || _optionalChain([response, 'access', _112 => _112.headers, 'optionalAccess', _113 => _113["Location"]]);
26924
27078
  let createdPath = "";
26925
27079
  if (locationHeader) {
26926
27080
  const pathMatch = locationHeader.match(/partial-view\/folder\/(.+)$/);
@@ -27321,14 +27475,20 @@ var PropertyTypeCollection = {
27321
27475
  var GetAllRedirectsTool = {
27322
27476
  name: "get-all-redirects",
27323
27477
  description: `Gets all redirects from the Umbraco server.
27324
- Returns a list of redirects with their details.`,
27325
- inputSchema: {},
27478
+
27479
+ Returns a list of redirects with their details. Use "filter" to search redirects by original or
27480
+ destination URL.
27481
+
27482
+ Results are paginated (100 per page by default). Check the returned "total" against the number of
27483
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
27484
+ to page through the remaining redirects.`,
27485
+ inputSchema: getRedirectManagementQueryParams.shape,
27326
27486
  outputSchema: getRedirectManagementResponse.shape,
27327
27487
  annotations: { readOnlyHint: true },
27328
27488
  slices: ["list"],
27329
- handler: (async () => {
27489
+ handler: (async (params) => {
27330
27490
  return _mcpserversdk.executeGetApiCall.call(void 0,
27331
- (client) => client.getRedirectManagement(void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27491
+ (client) => client.getRedirectManagement(params, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27332
27492
  );
27333
27493
  })
27334
27494
  };
@@ -27717,7 +27877,7 @@ var CreateScriptTool = {
27717
27877
  validateStatus: () => true
27718
27878
  });
27719
27879
  if (response.status === 201) {
27720
- const locationHeader = _optionalChain([response, 'access', _120 => _120.headers, 'optionalAccess', _121 => _121["location"]]) || _optionalChain([response, 'access', _122 => _122.headers, 'optionalAccess', _123 => _123["Location"]]);
27880
+ const locationHeader = _optionalChain([response, 'access', _114 => _114.headers, 'optionalAccess', _115 => _115["location"]]) || _optionalChain([response, 'access', _116 => _116.headers, 'optionalAccess', _117 => _117["Location"]]);
27721
27881
  let createdPath = "";
27722
27882
  if (locationHeader) {
27723
27883
  const pathMatch = locationHeader.match(/script\/(.+)$/);
@@ -27764,7 +27924,7 @@ var CreateScriptFolderTool = {
27764
27924
  validateStatus: () => true
27765
27925
  });
27766
27926
  if (response.status === 201) {
27767
- const locationHeader = _optionalChain([response, 'access', _124 => _124.headers, 'optionalAccess', _125 => _125["location"]]) || _optionalChain([response, 'access', _126 => _126.headers, 'optionalAccess', _127 => _127["Location"]]);
27927
+ const locationHeader = _optionalChain([response, 'access', _118 => _118.headers, 'optionalAccess', _119 => _119["location"]]) || _optionalChain([response, 'access', _120 => _120.headers, 'optionalAccess', _121 => _121["Location"]]);
27768
27928
  let createdPath = "";
27769
27929
  if (locationHeader) {
27770
27930
  const pathMatch = locationHeader.match(/script\/folder\/(.+)$/);
@@ -28361,7 +28521,7 @@ var CreateStylesheetTool = {
28361
28521
  validateStatus: () => true
28362
28522
  });
28363
28523
  if (response.status === 201) {
28364
- const locationHeader = _optionalChain([response, 'access', _128 => _128.headers, 'optionalAccess', _129 => _129["location"]]) || _optionalChain([response, 'access', _130 => _130.headers, 'optionalAccess', _131 => _131["Location"]]);
28524
+ const locationHeader = _optionalChain([response, 'access', _122 => _122.headers, 'optionalAccess', _123 => _123["location"]]) || _optionalChain([response, 'access', _124 => _124.headers, 'optionalAccess', _125 => _125["Location"]]);
28365
28525
  let createdPath = "";
28366
28526
  if (locationHeader) {
28367
28527
  const pathMatch = locationHeader.match(/stylesheet\/(.+)$/);
@@ -28408,7 +28568,7 @@ var CreateStylesheetFolderTool = {
28408
28568
  validateStatus: () => true
28409
28569
  });
28410
28570
  if (response.status === 201) {
28411
- const locationHeader = _optionalChain([response, 'access', _132 => _132.headers, 'optionalAccess', _133 => _133["location"]]) || _optionalChain([response, 'access', _134 => _134.headers, 'optionalAccess', _135 => _135["Location"]]);
28571
+ const locationHeader = _optionalChain([response, 'access', _126 => _126.headers, 'optionalAccess', _127 => _127["location"]]) || _optionalChain([response, 'access', _128 => _128.headers, 'optionalAccess', _129 => _129["Location"]]);
28412
28572
  let createdPath = "";
28413
28573
  if (locationHeader) {
28414
28574
  const pathMatch = locationHeader.match(/stylesheet\/folder\/(.+)$/);
@@ -28772,7 +28932,7 @@ var CreateTemplateTool = {
28772
28932
  validateStatus: () => true
28773
28933
  });
28774
28934
  if (response.status === 201) {
28775
- const locationHeader = _optionalChain([response, 'access', _136 => _136.headers, 'optionalAccess', _137 => _137["location"]]) || _optionalChain([response, 'access', _138 => _138.headers, 'optionalAccess', _139 => _139["Location"]]);
28935
+ const locationHeader = _optionalChain([response, 'access', _130 => _130.headers, 'optionalAccess', _131 => _131["location"]]) || _optionalChain([response, 'access', _132 => _132.headers, 'optionalAccess', _133 => _133["Location"]]);
28776
28936
  let createdId = "";
28777
28937
  if (locationHeader) {
28778
28938
  const idMatch = locationHeader.match(/template\/([a-f0-9-]+)$/i);
@@ -29586,14 +29746,14 @@ var get_user_batch_default = _mcpserversdk.withStandardDecorators.call(void 0, G
29586
29746
 
29587
29747
 
29588
29748
 
29589
- var inputSchema49 = _zod.z.object({
29749
+ var inputSchema50 = _zod.z.object({
29590
29750
  ...postUserAvatarByIdParams.shape,
29591
29751
  ...postUserAvatarByIdBody.shape
29592
29752
  });
29593
29753
  var UploadUserAvatarByIdTool = {
29594
29754
  name: "upload-user-avatar-by-id",
29595
29755
  description: "Uploads an avatar for a specific user by ID (admin only or self-service)",
29596
- inputSchema: inputSchema49.shape,
29756
+ inputSchema: inputSchema50.shape,
29597
29757
  slices: ["update"],
29598
29758
  handler: (async ({ id, file }) => {
29599
29759
  return _mcpserversdk.executeVoidApiCall.call(void 0,
@@ -29700,7 +29860,7 @@ var CreateUserDataTool = {
29700
29860
  validateStatus: () => true
29701
29861
  });
29702
29862
  if (response.status === 201) {
29703
- const locationHeader = _optionalChain([response, 'access', _140 => _140.headers, 'optionalAccess', _141 => _141["location"]]) || _optionalChain([response, 'access', _142 => _142.headers, 'optionalAccess', _143 => _143["Location"]]);
29863
+ const locationHeader = _optionalChain([response, 'access', _134 => _134.headers, 'optionalAccess', _135 => _135["location"]]) || _optionalChain([response, 'access', _136 => _136.headers, 'optionalAccess', _137 => _137["Location"]]);
29704
29864
  let createdId = "";
29705
29865
  if (locationHeader) {
29706
29866
  const idMatch = locationHeader.match(/user-data\/([a-f0-9-]+)$/i);
@@ -29938,7 +30098,7 @@ var CreateUserGroupTool = {
29938
30098
  validateStatus: () => true
29939
30099
  });
29940
30100
  if (response.status === 201) {
29941
- const locationHeader = _optionalChain([response, 'access', _144 => _144.headers, 'optionalAccess', _145 => _145["location"]]) || _optionalChain([response, 'access', _146 => _146.headers, 'optionalAccess', _147 => _147["Location"]]);
30101
+ const locationHeader = _optionalChain([response, 'access', _138 => _138.headers, 'optionalAccess', _139 => _139["location"]]) || _optionalChain([response, 'access', _140 => _140.headers, 'optionalAccess', _141 => _141["Location"]]);
29942
30102
  let createdId = "";
29943
30103
  if (locationHeader) {
29944
30104
  const idMatch = locationHeader.match(/user-group\/([a-f0-9-]+)$/i);
@@ -30236,7 +30396,7 @@ var CreateWebhookTool = {
30236
30396
  validateStatus: () => true
30237
30397
  });
30238
30398
  if (response.status === 201) {
30239
- const locationHeader = _optionalChain([response, 'access', _148 => _148.headers, 'optionalAccess', _149 => _149["location"]]) || _optionalChain([response, 'access', _150 => _150.headers, 'optionalAccess', _151 => _151["Location"]]);
30399
+ const locationHeader = _optionalChain([response, 'access', _142 => _142.headers, 'optionalAccess', _143 => _143["location"]]) || _optionalChain([response, 'access', _144 => _144.headers, 'optionalAccess', _145 => _145["Location"]]);
30240
30400
  let createdId = "";
30241
30401
  if (locationHeader) {
30242
30402
  const idMatch = locationHeader.match(/webhook\/([a-f0-9-]+)$/i);
@@ -30265,16 +30425,25 @@ var create_webhook_default = _mcpserversdk.withStandardDecorators.call(void 0, C
30265
30425
 
30266
30426
 
30267
30427
 
30428
+
30429
+ var inputSchema51 = _zod.z.object({
30430
+ ...getWebhookByIdLogsParams.shape,
30431
+ ...getWebhookByIdLogsQueryParams.shape
30432
+ });
30268
30433
  var GetWebhookLogsTool = {
30269
30434
  name: "get-webhook-logs",
30270
- description: "Gets logs for a specific webhook",
30271
- inputSchema: getWebhookByIdLogsParams.shape,
30435
+ description: `Gets logs for a specific webhook.
30436
+
30437
+ Results are paginated (100 per page by default). Check the returned "total" against the number of
30438
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
30439
+ to page through the remaining logs.`,
30440
+ inputSchema: inputSchema51.shape,
30272
30441
  outputSchema: getWebhookByIdLogsResponse.shape,
30273
30442
  annotations: { readOnlyHint: true },
30274
30443
  slices: ["read"],
30275
- handler: (async ({ id }) => {
30444
+ handler: (async ({ id, skip, take }) => {
30276
30445
  return _mcpserversdk.executeGetApiCall.call(void 0,
30277
- (client) => client.getWebhookByIdLogs(id, void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
30446
+ (client) => client.getWebhookByIdLogs(id, { skip, take }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
30278
30447
  );
30279
30448
  })
30280
30449
  };
@@ -30473,4 +30642,4 @@ var allSliceNames = [...toolSliceNames, "other"];
30473
30642
 
30474
30643
 
30475
30644
  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;
30476
- //# sourceMappingURL=chunk-R2HBS7YH.cjs.map
30645
+ //# sourceMappingURL=chunk-FYAOUFDE.cjs.map