@umbraco-cms/mcp-dev 18.1.8 → 18.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -16022,6 +16021,8 @@ var get_document_urls_default = _mcpserversdk.withStandardDecorators.call(void 0
16022
16021
 
16023
16022
 
16024
16023
 
16024
+
16025
+
16025
16026
  var documentTypeSchemaOutputSchema = _zod.z.object({
16026
16027
  schema: _zod.z.unknown()
16027
16028
  });
@@ -16045,6 +16046,13 @@ IMPORTANT: Use this tool BEFORE creating documents to understand the expected pr
16045
16046
  id,
16046
16047
  _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
16047
16048
  );
16049
+ if (typeof response.status !== "number") {
16050
+ console.warn(
16051
+ "[get-document-type-schema] API response had no numeric status; treating as success. Did the generated client's CAPTURE_RAW_HTTP_RESPONSE wiring change?"
16052
+ );
16053
+ } else if (response.status < 200 || response.status >= 300) {
16054
+ throw new (0, _mcpserversdk.UmbracoApiError)(_mcpserversdk.toProblemDetails.call(void 0, response));
16055
+ }
16048
16056
  return _mcpserversdk.createToolResult.call(void 0, { schema: response.data });
16049
16057
  }
16050
16058
  };
@@ -16080,7 +16088,7 @@ var search_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
16080
16088
 
16081
16089
 
16082
16090
 
16083
- var inputSchema3 = _zod.z.object({
16091
+ var inputSchema4 = _zod.z.object({
16084
16092
  ...getCollectionDocumentByIdParams.shape,
16085
16093
  ...getCollectionDocumentByIdQueryParams.shape
16086
16094
  });
@@ -16088,7 +16096,7 @@ var GetCollectionDocumentByIdTool = {
16088
16096
  name: "get-collection-document-by-id",
16089
16097
  description: `Get a collection of document items
16090
16098
  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,
16099
+ inputSchema: inputSchema4.shape,
16092
16100
  outputSchema: getCollectionDocumentByIdResponse.shape,
16093
16101
  annotations: {
16094
16102
  readOnlyHint: true
@@ -16167,7 +16175,7 @@ var get_document_are_referenced_default = _mcpserversdk.withStandardDecorators.c
16167
16175
 
16168
16176
 
16169
16177
 
16170
- var inputSchema4 = _zod.z.object({
16178
+ var inputSchema5 = _zod.z.object({
16171
16179
  ...getDocumentByIdReferencedByParams.shape,
16172
16180
  ...getDocumentByIdReferencedByQueryParams.shape
16173
16181
  });
@@ -16175,7 +16183,7 @@ var GetDocumentByIdReferencedByTool = {
16175
16183
  name: "get-document-by-id-referenced-by",
16176
16184
  description: `Get items that reference a specific document item
16177
16185
  Use this to find all content, documents, or other items that are currently referencing a specific document item.`,
16178
- inputSchema: inputSchema4.shape,
16186
+ inputSchema: inputSchema5.shape,
16179
16187
  outputSchema: getDocumentByIdReferencedByResponse.shape,
16180
16188
  annotations: {
16181
16189
  readOnlyHint: true
@@ -16196,7 +16204,7 @@ var get_document_by_id_referenced_by_default = _mcpserversdk.withStandardDecorat
16196
16204
 
16197
16205
 
16198
16206
 
16199
- var inputSchema5 = _zod.z.object({
16207
+ var inputSchema6 = _zod.z.object({
16200
16208
  ...getDocumentByIdReferencedDescendantsParams.shape,
16201
16209
  ...getDocumentByIdReferencedDescendantsQueryParams.shape
16202
16210
  });
@@ -16209,7 +16217,7 @@ var GetDocumentByIdReferencedDescendantsTool = {
16209
16217
  \u2022 Impact analysis: Before deleting a document folder, see what content would be affected
16210
16218
  \u2022 Dependency tracking: Find all content using documents from a specific folder hierarchy
16211
16219
  \u2022 Content auditing: Identify which descendant document items are actually being used`,
16212
- inputSchema: inputSchema5.shape,
16220
+ inputSchema: inputSchema6.shape,
16213
16221
  outputSchema: getDocumentByIdReferencedDescendantsResponse.shape,
16214
16222
  annotations: {
16215
16223
  readOnlyHint: true
@@ -16230,7 +16238,7 @@ var get_document_by_id_referenced_descendants_default = _mcpserversdk.withStanda
16230
16238
 
16231
16239
 
16232
16240
 
16233
- var inputSchema6 = _zod.z.object({
16241
+ var inputSchema7 = _zod.z.object({
16234
16242
  ...getDocumentByIdAvailableSegmentOptionsParams.shape,
16235
16243
  ...getDocumentByIdAvailableSegmentOptionsQueryParams.shape
16236
16244
  });
@@ -16244,7 +16252,7 @@ var GetDocumentAvailableSegmentOptionsTool = {
16244
16252
  \u2022 Understanding what content variations are available for a document
16245
16253
  \u2022 Determining which segments can be used when creating or editing document content
16246
16254
  \u2022 Viewing segment names, aliases, and associated cultures`,
16247
- inputSchema: inputSchema6.shape,
16255
+ inputSchema: inputSchema7.shape,
16248
16256
  outputSchema: getDocumentByIdAvailableSegmentOptionsResponse.shape,
16249
16257
  annotations: {
16250
16258
  readOnlyHint: true
@@ -16313,14 +16321,14 @@ var get_recycle_bin_document_referenced_by_default = _mcpserversdk.withStandardD
16313
16321
 
16314
16322
 
16315
16323
 
16316
- var inputSchema7 = {
16324
+ var inputSchema8 = {
16317
16325
  id: postDocumentByIdPublicAccessParams.shape.id,
16318
16326
  data: _zod.z.object(postDocumentByIdPublicAccessBody.shape)
16319
16327
  };
16320
16328
  var PostDocumentPublicAccessTool = {
16321
16329
  name: "post-document-public-access",
16322
16330
  description: "Adds public access settings to a document by Id.",
16323
- inputSchema: inputSchema7,
16331
+ inputSchema: inputSchema8,
16324
16332
  slices: ["public-access"],
16325
16333
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.PublicAccess),
16326
16334
  handler: (async (model) => {
@@ -16401,7 +16409,7 @@ var CopyDocumentTool = {
16401
16409
  validateStatus: () => true
16402
16410
  });
16403
16411
  if (response.status === 201) {
16404
- const location = _optionalChain([response, 'access', _15 => _15.headers, 'optionalAccess', _16 => _16.location]) || "";
16412
+ const location = _optionalChain([response, 'access', _8 => _8.headers, 'optionalAccess', _9 => _9.location]) || "";
16405
16413
  const newId = location.split("/").pop() || "";
16406
16414
  const output = { id: newId };
16407
16415
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -16545,7 +16553,7 @@ var CreateDocumentTool = {
16545
16553
  template = { id: model.templateId };
16546
16554
  } else {
16547
16555
  const docType = await client.getDocumentTypeById(model.documentTypeId);
16548
- template = _optionalChain([docType, 'access', _17 => _17.defaultTemplate, 'optionalAccess', _18 => _18.id]) ? { id: docType.defaultTemplate.id } : null;
16556
+ template = _optionalChain([docType, 'access', _10 => _10.defaultTemplate, 'optionalAccess', _11 => _11.id]) ? { id: docType.defaultTemplate.id } : null;
16549
16557
  }
16550
16558
  const payload = {
16551
16559
  id: documentId,
@@ -16723,7 +16731,7 @@ var CreateAndPublishDocumentTool = {
16723
16731
  template = { id: model.templateId };
16724
16732
  } else {
16725
16733
  const docType = await client.getDocumentTypeById(model.documentTypeId);
16726
- template = _optionalChain([docType, 'access', _19 => _19.defaultTemplate, 'optionalAccess', _20 => _20.id]) ? { id: docType.defaultTemplate.id } : null;
16734
+ template = _optionalChain([docType, 'access', _12 => _12.defaultTemplate, 'optionalAccess', _13 => _13.id]) ? { id: docType.defaultTemplate.id } : null;
16727
16735
  }
16728
16736
  const payload = {
16729
16737
  id: documentId,
@@ -16761,14 +16769,14 @@ var create_and_publish_document_default = _mcpserversdk.withStandardDecorators.c
16761
16769
 
16762
16770
 
16763
16771
 
16764
- var inputSchema8 = {
16772
+ var inputSchema9 = {
16765
16773
  id: putDocumentByIdPublicAccessParams.shape.id,
16766
16774
  data: _zod.z.object(putDocumentByIdPublicAccessBody.shape)
16767
16775
  };
16768
16776
  var PutDocumentPublicAccessTool = {
16769
16777
  name: "put-document-public-access",
16770
16778
  description: "Updates public access settings for a document by Id.",
16771
- inputSchema: inputSchema8,
16779
+ inputSchema: inputSchema9,
16772
16780
  annotations: {
16773
16781
  idempotentHint: true
16774
16782
  },
@@ -16789,7 +16797,7 @@ var put_document_public_access_default = _mcpserversdk.withStandardDecorators.ca
16789
16797
 
16790
16798
 
16791
16799
 
16792
- var inputSchema9 = {
16800
+ var inputSchema10 = {
16793
16801
  id: putDocumentByIdDomainsParams.shape.id,
16794
16802
  data: _zod.z.object(putDocumentByIdDomainsBody.shape)
16795
16803
  };
@@ -16797,7 +16805,7 @@ var PutDocumentDomainsTool = {
16797
16805
  name: "put-document-domains",
16798
16806
  description: `Updates the domains assigned to a document by Id. Default value of the defaultIsoCode is null.
16799
16807
  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,
16808
+ inputSchema: inputSchema10,
16801
16809
  annotations: {
16802
16810
  idempotentHint: true
16803
16811
  },
@@ -16818,14 +16826,14 @@ var put_document_domains_default = _mcpserversdk.withStandardDecorators.call(voi
16818
16826
 
16819
16827
 
16820
16828
 
16821
- var inputSchema10 = {
16829
+ var inputSchema11 = {
16822
16830
  id: putDocumentByIdNotificationsParams.shape.id,
16823
16831
  data: _zod.z.object(putDocumentByIdNotificationsBody.shape)
16824
16832
  };
16825
16833
  var PutDocumentNotificationsTool = {
16826
16834
  name: "put-document-notifications",
16827
16835
  description: "Updates the notifications for a document by Id.",
16828
- inputSchema: inputSchema10,
16836
+ inputSchema: inputSchema11,
16829
16837
  annotations: {
16830
16838
  idempotentHint: true
16831
16839
  },
@@ -16843,7 +16851,7 @@ var put_document_notifications_default = _mcpserversdk.withStandardDecorators.ca
16843
16851
 
16844
16852
 
16845
16853
 
16846
- var inputSchema11 = {
16854
+ var inputSchema12 = {
16847
16855
  id: _zod.z.string().uuid(),
16848
16856
  data: _zod.z.object(putDocumentByIdPublishWithDescendantsBody.shape)
16849
16857
  };
@@ -16851,7 +16859,7 @@ var PublishDocumentWithDescendantsTool = {
16851
16859
  name: "publish-document-with-descendants",
16852
16860
  description: `Publishes a document and its descendants by Id. This is an asynchronous operation that may take time for large document trees.
16853
16861
  The tool will poll for completion and return the final result when finished.`,
16854
- inputSchema: inputSchema11,
16862
+ inputSchema: inputSchema12,
16855
16863
  annotations: {},
16856
16864
  slices: ["publish"],
16857
16865
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
@@ -16930,14 +16938,14 @@ var publish_document_with_descendants_default = _mcpserversdk.withStandardDecora
16930
16938
 
16931
16939
 
16932
16940
 
16933
- var inputSchema12 = {
16941
+ var inputSchema13 = {
16934
16942
  id: _zod.z.string().uuid(),
16935
16943
  data: _zod.z.object(putDocumentByIdUnpublishBody.shape)
16936
16944
  };
16937
16945
  var UnpublishDocumentTool = {
16938
16946
  name: "unpublish-document",
16939
16947
  description: "Unpublishes a document by Id.",
16940
- inputSchema: inputSchema12,
16948
+ inputSchema: inputSchema13,
16941
16949
  annotations: {},
16942
16950
  slices: ["publish"],
16943
16951
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Unpublish),
@@ -16978,7 +16986,7 @@ var sort_document_default = _mcpserversdk.withStandardDecorators.call(void 0, So
16978
16986
 
16979
16987
 
16980
16988
 
16981
- var inputSchema13 = {
16989
+ var inputSchema14 = {
16982
16990
  id: putDocumentByIdSortChildrenParams.shape.id,
16983
16991
  data: _zod.z.object(putDocumentByIdSortChildrenBody.shape)
16984
16992
  };
@@ -16989,7 +16997,7 @@ var SortDocumentChildrenTool = {
16989
16997
  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
16998
 
16991
16999
  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,
17000
+ inputSchema: inputSchema14,
16993
17001
  annotations: {},
16994
17002
  slices: ["sort"],
16995
17003
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
@@ -17033,14 +17041,14 @@ var sort_document_root_children_default = _mcpserversdk.withStandardDecorators.c
17033
17041
 
17034
17042
 
17035
17043
 
17036
- var inputSchema14 = {
17044
+ var inputSchema15 = {
17037
17045
  id: _zod.z.string().uuid(),
17038
17046
  data: _zod.z.object(putDocumentByIdMoveBody.shape)
17039
17047
  };
17040
17048
  var MoveDocumentTool = {
17041
17049
  name: "move-document",
17042
17050
  description: "Move a document to a new location",
17043
- inputSchema: inputSchema14,
17051
+ inputSchema: inputSchema15,
17044
17052
  annotations: {},
17045
17053
  slices: ["move"],
17046
17054
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Move),
@@ -17059,7 +17067,7 @@ var move_document_default = _mcpserversdk.withStandardDecorators.call(void 0, Mo
17059
17067
 
17060
17068
 
17061
17069
 
17062
- var inputSchema15 = {
17070
+ var inputSchema16 = {
17063
17071
  id: _zod.z.string().uuid(),
17064
17072
  data: _zod.z.object(putDocumentByIdPublishBody.shape)
17065
17073
  };
@@ -17069,7 +17077,7 @@ var PublishDocumentTool = {
17069
17077
  This function bypasses approval workflows and publishes directly to the live site.
17070
17078
  When the culture is not provided, the default culture is null.
17071
17079
  When the schedule is not provided, the default schedule is null.`,
17072
- inputSchema: inputSchema15,
17080
+ inputSchema: inputSchema16,
17073
17081
  annotations: {},
17074
17082
  slices: ["publish"],
17075
17083
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
@@ -17157,7 +17165,7 @@ var move_to_recycle_bin_default = _mcpserversdk.withStandardDecorators.call(void
17157
17165
 
17158
17166
 
17159
17167
 
17160
- var inputSchema16 = {
17168
+ var inputSchema17 = {
17161
17169
  id: putDocumentByIdParams.shape.id,
17162
17170
  data: _zod.z.object(putDocumentByIdBody.shape),
17163
17171
  confirmClearValues: _zod.z.boolean().optional().describe(
@@ -17184,21 +17192,21 @@ var UpdateDocumentTool = {
17184
17192
  Always include the full, unmodified "values" array from the document you just read unless you
17185
17193
  intend to clear every property. If the document currently has values, an empty "values" array is
17186
17194
  rejected unless "confirmClearValues" is set to true.`,
17187
- inputSchema: inputSchema16,
17195
+ inputSchema: inputSchema17,
17188
17196
  annotations: {
17189
17197
  idempotentHint: true
17190
17198
  },
17191
17199
  slices: ["update"],
17192
17200
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Update),
17193
17201
  handler: (async (model) => {
17194
- const incomingValues = _optionalChain([model, 'access', _21 => _21.data, 'optionalAccess', _22 => _22.values]);
17202
+ const incomingValues = _optionalChain([model, 'access', _14 => _14.data, 'optionalAccess', _15 => _15.values]);
17195
17203
  if (Array.isArray(incomingValues) && incomingValues.length === 0 && !model.confirmClearValues) {
17196
17204
  const client = UmbracoManagementClient3.getClient();
17197
17205
  let currentDocument;
17198
17206
  try {
17199
17207
  currentDocument = await client.getDocumentById(model.id);
17200
17208
  } catch (error) {
17201
- const status = _optionalChain([error, 'optionalAccess', _23 => _23.response, 'optionalAccess', _24 => _24.status]);
17209
+ const status = _optionalChain([error, 'optionalAccess', _16 => _16.response, 'optionalAccess', _17 => _17.status]);
17202
17210
  if (status !== 404) {
17203
17211
  throw error;
17204
17212
  }
@@ -17224,7 +17232,7 @@ var update_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
17224
17232
 
17225
17233
 
17226
17234
 
17227
- var inputSchema17 = {
17235
+ var inputSchema18 = {
17228
17236
  id: putDocumentByIdUpdateAndPublishParams.shape.id,
17229
17237
  data: _zod.z.object(putDocumentByIdUpdateAndPublishBody.shape)
17230
17238
  };
@@ -17245,7 +17253,7 @@ var UpdateAndPublishDocumentTool = {
17245
17253
  - Always read the current document value first
17246
17254
  - Only update the required values
17247
17255
  - Don't miss any properties from the original document`,
17248
- inputSchema: inputSchema17,
17256
+ inputSchema: inputSchema18,
17249
17257
  annotations: {
17250
17258
  idempotentHint: true
17251
17259
  },
@@ -18163,14 +18171,14 @@ function removeRteBlockElement(markup, contentKey) {
18163
18171
  return markup.slice(0, start) + markup.slice(end);
18164
18172
  }
18165
18173
  function getBlockTypeConfigurations(dataTypeValues) {
18166
- const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _25 => _25.find, 'call', _26 => _26((v) => v.alias === "blocks"), 'optionalAccess', _27 => _27.value]);
18174
+ const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _18 => _18.find, 'call', _19 => _19((v) => v.alias === "blocks"), 'optionalAccess', _20 => _20.value]);
18167
18175
  return Array.isArray(blocks) ? blocks : [];
18168
18176
  }
18169
18177
  function findBlockTypeConfiguration(configs, contentElementTypeKey) {
18170
18178
  return configs.find((c) => c.contentElementTypeKey === contentElementTypeKey);
18171
18179
  }
18172
18180
  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)]);
18181
+ return _optionalChain([findBlockTypeConfiguration, 'call', _21 => _21(configs, parentContentTypeKey), 'optionalAccess', _22 => _22.areas, 'optionalAccess', _23 => _23.find, 'call', _24 => _24((a) => a.key === areaKey)]);
18174
18182
  }
18175
18183
  function checkAllowedInArea(blockConfig, area) {
18176
18184
  if (blockConfig.allowInAreas === false) {
@@ -18312,7 +18320,7 @@ var createDocumentBlockSchema = {
18312
18320
  properties: _zod.z.array(blockPropertyValueSchema).optional().describe("Content property values for the new block"),
18313
18321
  settings: _zod.z.object({
18314
18322
  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"),
18323
+ }).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
18324
  placement: placementSchema.optional().describe("Where to place the block relative to siblings (default: append)"),
18317
18325
  grid: gridSchema.optional().describe("BlockGrid-only layout options. Rejected for BlockList/RichText properties")
18318
18326
  };
@@ -18367,15 +18375,15 @@ var CreateDocumentBlockTool = {
18367
18375
  const { kind, container, blockConfigs } = ctx;
18368
18376
  const placement = _nullishCoalesce(model.placement, () => ( { position: "append" }));
18369
18377
  const contentProperties = _nullishCoalesce(model.properties, () => ( []));
18370
- const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _32 => _32.settings, 'optionalAccess', _33 => _33.properties]), () => ( []));
18378
+ const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _25 => _25.settings, 'optionalAccess', _26 => _26.properties]), () => ( []));
18371
18379
  if (model.grid && kind !== "BlockGrid") {
18372
18380
  throw new (0, _mcpserversdk.ToolValidationError)({
18373
18381
  title: "grid options not supported",
18374
18382
  detail: `'grid' only applies to BlockGrid properties; '${model.propertyAlias}' is a ${kind} property`
18375
18383
  });
18376
18384
  }
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]);
18385
+ const areaKey = _optionalChain([model, 'access', _27 => _27.grid, 'optionalAccess', _28 => _28.areaKey]);
18386
+ const parentContentKey = _optionalChain([model, 'access', _29 => _29.grid, 'optionalAccess', _30 => _30.parentContentKey]);
18379
18387
  if (!!areaKey !== !!parentContentKey) {
18380
18388
  throw new (0, _mcpserversdk.ToolValidationError)({
18381
18389
  title: "Incomplete area target",
@@ -18425,7 +18433,7 @@ var CreateDocumentBlockTool = {
18425
18433
  title: "Area not found",
18426
18434
  detail: `Area '${key}' is not configured for block type '${parentBlock.contentTypeKey}'`,
18427
18435
  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)) }))
18436
+ availableAreas: (_nullishCoalesce(_optionalChain([findBlockTypeConfiguration, 'call', _31 => _31(blockConfigs, parentBlock.contentTypeKey), 'optionalAccess', _32 => _32.areas]), () => ( []))).map((a) => ({ key: a.key, alias: _nullishCoalesce(a.alias, () => ( null)) }))
18429
18437
  }
18430
18438
  });
18431
18439
  }
@@ -18447,7 +18455,7 @@ var CreateDocumentBlockTool = {
18447
18455
  detail: `No block with contentKey '${placement.contentKey}' exists in property '${model.propertyAlias}'`
18448
18456
  });
18449
18457
  }
18450
- if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _40 => _40.parent, 'optionalAccess', _41 => _41.contentKey]) !== parentContentKey)) {
18458
+ if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _33 => _33.parent, 'optionalAccess', _34 => _34.contentKey]) !== parentContentKey)) {
18451
18459
  throw new (0, _mcpserversdk.ToolValidationError)({
18452
18460
  title: "Sibling not in target area",
18453
18461
  detail: `Block '${placement.contentKey}' is not in area '${areaKey}' of block '${parentContentKey}'`
@@ -18488,12 +18496,12 @@ var CreateDocumentBlockTool = {
18488
18496
  }
18489
18497
  }
18490
18498
  const contentKey = _uuid.v4.call(void 0, );
18491
- const settingsKey = model.settings ? _uuid.v4.call(void 0, ) : null;
18499
+ const settingsKey = blockConfig.settingsElementTypeKey ? _uuid.v4.call(void 0, ) : null;
18492
18500
  const layoutEntry = buildLayoutEntry(kind, {
18493
18501
  contentKey,
18494
18502
  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]),
18503
+ columnSpan: _optionalChain([model, 'access', _35 => _35.grid, 'optionalAccess', _36 => _36.columnSpan]),
18504
+ rowSpan: _optionalChain([model, 'access', _37 => _37.grid, 'optionalAccess', _38 => _38.rowSpan]),
18497
18505
  areaKeys: (_nullishCoalesce(blockConfig.areas, () => ( []))).map((a) => a.key)
18498
18506
  });
18499
18507
  const elementType = await client.getDocumentTypeById(model.contentTypeKey);
@@ -18983,6 +18991,8 @@ var createDocumentTypeSchema = _zod.z.object({
18983
18991
  compositions: _zod.z.array(_zod.z.string().uuid("Must be a valid document type UUID")).default([]),
18984
18992
  allowedDocumentTypes: _zod.z.array(_zod.z.string().uuid("Must be a valid document type UUID")).default([]),
18985
18993
  collection: _zod.z.string().uuid("Must be a valid collection data type UUID").optional(),
18994
+ variesByCulture: _zod.z.boolean().optional(),
18995
+ variesBySegment: _zod.z.boolean().optional(),
18986
18996
  properties: _zod.z.array(
18987
18997
  _zod.z.object({
18988
18998
  name: _zod.z.string().min(1, "Property name is required"),
@@ -18992,7 +19002,9 @@ var createDocumentTypeSchema = _zod.z.object({
18992
19002
  group: _zod.z.string().optional(),
18993
19003
  description: _zod.z.string().optional(),
18994
19004
  mandatory: _zod.z.boolean().optional(),
18995
- sortOrder: _zod.z.number().int().nonnegative().max(2147483647).optional()
19005
+ sortOrder: _zod.z.number().int().nonnegative().max(2147483647).optional(),
19006
+ variesByCulture: _zod.z.boolean().optional(),
19007
+ variesBySegment: _zod.z.boolean().optional()
18996
19008
  }).refine(
18997
19009
  (data) => data.tab || data.group,
18998
19010
  {
@@ -19027,7 +19039,11 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
19027
19039
  8. Properties optionally accept 'description', 'mandatory' and 'sortOrder':
19028
19040
  - 'description' sets the property's help text (defaults to none)
19029
19041
  - '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)`,
19042
+ - 'sortOrder' controls the property's position (defaults to the next position not already claimed by another property's explicit sortOrder)
19043
+ 9. 'variesByCulture' and 'variesBySegment' (both default to false) can be set on the document type and on each property:
19044
+ - 'variesByCulture' enables language/culture variation
19045
+ - 'variesBySegment' enables segment variation (e.g. for A/B testing or audience targeting)
19046
+ - A property only varies if the document type has the same flag set; otherwise Umbraco ignores the property's flag`,
19031
19047
  inputSchema: createDocumentTypeSchema.shape,
19032
19048
  outputSchema: createDocumentTypeOutputSchema.shape,
19033
19049
  slices: ["create"],
@@ -19075,8 +19091,8 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
19075
19091
  regExMessage: null,
19076
19092
  mandatoryMessage: null
19077
19093
  },
19078
- variesByCulture: false,
19079
- variesBySegment: false,
19094
+ variesByCulture: _nullishCoalesce(prop.variesByCulture, () => ( false)),
19095
+ variesBySegment: _nullishCoalesce(prop.variesBySegment, () => ( false)),
19080
19096
  container: containerId ? { id: containerId } : void 0
19081
19097
  };
19082
19098
  });
@@ -19098,8 +19114,8 @@ IMPORTANT: IMPLEMENTATION REQUIREMENTS
19098
19114
  })),
19099
19115
  allowedAsRoot: model.allowedAsRoot,
19100
19116
  allowedInLibrary: true,
19101
- variesByCulture: false,
19102
- variesBySegment: false,
19117
+ variesByCulture: _nullishCoalesce(model.variesByCulture, () => ( false)),
19118
+ variesBySegment: _nullishCoalesce(model.variesBySegment, () => ( false)),
19103
19119
  allowedTemplates: [],
19104
19120
  allowedDocumentTypes: model.allowedDocumentTypes.map((id, index) => ({
19105
19121
  documentType: { id },
@@ -19227,7 +19243,7 @@ var CopyDocumentTypeTool = {
19227
19243
  validateStatus: () => true
19228
19244
  });
19229
19245
  if (response.status === 201) {
19230
- const location = _optionalChain([response, 'access', _46 => _46.headers, 'optionalAccess', _47 => _47.location]) || "";
19246
+ const location = _optionalChain([response, 'access', _39 => _39.headers, 'optionalAccess', _40 => _40.location]) || "";
19231
19247
  const newId = location.split("/").pop() || "";
19232
19248
  const output = { id: newId };
19233
19249
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -20677,14 +20693,14 @@ var get_element_configuration_default = _mcpserversdk.withStandardDecorators.cal
20677
20693
 
20678
20694
 
20679
20695
 
20680
- var inputSchema18 = {
20696
+ var inputSchema19 = {
20681
20697
  id: getElementByIdAuditLogParams.shape.id,
20682
20698
  ...getElementByIdAuditLogQueryParams.shape
20683
20699
  };
20684
20700
  var GetElementAuditLogTool = {
20685
20701
  name: "get-element-audit-log",
20686
20702
  description: "Fetches the audit log for an element by Id.",
20687
- inputSchema: inputSchema18,
20703
+ inputSchema: inputSchema19,
20688
20704
  outputSchema: getElementByIdAuditLogResponse.shape,
20689
20705
  annotations: {
20690
20706
  readOnlyHint: true
@@ -20732,7 +20748,7 @@ var get_element_are_referenced_default = _mcpserversdk.withStandardDecorators.ca
20732
20748
 
20733
20749
 
20734
20750
 
20735
- var inputSchema19 = _zod.z.object({
20751
+ var inputSchema20 = _zod.z.object({
20736
20752
  ...getElementByIdReferencedByParams.shape,
20737
20753
  ...getElementByIdReferencedByQueryParams.shape
20738
20754
  });
@@ -20740,7 +20756,7 @@ var GetElementByIdReferencedByTool = {
20740
20756
  name: "get-element-by-id-referenced-by",
20741
20757
  description: `Get items that reference a specific element item
20742
20758
  Use this to find all content, documents, or other items that are currently referencing a specific element item.`,
20743
- inputSchema: inputSchema19.shape,
20759
+ inputSchema: inputSchema20.shape,
20744
20760
  outputSchema: getElementByIdReferencedByResponse.shape,
20745
20761
  annotations: {
20746
20762
  readOnlyHint: true
@@ -20762,7 +20778,7 @@ var get_element_by_id_referenced_by_default = _mcpserversdk.withStandardDecorato
20762
20778
 
20763
20779
 
20764
20780
 
20765
- var inputSchema20 = _zod.z.object({
20781
+ var inputSchema21 = _zod.z.object({
20766
20782
  ...getElementFolderByIdReferencedDescendantsParams.shape,
20767
20783
  ...getElementFolderByIdReferencedDescendantsQueryParams.shape
20768
20784
  });
@@ -20775,7 +20791,7 @@ var GetElementFolderReferencedDescendantsTool = {
20775
20791
  \u2022 Impact analysis: Before deleting an element folder, see what content would be affected
20776
20792
  \u2022 Dependency tracking: Find all content using elements from a specific folder hierarchy
20777
20793
  \u2022 Content auditing: Identify which descendant element items are actually being used`,
20778
- inputSchema: inputSchema20.shape,
20794
+ inputSchema: inputSchema21.shape,
20779
20795
  outputSchema: getElementFolderByIdReferencedDescendantsResponse.shape,
20780
20796
  annotations: {
20781
20797
  readOnlyHint: true
@@ -21476,7 +21492,7 @@ var CopyElementTool = {
21476
21492
  validateStatus: () => true
21477
21493
  });
21478
21494
  if (response.status === 201) {
21479
- const location = _optionalChain([response, 'access', _48 => _48.headers, 'optionalAccess', _49 => _49.location]) || "";
21495
+ const location = _optionalChain([response, 'access', _41 => _41.headers, 'optionalAccess', _42 => _42.location]) || "";
21480
21496
  const newId = location.split("/").pop() || "";
21481
21497
  const output = { id: newId };
21482
21498
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -21544,7 +21560,7 @@ var rollback_element_version_default = _mcpserversdk.withStandardDecorators.call
21544
21560
 
21545
21561
 
21546
21562
 
21547
- var inputSchema21 = {
21563
+ var inputSchema22 = {
21548
21564
  id: putElementByIdParams.shape.id,
21549
21565
  data: _zod.z.object(putElementByIdBody.shape)
21550
21566
  };
@@ -21560,7 +21576,7 @@ var UpdateElementTool = {
21560
21576
  - Always read the current element first with get-element-by-id.
21561
21577
  - Send the full set of values AND variants \u2014 they are replaced wholesale, so any value or variant you omit is removed.
21562
21578
  - Include one variant entry per existing culture; do not drop variants you aren't changing.`,
21563
- inputSchema: inputSchema21,
21579
+ inputSchema: inputSchema22,
21564
21580
  annotations: {
21565
21581
  idempotentHint: true
21566
21582
  },
@@ -21581,7 +21597,7 @@ var update_element_default = _mcpserversdk.withStandardDecorators.call(void 0, U
21581
21597
 
21582
21598
 
21583
21599
 
21584
- var inputSchema22 = {
21600
+ var inputSchema23 = {
21585
21601
  id: putElementByIdUpdateAndPublishParams.shape.id,
21586
21602
  data: _zod.z.object(putElementByIdUpdateAndPublishBody.shape)
21587
21603
  };
@@ -21599,7 +21615,7 @@ var UpdateAndPublishElementTool = {
21599
21615
  - Always read the current element first with get-element-by-id.
21600
21616
  - Send the full set of values AND variants \u2014 they are replaced wholesale, so any value or variant you omit is removed.
21601
21617
  - Include one variant entry per existing culture; do not drop variants you aren't changing.`,
21602
- inputSchema: inputSchema22,
21618
+ inputSchema: inputSchema23,
21603
21619
  annotations: {
21604
21620
  idempotentHint: true
21605
21621
  },
@@ -22047,14 +22063,14 @@ var update_element_block_property_default = _mcpserversdk.withStandardDecorators
22047
22063
 
22048
22064
 
22049
22065
 
22050
- var inputSchema23 = {
22066
+ var inputSchema24 = {
22051
22067
  id: _zod.z.string().uuid(),
22052
22068
  data: _zod.z.object(putElementByIdMoveBody.shape)
22053
22069
  };
22054
22070
  var MoveElementTool = {
22055
22071
  name: "move-element",
22056
22072
  description: "Move an element to a new location",
22057
- inputSchema: inputSchema23,
22073
+ inputSchema: inputSchema24,
22058
22074
  annotations: {},
22059
22075
  slices: ["move"],
22060
22076
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Move),
@@ -22094,7 +22110,7 @@ var move_element_to_recycle_bin_default = _mcpserversdk.withStandardDecorators.c
22094
22110
 
22095
22111
 
22096
22112
 
22097
- var inputSchema24 = {
22113
+ var inputSchema25 = {
22098
22114
  id: _zod.z.string().uuid(),
22099
22115
  data: _zod.z.object(putElementByIdPublishBody.shape)
22100
22116
  };
@@ -22104,7 +22120,7 @@ var PublishElementTool = {
22104
22120
  This function bypasses approval workflows and publishes directly to the live site.
22105
22121
  When the culture is not provided, the default culture is null.
22106
22122
  When the schedule is not provided, the default schedule is null.`,
22107
- inputSchema: inputSchema24,
22123
+ inputSchema: inputSchema25,
22108
22124
  annotations: {},
22109
22125
  slices: ["publish"],
22110
22126
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Publish),
@@ -22126,14 +22142,14 @@ var publish_element_default = _mcpserversdk.withStandardDecorators.call(void 0,
22126
22142
 
22127
22143
 
22128
22144
 
22129
- var inputSchema25 = {
22145
+ var inputSchema26 = {
22130
22146
  id: _zod.z.string().uuid(),
22131
22147
  data: _zod.z.object(putElementByIdUnpublishBody.shape)
22132
22148
  };
22133
22149
  var UnpublishElementTool = {
22134
22150
  name: "unpublish-element",
22135
22151
  description: "Unpublishes an element by Id.",
22136
- inputSchema: inputSchema25,
22152
+ inputSchema: inputSchema26,
22137
22153
  annotations: {},
22138
22154
  slices: ["publish"],
22139
22155
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Unpublish),
@@ -22153,14 +22169,14 @@ var unpublish_element_default = _mcpserversdk.withStandardDecorators.call(void 0
22153
22169
 
22154
22170
 
22155
22171
 
22156
- var inputSchema26 = {
22172
+ var inputSchema27 = {
22157
22173
  id: _zod.z.string().uuid(),
22158
22174
  data: _zod.z.object(putElementByIdValidateBody.shape)
22159
22175
  };
22160
22176
  var ValidateElementUpdateTool = {
22161
22177
  name: "validate-element-update",
22162
22178
  description: "Validates the request model for updating an element without actually updating it.",
22163
- inputSchema: inputSchema26,
22179
+ inputSchema: inputSchema27,
22164
22180
  annotations: {},
22165
22181
  slices: ["update"],
22166
22182
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Update),
@@ -22391,14 +22407,14 @@ var update_element_folder_default = _mcpserversdk.withStandardDecorators.call(vo
22391
22407
 
22392
22408
 
22393
22409
 
22394
- var inputSchema27 = {
22410
+ var inputSchema28 = {
22395
22411
  id: _zod.z.string().uuid(),
22396
22412
  data: _zod.z.object(putElementFolderByIdMoveBody.shape)
22397
22413
  };
22398
22414
  var MoveElementFolderTool = {
22399
22415
  name: "move-element-folder",
22400
22416
  description: "Moves an element folder to a new location",
22401
- inputSchema: inputSchema27,
22417
+ inputSchema: inputSchema28,
22402
22418
  annotations: {},
22403
22419
  slices: ["move", "folders"],
22404
22420
  enabled: (user) => user.fallbackPermissions.includes(UmbracoElementPermissions.Move),
@@ -22957,14 +22973,14 @@ var create_language_default = _mcpserversdk.withStandardDecorators.call(void 0,
22957
22973
 
22958
22974
 
22959
22975
 
22960
- var inputSchema28 = {
22976
+ var inputSchema29 = {
22961
22977
  isoCode: putLanguageByIsoCodeParams.shape.isoCode,
22962
22978
  data: _zod.z.object(putLanguageByIsoCodeBody.shape)
22963
22979
  };
22964
22980
  var UpdateLanguageTool = {
22965
22981
  name: "update-language",
22966
22982
  description: "Updates an existing language by ISO code",
22967
- inputSchema: inputSchema28,
22983
+ inputSchema: inputSchema29,
22968
22984
  annotations: {
22969
22985
  idempotentHint: true
22970
22986
  },
@@ -23432,7 +23448,7 @@ function getExtensionFromMimeType(mimeType) {
23432
23448
  return extension ? `.${extension}` : void 0;
23433
23449
  }
23434
23450
  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");
23451
+ const isSvg = _optionalChain([filePath, 'optionalAccess', _43 => _43.toLowerCase, 'call', _44 => _44(), 'access', _45 => _45.endsWith, 'call', _46 => _46(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _47 => _47.toLowerCase, 'call', _48 => _48(), 'access', _49 => _49.endsWith, 'call', _50 => _50(".svg")]) || fileName.toLowerCase().endsWith(".svg");
23436
23452
  if (isSvg && mediaTypeName === _mcpserversdk.MEDIA_TYPE_IMAGE) {
23437
23453
  console.warn(`SVG detected - using ${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS} media type instead of ${_mcpserversdk.MEDIA_TYPE_IMAGE}`);
23438
23454
  return _mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS;
@@ -23586,8 +23602,8 @@ async function uploadMediaFile(client, params) {
23586
23602
  });
23587
23603
  } catch (error) {
23588
23604
  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}`);
23605
+ const errorData = _optionalChain([err, 'access', _51 => _51.response, 'optionalAccess', _52 => _52.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
23606
+ throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _53 => _53.response, 'optionalAccess', _54 => _54.status]) || "Unknown error"} - ${errorData}`);
23591
23607
  }
23592
23608
  const valueStructure = buildValueStructure(validatedMediaTypeName, params.temporaryFileId);
23593
23609
  let response;
@@ -23607,12 +23623,12 @@ async function uploadMediaFile(client, params) {
23607
23623
  }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
23608
23624
  } catch (error) {
23609
23625
  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}`);
23626
+ throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _55 => _55.response, 'optionalAccess', _56 => _56.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _57 => _57.response, 'optionalAccess', _58 => _58.data])) || err.message}`);
23611
23627
  }
23612
23628
  if (response.status < 200 || response.status >= 300) {
23613
23629
  throw new Error(`Request failed with status code ${response.status}`);
23614
23630
  }
23615
- const locationHeader = _optionalChain([response, 'access', _66 => _66.headers, 'optionalAccess', _67 => _67.location]) || _optionalChain([response, 'access', _68 => _68.headers, 'optionalAccess', _69 => _69.Location]);
23631
+ const locationHeader = _optionalChain([response, 'access', _59 => _59.headers, 'optionalAccess', _60 => _60.location]) || _optionalChain([response, 'access', _61 => _61.headers, 'optionalAccess', _62 => _62.Location]);
23616
23632
  if (!locationHeader) {
23617
23633
  throw new Error("No Location header in response - cannot determine created media ID");
23618
23634
  }
@@ -23637,36 +23653,22 @@ function buildSourceTypeSection(allowFilePath, otherSources) {
23637
23653
  // src/umbraco-api/tools/media/post/helpers/streaming-upload.ts
23638
23654
 
23639
23655
 
23640
- var _mcphosted = require('@umbraco-cms/mcp-hosted');
23641
23656
 
23642
23657
 
23643
23658
 
23644
23659
 
23645
23660
 
23646
23661
 
23647
- var authContext = null;
23648
- function isStreamingAuthContextConfigured() {
23649
- return authContext !== null;
23662
+ function isStreamingUploadAvailable() {
23663
+ return _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _63 => _63.umbracoAuth]) !== void 0;
23650
23664
  }
23651
23665
  async function resolveAuth() {
23652
- if (!authContext) {
23653
- throw new Error(
23654
- "Streaming auth context not configured. setStreamingAuthContext() must be called in worker init()."
23655
- );
23656
- }
23657
- const entry = await _mcphosted.getStoredUmbracoToken.call(void 0, authContext.env.OAUTH_KV, authContext.tokenKey);
23658
- if (!_optionalChain([entry, 'optionalAccess', _70 => _70.tokens, 'optionalAccess', _71 => _71.access_token])) {
23659
- throw new Error("No Umbraco access token in KV. Reconnect the MCP connector.");
23660
- }
23661
- const baseUrl = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([entry, 'access', _72 => _72.site, 'optionalAccess', _73 => _73.serverUrl]), () => ( _optionalChain([entry, 'access', _74 => _74.site, 'optionalAccess', _75 => _75.baseUrl]))), () => ( authContext.env.UMBRACO_SERVER_URL)), () => ( authContext.env.UMBRACO_BASE_URL));
23662
- if (!baseUrl) {
23663
- throw new Error("No Umbraco base URL resolvable from site or env.");
23664
- }
23665
- return { accessToken: entry.tokens.access_token, baseUrl: _mcpserversdk.normalizeBaseUrl.call(void 0, baseUrl) };
23666
+ const { accessToken, baseUrl } = await _mcpserversdk.getSessionUmbracoAuth.call(void 0, );
23667
+ return { accessToken, baseUrl: _mcpserversdk.normalizeBaseUrl.call(void 0, baseUrl) };
23666
23668
  }
23667
23669
  function ensureExtension(name, contentType, urlPath) {
23668
23670
  if (name.includes(".")) return name;
23669
- const fromUrl = _optionalChain([urlPath, 'access', _76 => _76.match, 'call', _77 => _77(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _78 => _78[0]]);
23671
+ const fromUrl = _optionalChain([urlPath, 'access', _64 => _64.match, 'call', _65 => _65(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _66 => _66[0]]);
23670
23672
  if (fromUrl) return `${name}${fromUrl}`;
23671
23673
  if (contentType) {
23672
23674
  const subtype = contentType.split(";")[0].split("/")[1];
@@ -23686,10 +23688,7 @@ async function streamingUploadFromUrl(params) {
23686
23688
  );
23687
23689
  const [mediaTypeId, auth] = await Promise.all([
23688
23690
  fetchMediaTypeId(client, validatedMediaTypeName),
23689
- (async () => {
23690
- await client.getTemporaryFileConfiguration().catch(() => void 0);
23691
- return resolveAuth();
23692
- })()
23691
+ resolveAuth()
23693
23692
  ]);
23694
23693
  const { accessToken, baseUrl } = auth;
23695
23694
  const ctl = new AbortController();
@@ -23775,8 +23774,8 @@ Content-Type: ${sourceContentType}\r
23775
23774
  if (response.status < 200 || response.status >= 300) {
23776
23775
  throw new Error(`postMedia failed with status ${response.status}`);
23777
23776
  }
23778
- const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _79 => _79.headers, 'optionalAccess', _80 => _80.location]), () => ( _optionalChain([response, 'access', _81 => _81.headers, 'optionalAccess', _82 => _82.Location])));
23779
- const idMatch = _optionalChain([locationHeader, 'optionalAccess', _83 => _83.match, 'call', _84 => _84(/\/([a-f0-9-]{36})$/i)]);
23777
+ const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _67 => _67.headers, 'optionalAccess', _68 => _68.location]), () => ( _optionalChain([response, 'access', _69 => _69.headers, 'optionalAccess', _70 => _70.Location])));
23778
+ const idMatch = _optionalChain([locationHeader, 'optionalAccess', _71 => _71.match, 'call', _72 => _72(/\/([a-f0-9-]{36})$/i)]);
23780
23779
  if (!idMatch) {
23781
23780
  throw new Error(
23782
23781
  `Could not extract media id from Location header: ${_nullishCoalesce(locationHeader, () => ( "(missing)"))}`
@@ -23881,7 +23880,7 @@ ${filePathSection}
23881
23880
  let effectiveSourceType;
23882
23881
  let effectiveFileUrl = model.fileUrl;
23883
23882
  if (model.sourceType === "file") {
23884
- if (!_optionalChain([model, 'access', _85 => _85.file, 'optionalAccess', _86 => _86.download_url])) {
23883
+ if (!_optionalChain([model, 'access', _73 => _73.file, 'optionalAccess', _74 => _74.download_url])) {
23885
23884
  return _mcpserversdk.createToolResultError.call(void 0, {
23886
23885
  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."
23887
23886
  });
@@ -23891,7 +23890,7 @@ ${filePathSection}
23891
23890
  } else {
23892
23891
  effectiveSourceType = model.sourceType;
23893
23892
  }
23894
- if (effectiveSourceType === "url" && isStreamingAuthContextConfigured()) {
23893
+ if (effectiveSourceType === "url" && isStreamingUploadAvailable()) {
23895
23894
  if (!effectiveFileUrl) {
23896
23895
  return _mcpserversdk.createToolResultError.call(void 0, {
23897
23896
  detail: "Error creating media: fileUrl is required when sourceType is 'url'"
@@ -24020,7 +24019,7 @@ ${filePathSection}
24020
24019
  });
24021
24020
  }
24022
24021
  const client = UmbracoManagementClient3.getClient();
24023
- const streamingAvailable = isStreamingAuthContextConfigured();
24022
+ const streamingAvailable = isStreamingUploadAvailable();
24024
24023
  const results = await mapWithConcurrency(
24025
24024
  model.files,
24026
24025
  UPLOAD_CONCURRENCY,
@@ -24030,7 +24029,7 @@ ${filePathSection}
24030
24029
  let effectiveSourceType;
24031
24030
  let effectiveFileUrl = file.fileUrl;
24032
24031
  if (model.sourceType === "file") {
24033
- if (!_optionalChain([file, 'access', _87 => _87.file, 'optionalAccess', _88 => _88.download_url])) {
24032
+ if (!_optionalChain([file, 'access', _75 => _75.file, 'optionalAccess', _76 => _76.download_url])) {
24034
24033
  return {
24035
24034
  success: false,
24036
24035
  name: file.name,
@@ -24129,7 +24128,7 @@ var CreateMediaFolderTool = {
24129
24128
  if (response.status < 200 || response.status >= 300) {
24130
24129
  throw new Error(`Request failed with status code ${response.status}`);
24131
24130
  }
24132
- const locationHeader = _optionalChain([response, 'access', _89 => _89.headers, 'optionalAccess', _90 => _90.location]) || _optionalChain([response, 'access', _91 => _91.headers, 'optionalAccess', _92 => _92.Location]);
24131
+ const locationHeader = _optionalChain([response, 'access', _77 => _77.headers, 'optionalAccess', _78 => _78.location]) || _optionalChain([response, 'access', _79 => _79.headers, 'optionalAccess', _80 => _80.Location]);
24133
24132
  if (!locationHeader) {
24134
24133
  throw new Error("No Location header in response - cannot determine created folder ID");
24135
24134
  }
@@ -24203,7 +24202,7 @@ var get_media_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0,
24203
24202
 
24204
24203
 
24205
24204
 
24206
- var inputSchema29 = {
24205
+ var inputSchema30 = {
24207
24206
  id: putMediaByIdParams.shape.id,
24208
24207
  data: _zod.z.object(putMediaByIdBody.shape)
24209
24208
  };
@@ -24213,7 +24212,7 @@ var UpdateMediaTool = {
24213
24212
  Always read the current media value first and only update the required values.
24214
24213
  Don't miss any properties from the original media that you are updating.
24215
24214
  This cannot be used for moving media to a new folder. Use the move endpoint to do that.`,
24216
- inputSchema: inputSchema29,
24215
+ inputSchema: inputSchema30,
24217
24216
  annotations: {
24218
24217
  idempotentHint: true
24219
24218
  },
@@ -24299,14 +24298,14 @@ var validate_media_default = _mcpserversdk.withStandardDecorators.call(void 0, V
24299
24298
 
24300
24299
 
24301
24300
 
24302
- var inputSchema30 = {
24301
+ var inputSchema31 = {
24303
24302
  id: putMediaByIdValidateParams.shape.id,
24304
24303
  data: _zod.z.object(putMediaByIdValidateBody.shape)
24305
24304
  };
24306
24305
  var ValidateMediaUpdateTool = {
24307
24306
  name: "validate-media-update",
24308
24307
  description: "Validates media data before updating an existing media item by Id",
24309
- inputSchema: inputSchema30,
24308
+ inputSchema: inputSchema31,
24310
24309
  annotations: { readOnlyHint: true },
24311
24310
  slices: ["validate"],
24312
24311
  handler: (async (model) => {
@@ -24346,7 +24345,7 @@ var sort_media_default = _mcpserversdk.withStandardDecorators.call(void 0, SortM
24346
24345
 
24347
24346
 
24348
24347
 
24349
- var inputSchema31 = {
24348
+ var inputSchema32 = {
24350
24349
  id: putMediaByIdSortChildrenParams.shape.id,
24351
24350
  data: _zod.z.object(putMediaByIdSortChildrenBody.shape)
24352
24351
  };
@@ -24355,7 +24354,7 @@ var SortMediaChildrenTool = {
24355
24354
  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).
24356
24355
 
24357
24356
  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.`,
24358
- inputSchema: inputSchema31,
24357
+ inputSchema: inputSchema32,
24359
24358
  annotations: {},
24360
24359
  slices: ["sort"],
24361
24360
  handler: (async (model) => {
@@ -24420,14 +24419,14 @@ var get_media_by_id_array_default = _mcpserversdk.withStandardDecorators.call(vo
24420
24419
 
24421
24420
 
24422
24421
 
24423
- var inputSchema32 = {
24422
+ var inputSchema33 = {
24424
24423
  id: putMediaByIdMoveParams.shape.id,
24425
24424
  data: _zod.z.object(putMediaByIdMoveBody.shape)
24426
24425
  };
24427
24426
  var MoveMediaTool = {
24428
24427
  name: "move-media",
24429
24428
  description: "Move a media item to a new location",
24430
- inputSchema: inputSchema32,
24429
+ inputSchema: inputSchema33,
24431
24430
  annotations: {
24432
24431
  idempotentHint: true
24433
24432
  },
@@ -24563,14 +24562,14 @@ var get_root_default6 = _mcpserversdk.withStandardDecorators.call(void 0, GetMed
24563
24562
 
24564
24563
 
24565
24564
 
24566
- var inputSchema33 = {
24565
+ var inputSchema34 = {
24567
24566
  id: getMediaByIdAuditLogParams.shape.id,
24568
24567
  ...getMediaByIdAuditLogQueryParams.shape
24569
24568
  };
24570
24569
  var GetMediaAuditLogTool = {
24571
24570
  name: "get-media-audit-log",
24572
24571
  description: "Fetches the audit log for a media item by Id.",
24573
- inputSchema: inputSchema33,
24572
+ inputSchema: inputSchema34,
24574
24573
  outputSchema: getMediaByIdAuditLogResponse.shape,
24575
24574
  annotations: { readOnlyHint: true },
24576
24575
  slices: ["audit"],
@@ -24785,7 +24784,7 @@ var get_media_are_referenced_default = _mcpserversdk.withStandardDecorators.call
24785
24784
 
24786
24785
 
24787
24786
 
24788
- var inputSchema34 = _zod.z.object({
24787
+ var inputSchema35 = _zod.z.object({
24789
24788
  ...getMediaByIdReferencedByParams.shape,
24790
24789
  ...getMediaByIdReferencedByQueryParams.shape
24791
24790
  }).shape;
@@ -24793,7 +24792,7 @@ var GetMediaByIdReferencedByTool = {
24793
24792
  name: "get-media-by-id-referenced-by",
24794
24793
  description: `Get items that reference a specific media item
24795
24794
  Use this to find all content, documents, or other items that are currently referencing a specific media item.`,
24796
- inputSchema: inputSchema34,
24795
+ inputSchema: inputSchema35,
24797
24796
  outputSchema: getMediaByIdReferencedByResponse.shape,
24798
24797
  annotations: { readOnlyHint: true },
24799
24798
  slices: ["references"],
@@ -24812,7 +24811,7 @@ var get_media_by_id_referenced_by_default = _mcpserversdk.withStandardDecorators
24812
24811
 
24813
24812
 
24814
24813
 
24815
- var inputSchema35 = _zod.z.object({
24814
+ var inputSchema36 = _zod.z.object({
24816
24815
  ...getMediaByIdReferencedDescendantsParams.shape,
24817
24816
  ...getMediaByIdReferencedDescendantsQueryParams.shape
24818
24817
  }).shape;
@@ -24825,7 +24824,7 @@ var GetMediaByIdReferencedDescendantsTool = {
24825
24824
  \u2022 Impact analysis: Before deleting a media folder, see what content would be affected
24826
24825
  \u2022 Dependency tracking: Find all content using media from a specific folder hierarchy
24827
24826
  \u2022 Content auditing: Identify which descendant media items are actually being used`,
24828
- inputSchema: inputSchema35,
24827
+ inputSchema: inputSchema36,
24829
24828
  outputSchema: getMediaByIdReferencedDescendantsResponse.shape,
24830
24829
  annotations: { readOnlyHint: true },
24831
24830
  slices: ["references"],
@@ -25039,7 +25038,7 @@ var get_media_type_by_id_default = _mcpserversdk.withStandardDecorators.call(voi
25039
25038
 
25040
25039
 
25041
25040
 
25042
- var inputSchema36 = _zod.z.object({
25041
+ var inputSchema37 = _zod.z.object({
25043
25042
  ids: _zod.z.array(_zod.z.string())
25044
25043
  });
25045
25044
  var outputSchema39 = _zod.z.object({
@@ -25048,7 +25047,7 @@ var outputSchema39 = _zod.z.object({
25048
25047
  var GetMediaTypeByIdsTool = {
25049
25048
  name: "get-media-type-by-ids",
25050
25049
  description: "Gets media types by ids",
25051
- inputSchema: inputSchema36.shape,
25050
+ inputSchema: inputSchema37.shape,
25052
25051
  outputSchema: outputSchema39.shape,
25053
25052
  annotations: { readOnlyHint: true },
25054
25053
  slices: ["list"],
@@ -25161,13 +25160,13 @@ var get_media_type_allowed_at_root_default = _mcpserversdk.withStandardDecorator
25161
25160
 
25162
25161
 
25163
25162
 
25164
- var inputSchema37 = getMediaTypeByIdAllowedChildrenParams.merge(
25163
+ var inputSchema38 = getMediaTypeByIdAllowedChildrenParams.merge(
25165
25164
  getMediaTypeByIdAllowedChildrenQueryParams
25166
25165
  );
25167
25166
  var GetMediaTypeAllowedChildrenTool = {
25168
25167
  name: "get-media-type-allowed-children",
25169
25168
  description: "Gets the media types that are allowed as children of a media type",
25170
- inputSchema: inputSchema37.shape,
25169
+ inputSchema: inputSchema38.shape,
25171
25170
  outputSchema: getMediaTypeByIdAllowedChildrenResponse.shape,
25172
25171
  annotations: { readOnlyHint: true },
25173
25172
  slices: ["configuration"],
@@ -25415,7 +25414,7 @@ var CreateMediaTypeFolderTool = {
25415
25414
  validateStatus: () => true
25416
25415
  });
25417
25416
  if (response.status === 201) {
25418
- const locationHeader = _optionalChain([response, 'access', _93 => _93.headers, 'optionalAccess', _94 => _94["location"]]) || _optionalChain([response, 'access', _95 => _95.headers, 'optionalAccess', _96 => _96["Location"]]);
25417
+ const locationHeader = _optionalChain([response, 'access', _81 => _81.headers, 'optionalAccess', _82 => _82["location"]]) || _optionalChain([response, 'access', _83 => _83.headers, 'optionalAccess', _84 => _84["Location"]]);
25419
25418
  let createdId = model.id || "";
25420
25419
  if (locationHeader) {
25421
25420
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25467,14 +25466,14 @@ var delete_folder_default4 = _mcpserversdk.withStandardDecorators.call(void 0, D
25467
25466
 
25468
25467
 
25469
25468
 
25470
- var inputSchema38 = _zod.z.object({
25469
+ var inputSchema39 = _zod.z.object({
25471
25470
  id: putMediaTypeFolderByIdParams.shape.id,
25472
25471
  data: _zod.z.object(putMediaTypeFolderByIdBody.shape)
25473
25472
  });
25474
25473
  var UpdateMediaTypeFolderTool = {
25475
25474
  name: "update-media-type-folder",
25476
25475
  description: "Updates a media type folder by Id",
25477
- inputSchema: inputSchema38.shape,
25476
+ inputSchema: inputSchema39.shape,
25478
25477
  annotations: { idempotentHint: true },
25479
25478
  slices: ["update", "folders"],
25480
25479
  handler: (async (model) => {
@@ -25550,7 +25549,7 @@ var CreateMediaTypeTool = {
25550
25549
  validateStatus: () => true
25551
25550
  });
25552
25551
  if (response.status === 201) {
25553
- const locationHeader = _optionalChain([response, 'access', _97 => _97.headers, 'optionalAccess', _98 => _98["location"]]) || _optionalChain([response, 'access', _99 => _99.headers, 'optionalAccess', _100 => _100["Location"]]);
25552
+ const locationHeader = _optionalChain([response, 'access', _85 => _85.headers, 'optionalAccess', _86 => _86["location"]]) || _optionalChain([response, 'access', _87 => _87.headers, 'optionalAccess', _88 => _88["Location"]]);
25554
25553
  let createdId = model.id || "";
25555
25554
  if (locationHeader) {
25556
25555
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25580,7 +25579,7 @@ var create_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
25580
25579
 
25581
25580
 
25582
25581
 
25583
- var inputSchema39 = _zod.z.object({
25582
+ var inputSchema40 = _zod.z.object({
25584
25583
  id: _zod.z.string().uuid(),
25585
25584
  data: _zod.z.object(postMediaTypeByIdCopyBody.shape)
25586
25585
  });
@@ -25591,7 +25590,7 @@ var copyMediaTypeOutputSchema = _zod.z.object({
25591
25590
  var CopyMediaTypeTool = {
25592
25591
  name: "copy-media-type",
25593
25592
  description: "Copy a media type to a new location",
25594
- inputSchema: inputSchema39.shape,
25593
+ inputSchema: inputSchema40.shape,
25595
25594
  outputSchema: copyMediaTypeOutputSchema.shape,
25596
25595
  slices: ["copy"],
25597
25596
  handler: (async (model) => {
@@ -25601,7 +25600,7 @@ var CopyMediaTypeTool = {
25601
25600
  validateStatus: () => true
25602
25601
  });
25603
25602
  if (response.status === 201) {
25604
- const locationHeader = _optionalChain([response, 'access', _101 => _101.headers, 'optionalAccess', _102 => _102["location"]]) || _optionalChain([response, 'access', _103 => _103.headers, 'optionalAccess', _104 => _104["Location"]]);
25603
+ const locationHeader = _optionalChain([response, 'access', _89 => _89.headers, 'optionalAccess', _90 => _90["location"]]) || _optionalChain([response, 'access', _91 => _91.headers, 'optionalAccess', _92 => _92["Location"]]);
25605
25604
  let createdId = "";
25606
25605
  if (locationHeader) {
25607
25606
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25656,14 +25655,14 @@ var get_media_type_available_compositions_default = _mcpserversdk.withStandardDe
25656
25655
 
25657
25656
 
25658
25657
 
25659
- var inputSchema40 = _zod.z.object({
25658
+ var inputSchema41 = _zod.z.object({
25660
25659
  id: putMediaTypeByIdParams.shape.id,
25661
25660
  data: _zod.z.object(putMediaTypeByIdBody.shape)
25662
25661
  });
25663
25662
  var UpdateMediaTypeTool = {
25664
25663
  name: "update-media-type",
25665
25664
  description: "Updates a media type by Id",
25666
- inputSchema: inputSchema40.shape,
25665
+ inputSchema: inputSchema41.shape,
25667
25666
  annotations: { idempotentHint: true },
25668
25667
  slices: ["update"],
25669
25668
  handler: (async (model) => {
@@ -25681,14 +25680,14 @@ var update_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
25681
25680
 
25682
25681
 
25683
25682
 
25684
- var inputSchema41 = _zod.z.object({
25683
+ var inputSchema42 = _zod.z.object({
25685
25684
  id: _zod.z.string().uuid(),
25686
25685
  data: _zod.z.object(putMediaTypeByIdMoveBody.shape)
25687
25686
  });
25688
25687
  var MoveMediaTypeTool = {
25689
25688
  name: "move-media-type",
25690
25689
  description: "Move a media type to a new location",
25691
- inputSchema: inputSchema41.shape,
25690
+ inputSchema: inputSchema42.shape,
25692
25691
  annotations: { idempotentHint: true },
25693
25692
  slices: ["move"],
25694
25693
  handler: (async (model) => {
@@ -25811,7 +25810,7 @@ var CreateMemberTool = {
25811
25810
  validateStatus: () => true
25812
25811
  });
25813
25812
  if (response.status === 201) {
25814
- const locationHeader = _optionalChain([response, 'access', _105 => _105.headers, 'optionalAccess', _106 => _106["location"]]) || _optionalChain([response, 'access', _107 => _107.headers, 'optionalAccess', _108 => _108["Location"]]);
25813
+ const locationHeader = _optionalChain([response, 'access', _93 => _93.headers, 'optionalAccess', _94 => _94["location"]]) || _optionalChain([response, 'access', _95 => _95.headers, 'optionalAccess', _96 => _96["Location"]]);
25815
25814
  let createdId = model.id || "";
25816
25815
  if (locationHeader) {
25817
25816
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -25884,14 +25883,14 @@ var delete_member_default = _mcpserversdk.withStandardDecorators.call(void 0, De
25884
25883
 
25885
25884
 
25886
25885
 
25887
- var inputSchema42 = _zod.z.object({
25886
+ var inputSchema43 = _zod.z.object({
25888
25887
  id: putMemberByIdParams.shape.id,
25889
25888
  data: _zod.z.object(putMemberByIdBody.shape)
25890
25889
  });
25891
25890
  var UpdateMemberTool = {
25892
25891
  name: "update-member",
25893
25892
  description: "Updates a member by Id",
25894
- inputSchema: inputSchema42.shape,
25893
+ inputSchema: inputSchema43.shape,
25895
25894
  annotations: { idempotentHint: true },
25896
25895
  slices: ["update"],
25897
25896
  handler: (async (model) => {
@@ -25909,7 +25908,7 @@ var update_member_default = _mcpserversdk.withStandardDecorators.call(void 0, Up
25909
25908
 
25910
25909
 
25911
25910
 
25912
- var inputSchema43 = _zod.z.object({
25911
+ var inputSchema44 = _zod.z.object({
25913
25912
  id: putMemberByIdValidateParams.shape.id,
25914
25913
  data: _zod.z.object(putMemberByIdValidateBody.shape)
25915
25914
  });
@@ -25917,7 +25916,7 @@ var ValidateMemberUpdateTool = {
25917
25916
  name: "validate-member-update",
25918
25917
  description: `Validates member data before updating using the Umbraco API.
25919
25918
  Use this endpoint to validate member data structure, properties, and business rules before attempting to update an existing member.`,
25920
- inputSchema: inputSchema43.shape,
25919
+ inputSchema: inputSchema44.shape,
25921
25920
  annotations: { readOnlyHint: true },
25922
25921
  slices: ["validate"],
25923
25922
  handler: (async (model) => {
@@ -25977,12 +25976,12 @@ var get_member_are_referenced_default = _mcpserversdk.withStandardDecorators.cal
25977
25976
 
25978
25977
 
25979
25978
 
25980
- var inputSchema44 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
25979
+ var inputSchema45 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
25981
25980
  var GetMemberByIdReferencedByTool = {
25982
25981
  name: "get-member-by-id-referenced-by",
25983
25982
  description: `Get items that reference a specific member
25984
25983
  Use this to find all content, documents, or other items that are currently referencing a specific member account.`,
25985
- inputSchema: inputSchema44.shape,
25984
+ inputSchema: inputSchema45.shape,
25986
25985
  outputSchema: getMemberByIdReferencedByResponse.shape,
25987
25986
  annotations: { readOnlyHint: true },
25988
25987
  slices: ["references"],
@@ -26000,12 +25999,12 @@ var get_member_by_id_referenced_by_default = _mcpserversdk.withStandardDecorator
26000
25999
 
26001
26000
 
26002
26001
 
26003
- var inputSchema45 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
26002
+ var inputSchema46 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
26004
26003
  var GetMemberByIdReferencedDescendantsTool = {
26005
26004
  name: "get-member-by-id-referenced-descendants",
26006
26005
  description: `Get descendant references for a member
26007
26006
  Use this to find all descendant references that are being referenced for a specific member account.`,
26008
- inputSchema: inputSchema45.shape,
26007
+ inputSchema: inputSchema46.shape,
26009
26008
  outputSchema: getMemberByIdReferencedDescendantsResponse.shape,
26010
26009
  annotations: { readOnlyHint: true },
26011
26010
  slices: ["references"],
@@ -26269,14 +26268,14 @@ var create_member_group_default = _mcpserversdk.withStandardDecorators.call(void
26269
26268
 
26270
26269
 
26271
26270
 
26272
- var inputSchema46 = {
26271
+ var inputSchema47 = {
26273
26272
  id: putMemberGroupByIdParams.shape.id,
26274
26273
  data: _zod.z.object(putMemberGroupByIdBody.shape)
26275
26274
  };
26276
26275
  var UpdateMemberGroupTool = {
26277
26276
  name: "update-member-group",
26278
26277
  description: "Updates a member group by Id",
26279
- inputSchema: inputSchema46,
26278
+ inputSchema: inputSchema47,
26280
26279
  annotations: {
26281
26280
  idempotentHint: true
26282
26281
  },
@@ -26360,7 +26359,7 @@ var CreateMemberTypeTool = {
26360
26359
  validateStatus: () => true
26361
26360
  });
26362
26361
  if (response.status === 201) {
26363
- const locationHeader = _optionalChain([response, 'access', _109 => _109.headers, 'optionalAccess', _110 => _110["location"]]) || _optionalChain([response, 'access', _111 => _111.headers, 'optionalAccess', _112 => _112["Location"]]);
26362
+ const locationHeader = _optionalChain([response, 'access', _97 => _97.headers, 'optionalAccess', _98 => _98["location"]]) || _optionalChain([response, 'access', _99 => _99.headers, 'optionalAccess', _100 => _100["Location"]]);
26364
26363
  let createdId = model.id || "";
26365
26364
  if (locationHeader) {
26366
26365
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -26485,14 +26484,14 @@ var delete_member_type_default = _mcpserversdk.withStandardDecorators.call(void
26485
26484
 
26486
26485
 
26487
26486
 
26488
- var inputSchema47 = _zod.z.object({
26487
+ var inputSchema48 = _zod.z.object({
26489
26488
  id: putMemberTypeByIdParams.shape.id,
26490
26489
  data: _zod.z.object(putMemberTypeByIdBody.shape)
26491
26490
  });
26492
26491
  var UpdateMemberTypeTool = {
26493
26492
  name: "update-member-type",
26494
26493
  description: "Updates a member type by id",
26495
- inputSchema: inputSchema47.shape,
26494
+ inputSchema: inputSchema48.shape,
26496
26495
  annotations: { idempotentHint: true },
26497
26496
  slices: ["update"],
26498
26497
  handler: (async (model) => {
@@ -26510,7 +26509,7 @@ var update_member_type_default = _mcpserversdk.withStandardDecorators.call(void
26510
26509
 
26511
26510
 
26512
26511
 
26513
- var inputSchema48 = _zod.z.object({
26512
+ var inputSchema49 = _zod.z.object({
26514
26513
  id: _zod.z.string().uuid()
26515
26514
  });
26516
26515
  var copyMemberTypeOutputSchema = _zod.z.object({
@@ -26520,7 +26519,7 @@ var copyMemberTypeOutputSchema = _zod.z.object({
26520
26519
  var CopyMemberTypeTool = {
26521
26520
  name: "copy-member-type",
26522
26521
  description: "Copy a member type to a new location",
26523
- inputSchema: inputSchema48.shape,
26522
+ inputSchema: inputSchema49.shape,
26524
26523
  outputSchema: copyMemberTypeOutputSchema.shape,
26525
26524
  slices: ["copy"],
26526
26525
  handler: (async (model) => {
@@ -26530,7 +26529,7 @@ var CopyMemberTypeTool = {
26530
26529
  validateStatus: () => true
26531
26530
  });
26532
26531
  if (response.status === 201) {
26533
- const locationHeader = _optionalChain([response, 'access', _113 => _113.headers, 'optionalAccess', _114 => _114["location"]]) || _optionalChain([response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116["Location"]]);
26532
+ const locationHeader = _optionalChain([response, 'access', _101 => _101.headers, 'optionalAccess', _102 => _102["location"]]) || _optionalChain([response, 'access', _103 => _103.headers, 'optionalAccess', _104 => _104["Location"]]);
26534
26533
  let createdId = "";
26535
26534
  if (locationHeader) {
26536
26535
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -26890,7 +26889,7 @@ var CreatePartialViewTool = {
26890
26889
  validateStatus: () => true
26891
26890
  });
26892
26891
  if (response.status === 201) {
26893
- const locationHeader = _optionalChain([response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118["location"]]) || _optionalChain([response, 'access', _119 => _119.headers, 'optionalAccess', _120 => _120["Location"]]);
26892
+ const locationHeader = _optionalChain([response, 'access', _105 => _105.headers, 'optionalAccess', _106 => _106["location"]]) || _optionalChain([response, 'access', _107 => _107.headers, 'optionalAccess', _108 => _108["Location"]]);
26894
26893
  let createdPath = "";
26895
26894
  if (locationHeader) {
26896
26895
  const pathMatch = locationHeader.match(/partial-view\/(.+)$/);
@@ -26937,7 +26936,7 @@ var CreatePartialViewFolderTool = {
26937
26936
  validateStatus: () => true
26938
26937
  });
26939
26938
  if (response.status === 201) {
26940
- const locationHeader = _optionalChain([response, 'access', _121 => _121.headers, 'optionalAccess', _122 => _122["location"]]) || _optionalChain([response, 'access', _123 => _123.headers, 'optionalAccess', _124 => _124["Location"]]);
26939
+ const locationHeader = _optionalChain([response, 'access', _109 => _109.headers, 'optionalAccess', _110 => _110["location"]]) || _optionalChain([response, 'access', _111 => _111.headers, 'optionalAccess', _112 => _112["Location"]]);
26941
26940
  let createdPath = "";
26942
26941
  if (locationHeader) {
26943
26942
  const pathMatch = locationHeader.match(/partial-view\/folder\/(.+)$/);
@@ -27338,14 +27337,20 @@ var PropertyTypeCollection = {
27338
27337
  var GetAllRedirectsTool = {
27339
27338
  name: "get-all-redirects",
27340
27339
  description: `Gets all redirects from the Umbraco server.
27341
- Returns a list of redirects with their details.`,
27342
- inputSchema: {},
27340
+
27341
+ Returns a list of redirects with their details. Use "filter" to search redirects by original or
27342
+ destination URL.
27343
+
27344
+ Results are paginated (100 per page by default). Check the returned "total" against the number of
27345
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
27346
+ to page through the remaining redirects.`,
27347
+ inputSchema: getRedirectManagementQueryParams.shape,
27343
27348
  outputSchema: getRedirectManagementResponse.shape,
27344
27349
  annotations: { readOnlyHint: true },
27345
27350
  slices: ["list"],
27346
- handler: (async () => {
27351
+ handler: (async (params) => {
27347
27352
  return _mcpserversdk.executeGetApiCall.call(void 0,
27348
- (client) => client.getRedirectManagement(void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27353
+ (client) => client.getRedirectManagement(params, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27349
27354
  );
27350
27355
  })
27351
27356
  };
@@ -27734,7 +27739,7 @@ var CreateScriptTool = {
27734
27739
  validateStatus: () => true
27735
27740
  });
27736
27741
  if (response.status === 201) {
27737
- const locationHeader = _optionalChain([response, 'access', _125 => _125.headers, 'optionalAccess', _126 => _126["location"]]) || _optionalChain([response, 'access', _127 => _127.headers, 'optionalAccess', _128 => _128["Location"]]);
27742
+ const locationHeader = _optionalChain([response, 'access', _113 => _113.headers, 'optionalAccess', _114 => _114["location"]]) || _optionalChain([response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116["Location"]]);
27738
27743
  let createdPath = "";
27739
27744
  if (locationHeader) {
27740
27745
  const pathMatch = locationHeader.match(/script\/(.+)$/);
@@ -27781,7 +27786,7 @@ var CreateScriptFolderTool = {
27781
27786
  validateStatus: () => true
27782
27787
  });
27783
27788
  if (response.status === 201) {
27784
- const locationHeader = _optionalChain([response, 'access', _129 => _129.headers, 'optionalAccess', _130 => _130["location"]]) || _optionalChain([response, 'access', _131 => _131.headers, 'optionalAccess', _132 => _132["Location"]]);
27789
+ const locationHeader = _optionalChain([response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118["location"]]) || _optionalChain([response, 'access', _119 => _119.headers, 'optionalAccess', _120 => _120["Location"]]);
27785
27790
  let createdPath = "";
27786
27791
  if (locationHeader) {
27787
27792
  const pathMatch = locationHeader.match(/script\/folder\/(.+)$/);
@@ -28378,7 +28383,7 @@ var CreateStylesheetTool = {
28378
28383
  validateStatus: () => true
28379
28384
  });
28380
28385
  if (response.status === 201) {
28381
- const locationHeader = _optionalChain([response, 'access', _133 => _133.headers, 'optionalAccess', _134 => _134["location"]]) || _optionalChain([response, 'access', _135 => _135.headers, 'optionalAccess', _136 => _136["Location"]]);
28386
+ const locationHeader = _optionalChain([response, 'access', _121 => _121.headers, 'optionalAccess', _122 => _122["location"]]) || _optionalChain([response, 'access', _123 => _123.headers, 'optionalAccess', _124 => _124["Location"]]);
28382
28387
  let createdPath = "";
28383
28388
  if (locationHeader) {
28384
28389
  const pathMatch = locationHeader.match(/stylesheet\/(.+)$/);
@@ -28425,7 +28430,7 @@ var CreateStylesheetFolderTool = {
28425
28430
  validateStatus: () => true
28426
28431
  });
28427
28432
  if (response.status === 201) {
28428
- const locationHeader = _optionalChain([response, 'access', _137 => _137.headers, 'optionalAccess', _138 => _138["location"]]) || _optionalChain([response, 'access', _139 => _139.headers, 'optionalAccess', _140 => _140["Location"]]);
28433
+ const locationHeader = _optionalChain([response, 'access', _125 => _125.headers, 'optionalAccess', _126 => _126["location"]]) || _optionalChain([response, 'access', _127 => _127.headers, 'optionalAccess', _128 => _128["Location"]]);
28429
28434
  let createdPath = "";
28430
28435
  if (locationHeader) {
28431
28436
  const pathMatch = locationHeader.match(/stylesheet\/folder\/(.+)$/);
@@ -28789,7 +28794,7 @@ var CreateTemplateTool = {
28789
28794
  validateStatus: () => true
28790
28795
  });
28791
28796
  if (response.status === 201) {
28792
- const locationHeader = _optionalChain([response, 'access', _141 => _141.headers, 'optionalAccess', _142 => _142["location"]]) || _optionalChain([response, 'access', _143 => _143.headers, 'optionalAccess', _144 => _144["Location"]]);
28797
+ const locationHeader = _optionalChain([response, 'access', _129 => _129.headers, 'optionalAccess', _130 => _130["location"]]) || _optionalChain([response, 'access', _131 => _131.headers, 'optionalAccess', _132 => _132["Location"]]);
28793
28798
  let createdId = "";
28794
28799
  if (locationHeader) {
28795
28800
  const idMatch = locationHeader.match(/template\/([a-f0-9-]+)$/i);
@@ -29518,15 +29523,11 @@ var get_user_current_permissions_default = _mcpserversdk.withStandardDecorators.
29518
29523
 
29519
29524
 
29520
29525
 
29521
-
29522
- var outputSchema66 = _zod.z.object({
29523
- items: getUserCurrentPermissionsDocumentResponse
29524
- });
29525
29526
  var GetUserCurrentPermissionsDocumentTool = {
29526
29527
  name: "get-user-current-permissions-document",
29527
29528
  description: "Gets the current user's document permissions for specific documents",
29528
29529
  inputSchema: getUserCurrentPermissionsDocumentQueryParams.shape,
29529
- outputSchema: outputSchema66.shape,
29530
+ outputSchema: getUserCurrentPermissionsDocumentResponse.shape,
29530
29531
  annotations: { readOnlyHint: true },
29531
29532
  slices: ["permissions"],
29532
29533
  handler: (async (params) => {
@@ -29607,14 +29608,14 @@ var get_user_batch_default = _mcpserversdk.withStandardDecorators.call(void 0, G
29607
29608
 
29608
29609
 
29609
29610
 
29610
- var inputSchema49 = _zod.z.object({
29611
+ var inputSchema50 = _zod.z.object({
29611
29612
  ...postUserAvatarByIdParams.shape,
29612
29613
  ...postUserAvatarByIdBody.shape
29613
29614
  });
29614
29615
  var UploadUserAvatarByIdTool = {
29615
29616
  name: "upload-user-avatar-by-id",
29616
29617
  description: "Uploads an avatar for a specific user by ID (admin only or self-service)",
29617
- inputSchema: inputSchema49.shape,
29618
+ inputSchema: inputSchema50.shape,
29618
29619
  slices: ["update"],
29619
29620
  handler: (async ({ id, file }) => {
29620
29621
  return _mcpserversdk.executeVoidApiCall.call(void 0,
@@ -29721,7 +29722,7 @@ var CreateUserDataTool = {
29721
29722
  validateStatus: () => true
29722
29723
  });
29723
29724
  if (response.status === 201) {
29724
- const locationHeader = _optionalChain([response, 'access', _145 => _145.headers, 'optionalAccess', _146 => _146["location"]]) || _optionalChain([response, 'access', _147 => _147.headers, 'optionalAccess', _148 => _148["Location"]]);
29725
+ const locationHeader = _optionalChain([response, 'access', _133 => _133.headers, 'optionalAccess', _134 => _134["location"]]) || _optionalChain([response, 'access', _135 => _135.headers, 'optionalAccess', _136 => _136["Location"]]);
29725
29726
  let createdId = "";
29726
29727
  if (locationHeader) {
29727
29728
  const idMatch = locationHeader.match(/user-data\/([a-f0-9-]+)$/i);
@@ -29875,14 +29876,14 @@ var get_user_group_default = _mcpserversdk.withStandardDecorators.call(void 0, G
29875
29876
 
29876
29877
 
29877
29878
 
29878
- var outputSchema67 = _zod.z.object({
29879
+ var outputSchema66 = _zod.z.object({
29879
29880
  items: getItemUserGroupResponse
29880
29881
  });
29881
29882
  var GetUserGroupByIdArrayTool = {
29882
29883
  name: "get-user-group-by-id-array",
29883
29884
  description: "Gets user groups by an array of IDs",
29884
29885
  inputSchema: getItemUserGroupQueryParams.shape,
29885
- outputSchema: outputSchema67.shape,
29886
+ outputSchema: outputSchema66.shape,
29886
29887
  annotations: { readOnlyHint: true },
29887
29888
  slices: ["list"],
29888
29889
  handler: (async (params) => {
@@ -29959,7 +29960,7 @@ var CreateUserGroupTool = {
29959
29960
  validateStatus: () => true
29960
29961
  });
29961
29962
  if (response.status === 201) {
29962
- const locationHeader = _optionalChain([response, 'access', _149 => _149.headers, 'optionalAccess', _150 => _150["location"]]) || _optionalChain([response, 'access', _151 => _151.headers, 'optionalAccess', _152 => _152["Location"]]);
29963
+ const locationHeader = _optionalChain([response, 'access', _137 => _137.headers, 'optionalAccess', _138 => _138["location"]]) || _optionalChain([response, 'access', _139 => _139.headers, 'optionalAccess', _140 => _140["Location"]]);
29963
29964
  let createdId = "";
29964
29965
  if (locationHeader) {
29965
29966
  const idMatch = locationHeader.match(/user-group\/([a-f0-9-]+)$/i);
@@ -30103,14 +30104,14 @@ var get_webhook_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0
30103
30104
 
30104
30105
 
30105
30106
 
30106
- var outputSchema68 = _zod.z.object({
30107
+ var outputSchema67 = _zod.z.object({
30107
30108
  items: getItemWebhookResponse
30108
30109
  });
30109
30110
  var GetWebhookItemTool = {
30110
30111
  name: "get-webhook-item",
30111
30112
  description: "Gets webhooks by IDs (or empty array if no IDs are provided)",
30112
30113
  inputSchema: getItemWebhookQueryParams.shape,
30113
- outputSchema: outputSchema68.shape,
30114
+ outputSchema: outputSchema67.shape,
30114
30115
  annotations: { readOnlyHint: true },
30115
30116
  slices: ["list"],
30116
30117
  handler: (async (params) => {
@@ -30257,7 +30258,7 @@ var CreateWebhookTool = {
30257
30258
  validateStatus: () => true
30258
30259
  });
30259
30260
  if (response.status === 201) {
30260
- const locationHeader = _optionalChain([response, 'access', _153 => _153.headers, 'optionalAccess', _154 => _154["location"]]) || _optionalChain([response, 'access', _155 => _155.headers, 'optionalAccess', _156 => _156["Location"]]);
30261
+ const locationHeader = _optionalChain([response, 'access', _141 => _141.headers, 'optionalAccess', _142 => _142["location"]]) || _optionalChain([response, 'access', _143 => _143.headers, 'optionalAccess', _144 => _144["Location"]]);
30261
30262
  let createdId = "";
30262
30263
  if (locationHeader) {
30263
30264
  const idMatch = locationHeader.match(/webhook\/([a-f0-9-]+)$/i);
@@ -30286,16 +30287,25 @@ var create_webhook_default = _mcpserversdk.withStandardDecorators.call(void 0, C
30286
30287
 
30287
30288
 
30288
30289
 
30290
+
30291
+ var inputSchema51 = _zod.z.object({
30292
+ ...getWebhookByIdLogsParams.shape,
30293
+ ...getWebhookByIdLogsQueryParams.shape
30294
+ });
30289
30295
  var GetWebhookLogsTool = {
30290
30296
  name: "get-webhook-logs",
30291
- description: "Gets logs for a specific webhook",
30292
- inputSchema: getWebhookByIdLogsParams.shape,
30297
+ description: `Gets logs for a specific webhook.
30298
+
30299
+ Results are paginated (100 per page by default). Check the returned "total" against the number of
30300
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
30301
+ to page through the remaining logs.`,
30302
+ inputSchema: inputSchema51.shape,
30293
30303
  outputSchema: getWebhookByIdLogsResponse.shape,
30294
30304
  annotations: { readOnlyHint: true },
30295
30305
  slices: ["read"],
30296
- handler: (async ({ id }) => {
30306
+ handler: (async ({ id, skip, take }) => {
30297
30307
  return _mcpserversdk.executeGetApiCall.call(void 0,
30298
- (client) => client.getWebhookByIdLogs(id, void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
30308
+ (client) => client.getWebhookByIdLogs(id, { skip, take }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
30299
30309
  );
30300
30310
  })
30301
30311
  };
@@ -30494,4 +30504,4 @@ var allSliceNames = [...toolSliceNames, "other"];
30494
30504
 
30495
30505
 
30496
30506
  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;
30497
- //# sourceMappingURL=chunk-GOS3TR7Z.cjs.map
30507
+ //# sourceMappingURL=chunk-UML5C3AZ.cjs.map