@umbraco-cms/mcp-dev 17.6.11 → 17.6.12

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.
@@ -4649,35 +4649,16 @@ var getTemporaryFileAPI = () => ({
4649
4649
  const formData = new FormData();
4650
4650
  formData.append("Id", postTemporaryFileBody2.Id);
4651
4651
  const file = postTemporaryFileBody2.File;
4652
- console.log("[temp-file] incoming file:", {
4653
- typeofFile: typeof file,
4654
- isBuffer: Buffer.isBuffer(file),
4655
- ctorName: _optionalChain([file, 'optionalAccess', _ => _.constructor, 'optionalAccess', _2 => _2.name]),
4656
- hasByteLength: typeof _optionalChain([file, 'optionalAccess', _3 => _3.byteLength]),
4657
- hasLength: typeof _optionalChain([file, 'optionalAccess', _4 => _4.length]),
4658
- keys: file ? Object.keys(file).slice(0, 10) : []
4659
- });
4660
4652
  const buffer = Buffer.isBuffer(file) ? file : await readStreamToBuffer(file);
4661
- console.log("[temp-file] buffer:", { length: buffer.byteLength });
4662
4653
  const bytes = new Uint8Array(buffer.byteLength);
4663
4654
  bytes.set(buffer);
4664
4655
  const blob = new Blob([bytes]);
4665
- console.log("[temp-file] blob:", { size: blob.size, type: blob.type, fileName: postTemporaryFileBody2.FileName });
4666
4656
  formData.append("File", blob, postTemporaryFileBody2.FileName);
4667
- const entries = [];
4668
- for (const [k, v] of formData.entries()) {
4669
- entries.push({
4670
- name: k,
4671
- valueKind: typeof v === "string" ? "string" : _nullishCoalesce(_optionalChain([v, 'optionalAccess', _5 => _5.constructor, 'optionalAccess', _6 => _6.name]), () => ( typeof v)),
4672
- valueSize: typeof v === "string" ? v.length : _nullishCoalesce(_optionalChain([v, 'optionalAccess', _7 => _7.size]), () => ( void 0))
4673
- });
4674
- }
4675
- console.log("[temp-file] formData entries:", entries);
4676
4657
  return _mcpserversdk.UmbracoManagementClient.call(void 0,
4677
4658
  {
4678
4659
  url: `/umbraco/management/api/v1/temporary-file`,
4679
4660
  method: "POST",
4680
- headers: _optionalChain([options, 'optionalAccess', _8 => _8.headers]),
4661
+ headers: _optionalChain([options, 'optionalAccess', _ => _.headers]),
4681
4662
  data: formData
4682
4663
  },
4683
4664
  options
@@ -4739,7 +4720,7 @@ function setUmbracoVersion(version) {
4739
4720
  umbracoVersion = _nullishCoalesce(version, () => ( null));
4740
4721
  }
4741
4722
  function isUmbracoAtLeast(major, minor, requestVersion) {
4742
- const version = _nullishCoalesce(_nullishCoalesce(requestVersion, () => ( _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _9 => _9[_mcpserversdk.UMBRACO_VERSION_CONTEXT_KEY]]))), () => ( umbracoVersion));
4723
+ const version = _nullishCoalesce(_nullishCoalesce(requestVersion, () => ( _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _2 => _2[_mcpserversdk.UMBRACO_VERSION_CONTEXT_KEY]]))), () => ( umbracoVersion));
4743
4724
  if (!version) return false;
4744
4725
  const [maj, min] = version.split(".").map((n) => parseInt(n, 10));
4745
4726
  if (Number.isNaN(maj) || Number.isNaN(min)) return false;
@@ -12554,12 +12535,23 @@ var get_data_type_configuration_default = _mcpserversdk.withStandardDecorators.c
12554
12535
 
12555
12536
  // src/umbraco-api/tools/data-type/get/get-data-type-schema-modern.ts
12556
12537
 
12538
+
12539
+
12540
+
12541
+
12557
12542
  async function getDataTypeSchemaFromApi(id) {
12558
12543
  const client = UmbracoManagementClient3.getClient();
12559
12544
  const response = await client.getDataTypeByIdSchema(
12560
12545
  id,
12561
12546
  _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
12562
12547
  );
12548
+ if (typeof _optionalChain([response, 'optionalAccess', _3 => _3.status]) !== "number") {
12549
+ console.warn(
12550
+ "[get-data-type-schema-modern] API response had no numeric status; treating as success. Did the generated client's CAPTURE_RAW_HTTP_RESPONSE wiring change?"
12551
+ );
12552
+ } else if (response.status < 200 || response.status >= 300) {
12553
+ throw new (0, _mcpserversdk.UmbracoApiError)(_mcpserversdk.toProblemDetails.call(void 0, response));
12554
+ }
12563
12555
  return _nullishCoalesce(response.data, () => ( {}));
12564
12556
  }
12565
12557
 
@@ -12942,7 +12934,7 @@ async function synthesizeDataTypeSchema(id) {
12942
12934
  const client = UmbracoManagementClient3.getClient();
12943
12935
  const dataType = await client.getDataTypeById(id);
12944
12936
  const template = findTemplateByEditorAlias(dataType.editorAlias);
12945
- const valueTypeName = _nullishCoalesce(VALUE_TYPE_BY_EDITOR_ALIAS[dataType.editorAlias], () => ( (_optionalChain([template, 'optionalAccess', _10 => _10.value]) !== void 0 ? "JSON" : null)));
12937
+ const valueTypeName = _nullishCoalesce(VALUE_TYPE_BY_EDITOR_ALIAS[dataType.editorAlias], () => ( (_optionalChain([template, 'optionalAccess', _4 => _4.value]) !== void 0 ? "JSON" : null)));
12946
12938
  const jsonSchema = {
12947
12939
  $schema: "https://json-schema.org/draft/2020-12/schema",
12948
12940
  title: dataType.name,
@@ -12950,8 +12942,8 @@ async function synthesizeDataTypeSchema(id) {
12950
12942
  dataTypeId: dataType.id,
12951
12943
  editorAlias: dataType.editorAlias,
12952
12944
  editorUiAlias: dataType.editorUiAlias,
12953
- example: _optionalChain([template, 'optionalAccess', _11 => _11.value]),
12954
- notes: _optionalChain([template, 'optionalAccess', _12 => _12._notes])
12945
+ example: _optionalChain([template, 'optionalAccess', _5 => _5.value]),
12946
+ notes: _optionalChain([template, 'optionalAccess', _6 => _6._notes])
12955
12947
  };
12956
12948
  return { valueTypeName, jsonSchema };
12957
12949
  }
@@ -13072,7 +13064,7 @@ var CopyDataTypeTool = {
13072
13064
  validateStatus: () => true
13073
13065
  });
13074
13066
  if (response.status === 201) {
13075
- const location = _optionalChain([response, 'access', _13 => _13.headers, 'optionalAccess', _14 => _14.location]) || "";
13067
+ const location = _optionalChain([response, 'access', _7 => _7.headers, 'optionalAccess', _8 => _8.location]) || "";
13076
13068
  const newId = location.split("/").pop() || "";
13077
13069
  const output = {
13078
13070
  message: "Data type copied successfully",
@@ -13146,6 +13138,11 @@ var move_data_type_default = _mcpserversdk.withStandardDecorators.call(void 0, M
13146
13138
 
13147
13139
 
13148
13140
 
13141
+
13142
+ var inputSchema = _zod.z.object({
13143
+ ...getDataTypeByIdReferencedByParams.shape,
13144
+ ...getDataTypeByIdReferencedByQueryParams.shape
13145
+ });
13149
13146
  var GetReferencesDataTypeTool = {
13150
13147
  name: "get-references-data-type",
13151
13148
  description: `Gets the document types and properties that use a specific data type.
@@ -13159,16 +13156,20 @@ var GetReferencesDataTypeTool = {
13159
13156
 
13160
13157
  Returns a detailed list with content type information (id, type, name, icon) and all properties
13161
13158
  (name, alias) that use the specified data type.
13159
+
13160
+ Results are paginated (20 per page by default). Check the returned "total" against the number of
13161
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
13162
+ to page through the remaining references so the list is complete before acting on it.
13162
13163
  `,
13163
- inputSchema: getDataTypeByIdReferencedByParams.shape,
13164
+ inputSchema: inputSchema.shape,
13164
13165
  outputSchema: getDataTypeByIdReferencedByResponse.shape,
13165
13166
  annotations: {
13166
13167
  readOnlyHint: true
13167
13168
  },
13168
13169
  slices: ["references"],
13169
- handler: (async ({ id }) => {
13170
+ handler: (async ({ id, skip, take }) => {
13170
13171
  return _mcpserversdk.executeGetApiCall.call(void 0,
13171
- (client) => client.getDataTypeByIdReferencedBy(id, void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
13172
+ (client) => client.getDataTypeByIdReferencedBy(id, { skip, take }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
13172
13173
  );
13173
13174
  })
13174
13175
  };
@@ -13554,7 +13555,7 @@ var DataTypeCollection = {
13554
13555
  tools.push(get_data_type_batch_default);
13555
13556
  tools.push(get_data_type_configuration_default);
13556
13557
  tools.push(get_data_type_schema_default);
13557
- if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _15 => _15.umbracoVersion]))) {
13558
+ if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _9 => _9.umbracoVersion]))) {
13558
13559
  tools.push(get_data_type_schemas_default);
13559
13560
  }
13560
13561
  }
@@ -13713,7 +13714,7 @@ var CreateDictionaryItemTool = {
13713
13714
  validateStatus: () => true
13714
13715
  });
13715
13716
  if (response.status === 201) {
13716
- const locationHeader = _optionalChain([response, 'access', _16 => _16.headers, 'optionalAccess', _17 => _17["location"]]) || _optionalChain([response, 'access', _18 => _18.headers, 'optionalAccess', _19 => _19["Location"]]);
13717
+ const locationHeader = _optionalChain([response, 'access', _10 => _10.headers, 'optionalAccess', _11 => _11["location"]]) || _optionalChain([response, 'access', _12 => _12.headers, 'optionalAccess', _13 => _13["Location"]]);
13717
13718
  let createdId = model.id || "";
13718
13719
  if (locationHeader) {
13719
13720
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -14511,7 +14512,7 @@ var get_document_notifications_default = _mcpserversdk.withStandardDecorators.ca
14511
14512
 
14512
14513
 
14513
14514
 
14514
- var inputSchema = _zod.z.object({
14515
+ var inputSchema2 = _zod.z.object({
14515
14516
  ...getDocumentByIdPublicAccessParams.shape,
14516
14517
  ...getDocumentByIdPublicAccessQueryParams.shape
14517
14518
  });
@@ -14520,7 +14521,7 @@ var GetDocumentPublicAccessTool = {
14520
14521
  description: `Gets the public access settings for a document by Id.
14521
14522
  Set includeAncestors=true to also resolve protection inherited from an ancestor
14522
14523
  (the response's isProtectedByAncestor field reflects this).`,
14523
- inputSchema: inputSchema.shape,
14524
+ inputSchema: inputSchema2.shape,
14524
14525
  outputSchema: getDocumentByIdPublicAccessResponse.shape,
14525
14526
  annotations: {
14526
14527
  readOnlyHint: true
@@ -14541,14 +14542,14 @@ var get_document_public_access_default = _mcpserversdk.withStandardDecorators.ca
14541
14542
 
14542
14543
 
14543
14544
 
14544
- var inputSchema2 = {
14545
+ var inputSchema3 = {
14545
14546
  id: getDocumentByIdAuditLogParams.shape.id,
14546
14547
  ...getDocumentByIdAuditLogQueryParams.shape
14547
14548
  };
14548
14549
  var GetDocumentAuditLogTool = {
14549
14550
  name: "get-document-audit-log",
14550
14551
  description: "Fetches the audit log for a document by Id.",
14551
- inputSchema: inputSchema2,
14552
+ inputSchema: inputSchema3,
14552
14553
  outputSchema: getDocumentByIdAuditLogResponse.shape,
14553
14554
  annotations: {
14554
14555
  readOnlyHint: true
@@ -14650,12 +14651,23 @@ var get_document_urls_default = _mcpserversdk.withStandardDecorators.call(void 0
14650
14651
 
14651
14652
  // src/umbraco-api/tools/document/get/get-document-type-schema-modern.ts
14652
14653
 
14654
+
14655
+
14656
+
14657
+
14653
14658
  async function getDocumentTypeSchemaFromApi(id) {
14654
14659
  const client = UmbracoManagementClient3.getClient();
14655
14660
  const response = await client.getDocumentTypeByIdSchema(
14656
14661
  id,
14657
14662
  _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
14658
14663
  );
14664
+ if (typeof _optionalChain([response, 'optionalAccess', _14 => _14.status]) !== "number") {
14665
+ console.warn(
14666
+ "[get-document-type-schema-modern] API response had no numeric status; treating as success. Did the generated client's CAPTURE_RAW_HTTP_RESPONSE wiring change?"
14667
+ );
14668
+ } else if (response.status < 200 || response.status >= 300) {
14669
+ throw new (0, _mcpserversdk.UmbracoApiError)(_mcpserversdk.toProblemDetails.call(void 0, response));
14670
+ }
14659
14671
  return { schema: response.data };
14660
14672
  }
14661
14673
 
@@ -14673,8 +14685,8 @@ function buildPropertyEntry(prop, dataType, template) {
14673
14685
  editorAlias: dataType.editorAlias,
14674
14686
  dataTypeId: dataType.id,
14675
14687
  dataTypeName: dataType.name,
14676
- example: _optionalChain([template, 'optionalAccess', _20 => _20.value]),
14677
- notes: _optionalChain([template, 'optionalAccess', _21 => _21._notes])
14688
+ example: _optionalChain([template, 'optionalAccess', _15 => _15.value]),
14689
+ notes: _optionalChain([template, 'optionalAccess', _16 => _16._notes])
14678
14690
  };
14679
14691
  }
14680
14692
  async function synthesizeDocumentTypeSchema(id) {
@@ -14755,7 +14767,7 @@ var search_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
14755
14767
 
14756
14768
 
14757
14769
 
14758
- var inputSchema3 = _zod.z.object({
14770
+ var inputSchema4 = _zod.z.object({
14759
14771
  ...getCollectionDocumentByIdParams.shape,
14760
14772
  ...getCollectionDocumentByIdQueryParams.shape
14761
14773
  });
@@ -14763,7 +14775,7 @@ var GetCollectionDocumentByIdTool = {
14763
14775
  name: "get-collection-document-by-id",
14764
14776
  description: `Get a collection of document items
14765
14777
  Use this to retrieve a filtered and paginated collection of document items based on various criteria like data type, ordering, and filtering.`,
14766
- inputSchema: inputSchema3.shape,
14778
+ inputSchema: inputSchema4.shape,
14767
14779
  outputSchema: getCollectionDocumentByIdResponse.shape,
14768
14780
  annotations: {
14769
14781
  readOnlyHint: true
@@ -14842,7 +14854,7 @@ var get_document_are_referenced_default = _mcpserversdk.withStandardDecorators.c
14842
14854
 
14843
14855
 
14844
14856
 
14845
- var inputSchema4 = _zod.z.object({
14857
+ var inputSchema5 = _zod.z.object({
14846
14858
  ...getDocumentByIdReferencedByParams.shape,
14847
14859
  ...getDocumentByIdReferencedByQueryParams.shape
14848
14860
  });
@@ -14850,7 +14862,7 @@ var GetDocumentByIdReferencedByTool = {
14850
14862
  name: "get-document-by-id-referenced-by",
14851
14863
  description: `Get items that reference a specific document item
14852
14864
  Use this to find all content, documents, or other items that are currently referencing a specific document item.`,
14853
- inputSchema: inputSchema4.shape,
14865
+ inputSchema: inputSchema5.shape,
14854
14866
  outputSchema: getDocumentByIdReferencedByResponse.shape,
14855
14867
  annotations: {
14856
14868
  readOnlyHint: true
@@ -14871,7 +14883,7 @@ var get_document_by_id_referenced_by_default = _mcpserversdk.withStandardDecorat
14871
14883
 
14872
14884
 
14873
14885
 
14874
- var inputSchema5 = _zod.z.object({
14886
+ var inputSchema6 = _zod.z.object({
14875
14887
  ...getDocumentByIdReferencedDescendantsParams.shape,
14876
14888
  ...getDocumentByIdReferencedDescendantsQueryParams.shape
14877
14889
  });
@@ -14884,7 +14896,7 @@ var GetDocumentByIdReferencedDescendantsTool = {
14884
14896
  \u2022 Impact analysis: Before deleting a document folder, see what content would be affected
14885
14897
  \u2022 Dependency tracking: Find all content using documents from a specific folder hierarchy
14886
14898
  \u2022 Content auditing: Identify which descendant document items are actually being used`,
14887
- inputSchema: inputSchema5.shape,
14899
+ inputSchema: inputSchema6.shape,
14888
14900
  outputSchema: getDocumentByIdReferencedDescendantsResponse.shape,
14889
14901
  annotations: {
14890
14902
  readOnlyHint: true
@@ -14905,7 +14917,7 @@ var get_document_by_id_referenced_descendants_default = _mcpserversdk.withStanda
14905
14917
 
14906
14918
 
14907
14919
 
14908
- var inputSchema6 = _zod.z.object({
14920
+ var inputSchema7 = _zod.z.object({
14909
14921
  ...getDocumentByIdAvailableSegmentOptionsParams.shape,
14910
14922
  ...getDocumentByIdAvailableSegmentOptionsQueryParams.shape
14911
14923
  });
@@ -14919,7 +14931,7 @@ var GetDocumentAvailableSegmentOptionsTool = {
14919
14931
  \u2022 Understanding what content variations are available for a document
14920
14932
  \u2022 Determining which segments can be used when creating or editing document content
14921
14933
  \u2022 Viewing segment names, aliases, and associated cultures`,
14922
- inputSchema: inputSchema6.shape,
14934
+ inputSchema: inputSchema7.shape,
14923
14935
  outputSchema: getDocumentByIdAvailableSegmentOptionsResponse.shape,
14924
14936
  annotations: {
14925
14937
  readOnlyHint: true
@@ -14988,14 +15000,14 @@ var get_recycle_bin_document_referenced_by_default = _mcpserversdk.withStandardD
14988
15000
 
14989
15001
 
14990
15002
 
14991
- var inputSchema7 = {
15003
+ var inputSchema8 = {
14992
15004
  id: postDocumentByIdPublicAccessParams.shape.id,
14993
15005
  data: _zod.z.object(postDocumentByIdPublicAccessBody.shape)
14994
15006
  };
14995
15007
  var PostDocumentPublicAccessTool = {
14996
15008
  name: "post-document-public-access",
14997
15009
  description: "Adds public access settings to a document by Id.",
14998
- inputSchema: inputSchema7,
15010
+ inputSchema: inputSchema8,
14999
15011
  slices: ["public-access"],
15000
15012
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.PublicAccess),
15001
15013
  handler: (async (model) => {
@@ -15076,7 +15088,7 @@ var CopyDocumentTool = {
15076
15088
  validateStatus: () => true
15077
15089
  });
15078
15090
  if (response.status === 201) {
15079
- const location = _optionalChain([response, 'access', _22 => _22.headers, 'optionalAccess', _23 => _23.location]) || "";
15091
+ const location = _optionalChain([response, 'access', _17 => _17.headers, 'optionalAccess', _18 => _18.location]) || "";
15080
15092
  const newId = location.split("/").pop() || "";
15081
15093
  const output = { id: newId };
15082
15094
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -15220,7 +15232,7 @@ var CreateDocumentTool = {
15220
15232
  template = { id: model.templateId };
15221
15233
  } else {
15222
15234
  const docType = await client.getDocumentTypeById(model.documentTypeId);
15223
- template = _optionalChain([docType, 'access', _24 => _24.defaultTemplate, 'optionalAccess', _25 => _25.id]) ? { id: docType.defaultTemplate.id } : null;
15235
+ template = _optionalChain([docType, 'access', _19 => _19.defaultTemplate, 'optionalAccess', _20 => _20.id]) ? { id: docType.defaultTemplate.id } : null;
15224
15236
  }
15225
15237
  const payload = {
15226
15238
  id: documentId,
@@ -15398,7 +15410,7 @@ var CreateAndPublishDocumentTool = {
15398
15410
  template = { id: model.templateId };
15399
15411
  } else {
15400
15412
  const docType = await client.getDocumentTypeById(model.documentTypeId);
15401
- template = _optionalChain([docType, 'access', _26 => _26.defaultTemplate, 'optionalAccess', _27 => _27.id]) ? { id: docType.defaultTemplate.id } : null;
15413
+ template = _optionalChain([docType, 'access', _21 => _21.defaultTemplate, 'optionalAccess', _22 => _22.id]) ? { id: docType.defaultTemplate.id } : null;
15402
15414
  }
15403
15415
  const payload = {
15404
15416
  id: documentId,
@@ -15436,14 +15448,14 @@ var create_and_publish_document_default = _mcpserversdk.withStandardDecorators.c
15436
15448
 
15437
15449
 
15438
15450
 
15439
- var inputSchema8 = {
15451
+ var inputSchema9 = {
15440
15452
  id: putDocumentByIdPublicAccessParams.shape.id,
15441
15453
  data: _zod.z.object(putDocumentByIdPublicAccessBody.shape)
15442
15454
  };
15443
15455
  var PutDocumentPublicAccessTool = {
15444
15456
  name: "put-document-public-access",
15445
15457
  description: "Updates public access settings for a document by Id.",
15446
- inputSchema: inputSchema8,
15458
+ inputSchema: inputSchema9,
15447
15459
  annotations: {
15448
15460
  idempotentHint: true
15449
15461
  },
@@ -15464,7 +15476,7 @@ var put_document_public_access_default = _mcpserversdk.withStandardDecorators.ca
15464
15476
 
15465
15477
 
15466
15478
 
15467
- var inputSchema9 = {
15479
+ var inputSchema10 = {
15468
15480
  id: putDocumentByIdDomainsParams.shape.id,
15469
15481
  data: _zod.z.object(putDocumentByIdDomainsBody.shape)
15470
15482
  };
@@ -15472,7 +15484,7 @@ var PutDocumentDomainsTool = {
15472
15484
  name: "put-document-domains",
15473
15485
  description: `Updates the domains assigned to a document by Id. Default value of the defaultIsoCode is null.
15474
15486
  Domain isoCode in the domains array should be in the format of 'en-US' amd be a valid domain name from the Umbraco instance.`,
15475
- inputSchema: inputSchema9,
15487
+ inputSchema: inputSchema10,
15476
15488
  annotations: {
15477
15489
  idempotentHint: true
15478
15490
  },
@@ -15493,14 +15505,14 @@ var put_document_domains_default = _mcpserversdk.withStandardDecorators.call(voi
15493
15505
 
15494
15506
 
15495
15507
 
15496
- var inputSchema10 = {
15508
+ var inputSchema11 = {
15497
15509
  id: putDocumentByIdNotificationsParams.shape.id,
15498
15510
  data: _zod.z.object(putDocumentByIdNotificationsBody.shape)
15499
15511
  };
15500
15512
  var PutDocumentNotificationsTool = {
15501
15513
  name: "put-document-notifications",
15502
15514
  description: "Updates the notifications for a document by Id.",
15503
- inputSchema: inputSchema10,
15515
+ inputSchema: inputSchema11,
15504
15516
  annotations: {
15505
15517
  idempotentHint: true
15506
15518
  },
@@ -15518,7 +15530,7 @@ var put_document_notifications_default = _mcpserversdk.withStandardDecorators.ca
15518
15530
 
15519
15531
 
15520
15532
 
15521
- var inputSchema11 = {
15533
+ var inputSchema12 = {
15522
15534
  id: _zod.z.string().uuid(),
15523
15535
  data: _zod.z.object(putDocumentByIdPublishWithDescendantsBody.shape)
15524
15536
  };
@@ -15526,7 +15538,7 @@ var PublishDocumentWithDescendantsTool = {
15526
15538
  name: "publish-document-with-descendants",
15527
15539
  description: `Publishes a document and its descendants by Id. This is an asynchronous operation that may take time for large document trees.
15528
15540
  The tool will poll for completion and return the final result when finished.`,
15529
- inputSchema: inputSchema11,
15541
+ inputSchema: inputSchema12,
15530
15542
  annotations: {},
15531
15543
  slices: ["publish"],
15532
15544
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
@@ -15605,14 +15617,14 @@ var publish_document_with_descendants_default = _mcpserversdk.withStandardDecora
15605
15617
 
15606
15618
 
15607
15619
 
15608
- var inputSchema12 = {
15620
+ var inputSchema13 = {
15609
15621
  id: _zod.z.string().uuid(),
15610
15622
  data: _zod.z.object(putDocumentByIdUnpublishBody.shape)
15611
15623
  };
15612
15624
  var UnpublishDocumentTool = {
15613
15625
  name: "unpublish-document",
15614
15626
  description: "Unpublishes a document by Id.",
15615
- inputSchema: inputSchema12,
15627
+ inputSchema: inputSchema13,
15616
15628
  annotations: {},
15617
15629
  slices: ["publish"],
15618
15630
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Unpublish),
@@ -15653,7 +15665,7 @@ var sort_document_default = _mcpserversdk.withStandardDecorators.call(void 0, So
15653
15665
 
15654
15666
 
15655
15667
 
15656
- var inputSchema13 = {
15668
+ var inputSchema14 = {
15657
15669
  id: putDocumentByIdSortChildrenParams.shape.id,
15658
15670
  data: _zod.z.object(putDocumentByIdSortChildrenBody.shape)
15659
15671
  };
@@ -15664,7 +15676,7 @@ var SortDocumentChildrenTool = {
15664
15676
  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.
15665
15677
 
15666
15678
  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.`,
15667
- inputSchema: inputSchema13,
15679
+ inputSchema: inputSchema14,
15668
15680
  annotations: {},
15669
15681
  slices: ["sort"],
15670
15682
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
@@ -15708,14 +15720,14 @@ var sort_document_root_children_default = _mcpserversdk.withStandardDecorators.c
15708
15720
 
15709
15721
 
15710
15722
 
15711
- var inputSchema14 = {
15723
+ var inputSchema15 = {
15712
15724
  id: _zod.z.string().uuid(),
15713
15725
  data: _zod.z.object(putDocumentByIdMoveBody.shape)
15714
15726
  };
15715
15727
  var MoveDocumentTool = {
15716
15728
  name: "move-document",
15717
15729
  description: "Move a document to a new location",
15718
- inputSchema: inputSchema14,
15730
+ inputSchema: inputSchema15,
15719
15731
  annotations: {},
15720
15732
  slices: ["move"],
15721
15733
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Move),
@@ -15734,7 +15746,7 @@ var move_document_default = _mcpserversdk.withStandardDecorators.call(void 0, Mo
15734
15746
 
15735
15747
 
15736
15748
 
15737
- var inputSchema15 = {
15749
+ var inputSchema16 = {
15738
15750
  id: _zod.z.string().uuid(),
15739
15751
  data: _zod.z.object(putDocumentByIdPublishBody.shape)
15740
15752
  };
@@ -15744,7 +15756,7 @@ var PublishDocumentTool = {
15744
15756
  This function bypasses approval workflows and publishes directly to the live site.
15745
15757
  When the culture is not provided, the default culture is null.
15746
15758
  When the schedule is not provided, the default schedule is null.`,
15747
- inputSchema: inputSchema15,
15759
+ inputSchema: inputSchema16,
15748
15760
  annotations: {},
15749
15761
  slices: ["publish"],
15750
15762
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
@@ -15832,7 +15844,7 @@ var move_to_recycle_bin_default = _mcpserversdk.withStandardDecorators.call(void
15832
15844
 
15833
15845
 
15834
15846
 
15835
- var inputSchema16 = {
15847
+ var inputSchema17 = {
15836
15848
  id: putDocumentByIdParams.shape.id,
15837
15849
  data: _zod.z.object(putDocumentByIdBody.shape),
15838
15850
  confirmClearValues: _zod.z.boolean().optional().describe(
@@ -15859,21 +15871,21 @@ var UpdateDocumentTool = {
15859
15871
  Always include the full, unmodified "values" array from the document you just read unless you
15860
15872
  intend to clear every property. If the document currently has values, an empty "values" array is
15861
15873
  rejected unless "confirmClearValues" is set to true.`,
15862
- inputSchema: inputSchema16,
15874
+ inputSchema: inputSchema17,
15863
15875
  annotations: {
15864
15876
  idempotentHint: true
15865
15877
  },
15866
15878
  slices: ["update"],
15867
15879
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Update),
15868
15880
  handler: (async (model) => {
15869
- const incomingValues = _optionalChain([model, 'access', _28 => _28.data, 'optionalAccess', _29 => _29.values]);
15881
+ const incomingValues = _optionalChain([model, 'access', _23 => _23.data, 'optionalAccess', _24 => _24.values]);
15870
15882
  if (Array.isArray(incomingValues) && incomingValues.length === 0 && !model.confirmClearValues) {
15871
15883
  const client = UmbracoManagementClient3.getClient();
15872
15884
  let currentDocument;
15873
15885
  try {
15874
15886
  currentDocument = await client.getDocumentById(model.id);
15875
15887
  } catch (error) {
15876
- const status = _optionalChain([error, 'optionalAccess', _30 => _30.response, 'optionalAccess', _31 => _31.status]);
15888
+ const status = _optionalChain([error, 'optionalAccess', _25 => _25.response, 'optionalAccess', _26 => _26.status]);
15877
15889
  if (status !== 404) {
15878
15890
  throw error;
15879
15891
  }
@@ -15899,7 +15911,7 @@ var update_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
15899
15911
 
15900
15912
 
15901
15913
 
15902
- var inputSchema17 = {
15914
+ var inputSchema18 = {
15903
15915
  id: putDocumentByIdUpdateAndPublishParams.shape.id,
15904
15916
  data: _zod.z.object(putDocumentByIdUpdateAndPublishBody.shape)
15905
15917
  };
@@ -15920,7 +15932,7 @@ var UpdateAndPublishDocumentTool = {
15920
15932
  - Always read the current document value first
15921
15933
  - Only update the required values
15922
15934
  - Don't miss any properties from the original document`,
15923
- inputSchema: inputSchema17,
15935
+ inputSchema: inputSchema18,
15924
15936
  annotations: {
15925
15937
  idempotentHint: true
15926
15938
  },
@@ -16303,7 +16315,7 @@ var UpdateDocumentPropertiesTool = {
16303
16315
  const docTypeProps = await getDocumentTypeProperties();
16304
16316
  const propsToValidate = allPropertiesToValidate.map((p) => {
16305
16317
  const def = docTypeProps.find((d) => d.alias === p.alias);
16306
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _32 => _32.dataTypeId]), () => ( "")) };
16318
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _27 => _27.dataTypeId]), () => ( "")) };
16307
16319
  }).filter((p) => p.dataTypeId);
16308
16320
  if (propsToValidate.length > 0) {
16309
16321
  const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
@@ -16705,7 +16717,7 @@ var UpdateBlockPropertyTool = {
16705
16717
  if (!isUmbracoAtLeast(17, 4) && elementTypeProperties.length > 0) {
16706
16718
  const propsToValidate = update.properties.map((p) => {
16707
16719
  const def = elementTypeProperties.find((d) => d.alias === p.alias);
16708
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _33 => _33.dataTypeId]), () => ( "")) };
16720
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _28 => _28.dataTypeId]), () => ( "")) };
16709
16721
  }).filter((p) => p.dataTypeId);
16710
16722
  if (propsToValidate.length > 0) {
16711
16723
  const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
@@ -17037,14 +17049,14 @@ function removeRteBlockElement(markup, contentKey) {
17037
17049
  return markup.slice(0, start) + markup.slice(end);
17038
17050
  }
17039
17051
  function getBlockTypeConfigurations(dataTypeValues) {
17040
- const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _34 => _34.find, 'call', _35 => _35((v) => v.alias === "blocks"), 'optionalAccess', _36 => _36.value]);
17052
+ const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _29 => _29.find, 'call', _30 => _30((v) => v.alias === "blocks"), 'optionalAccess', _31 => _31.value]);
17041
17053
  return Array.isArray(blocks) ? blocks : [];
17042
17054
  }
17043
17055
  function findBlockTypeConfiguration(configs, contentElementTypeKey) {
17044
17056
  return configs.find((c) => c.contentElementTypeKey === contentElementTypeKey);
17045
17057
  }
17046
17058
  function findAreaConfiguration(configs, parentContentTypeKey, areaKey) {
17047
- return _optionalChain([findBlockTypeConfiguration, 'call', _37 => _37(configs, parentContentTypeKey), 'optionalAccess', _38 => _38.areas, 'optionalAccess', _39 => _39.find, 'call', _40 => _40((a) => a.key === areaKey)]);
17059
+ return _optionalChain([findBlockTypeConfiguration, 'call', _32 => _32(configs, parentContentTypeKey), 'optionalAccess', _33 => _33.areas, 'optionalAccess', _34 => _34.find, 'call', _35 => _35((a) => a.key === areaKey)]);
17048
17060
  }
17049
17061
  function checkAllowedInArea(blockConfig, area) {
17050
17062
  if (blockConfig.allowInAreas === false) {
@@ -17186,7 +17198,7 @@ var createDocumentBlockSchema = {
17186
17198
  properties: _zod.z.array(blockPropertyValueSchema).optional().describe("Content property values for the new block"),
17187
17199
  settings: _zod.z.object({
17188
17200
  properties: _zod.z.array(blockPropertyValueSchema).describe("Settings property values")
17189
- }).optional().describe("Settings for the new block; the settings element type comes from the data type configuration"),
17201
+ }).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"),
17190
17202
  placement: placementSchema.optional().describe("Where to place the block relative to siblings (default: append)"),
17191
17203
  grid: gridSchema.optional().describe("BlockGrid-only layout options. Rejected for BlockList/RichText properties")
17192
17204
  };
@@ -17210,7 +17222,7 @@ async function validateBlockProperties(elementTypeKey, properties, label) {
17210
17222
  if (!isUmbracoAtLeast(17, 4) && definitions.length > 0) {
17211
17223
  const propsToValidate = properties.map((p) => {
17212
17224
  const def = definitions.find((d) => d.alias === p.alias);
17213
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _41 => _41.dataTypeId]), () => ( "")) };
17225
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _36 => _36.dataTypeId]), () => ( "")) };
17214
17226
  }).filter((p) => p.dataTypeId);
17215
17227
  if (propsToValidate.length > 0) {
17216
17228
  const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
@@ -17253,15 +17265,15 @@ var CreateDocumentBlockTool = {
17253
17265
  const { kind, container, blockConfigs } = ctx;
17254
17266
  const placement = _nullishCoalesce(model.placement, () => ( { position: "append" }));
17255
17267
  const contentProperties = _nullishCoalesce(model.properties, () => ( []));
17256
- const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _42 => _42.settings, 'optionalAccess', _43 => _43.properties]), () => ( []));
17268
+ const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _37 => _37.settings, 'optionalAccess', _38 => _38.properties]), () => ( []));
17257
17269
  if (model.grid && kind !== "BlockGrid") {
17258
17270
  throw new (0, _mcpserversdk.ToolValidationError)({
17259
17271
  title: "grid options not supported",
17260
17272
  detail: `'grid' only applies to BlockGrid properties; '${model.propertyAlias}' is a ${kind} property`
17261
17273
  });
17262
17274
  }
17263
- const areaKey = _optionalChain([model, 'access', _44 => _44.grid, 'optionalAccess', _45 => _45.areaKey]);
17264
- const parentContentKey = _optionalChain([model, 'access', _46 => _46.grid, 'optionalAccess', _47 => _47.parentContentKey]);
17275
+ const areaKey = _optionalChain([model, 'access', _39 => _39.grid, 'optionalAccess', _40 => _40.areaKey]);
17276
+ const parentContentKey = _optionalChain([model, 'access', _41 => _41.grid, 'optionalAccess', _42 => _42.parentContentKey]);
17265
17277
  if (!!areaKey !== !!parentContentKey) {
17266
17278
  throw new (0, _mcpserversdk.ToolValidationError)({
17267
17279
  title: "Incomplete area target",
@@ -17311,7 +17323,7 @@ var CreateDocumentBlockTool = {
17311
17323
  title: "Area not found",
17312
17324
  detail: `Area '${key}' is not configured for block type '${parentBlock.contentTypeKey}'`,
17313
17325
  extensions: {
17314
- availableAreas: (_nullishCoalesce(_optionalChain([findBlockTypeConfiguration, 'call', _48 => _48(blockConfigs, parentBlock.contentTypeKey), 'optionalAccess', _49 => _49.areas]), () => ( []))).map((a) => ({ key: a.key, alias: _nullishCoalesce(a.alias, () => ( null)) }))
17326
+ availableAreas: (_nullishCoalesce(_optionalChain([findBlockTypeConfiguration, 'call', _43 => _43(blockConfigs, parentBlock.contentTypeKey), 'optionalAccess', _44 => _44.areas]), () => ( []))).map((a) => ({ key: a.key, alias: _nullishCoalesce(a.alias, () => ( null)) }))
17315
17327
  }
17316
17328
  });
17317
17329
  }
@@ -17333,7 +17345,7 @@ var CreateDocumentBlockTool = {
17333
17345
  detail: `No block with contentKey '${placement.contentKey}' exists in property '${model.propertyAlias}'`
17334
17346
  });
17335
17347
  }
17336
- if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _50 => _50.parent, 'optionalAccess', _51 => _51.contentKey]) !== parentContentKey)) {
17348
+ if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _45 => _45.parent, 'optionalAccess', _46 => _46.contentKey]) !== parentContentKey)) {
17337
17349
  throw new (0, _mcpserversdk.ToolValidationError)({
17338
17350
  title: "Sibling not in target area",
17339
17351
  detail: `Block '${placement.contentKey}' is not in area '${areaKey}' of block '${parentContentKey}'`
@@ -17374,12 +17386,12 @@ var CreateDocumentBlockTool = {
17374
17386
  }
17375
17387
  }
17376
17388
  const contentKey = _uuid.v4.call(void 0, );
17377
- const settingsKey = model.settings ? _uuid.v4.call(void 0, ) : null;
17389
+ const settingsKey = blockConfig.settingsElementTypeKey ? _uuid.v4.call(void 0, ) : null;
17378
17390
  const layoutEntry = buildLayoutEntry(kind, {
17379
17391
  contentKey,
17380
17392
  settingsKey,
17381
- columnSpan: _optionalChain([model, 'access', _52 => _52.grid, 'optionalAccess', _53 => _53.columnSpan]),
17382
- rowSpan: _optionalChain([model, 'access', _54 => _54.grid, 'optionalAccess', _55 => _55.rowSpan]),
17393
+ columnSpan: _optionalChain([model, 'access', _47 => _47.grid, 'optionalAccess', _48 => _48.columnSpan]),
17394
+ rowSpan: _optionalChain([model, 'access', _49 => _49.grid, 'optionalAccess', _50 => _50.rowSpan]),
17383
17395
  areaKeys: (_nullishCoalesce(blockConfig.areas, () => ( []))).map((a) => a.key)
17384
17396
  });
17385
17397
  const elementType = await client.getDocumentTypeById(model.contentTypeKey);
@@ -17739,7 +17751,7 @@ var DocumentCollection = {
17739
17751
  tools.push(get_document_type_schema_default);
17740
17752
  tools.push(copy_document_default);
17741
17753
  tools.push(create_document_default);
17742
- if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _56 => _56.umbracoVersion]))) {
17754
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _51 => _51.umbracoVersion]))) {
17743
17755
  tools.push(create_and_publish_document_default);
17744
17756
  }
17745
17757
  tools.push(post_document_public_access_default);
@@ -17756,13 +17768,13 @@ var DocumentCollection = {
17756
17768
  tools.push(publish_document_default);
17757
17769
  tools.push(publish_document_with_descendants_default);
17758
17770
  tools.push(sort_document_default);
17759
- if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _57 => _57.umbracoVersion]))) {
17771
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _52 => _52.umbracoVersion]))) {
17760
17772
  tools.push(sort_document_children_default);
17761
17773
  tools.push(sort_document_root_children_default);
17762
17774
  }
17763
17775
  tools.push(unpublish_document_default);
17764
17776
  tools.push(update_document_default);
17765
- if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _58 => _58.umbracoVersion]))) {
17777
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _53 => _53.umbracoVersion]))) {
17766
17778
  tools.push(update_and_publish_document_default);
17767
17779
  }
17768
17780
  tools.push(update_document_properties_default);
@@ -18098,7 +18110,7 @@ var CopyDocumentTypeTool = {
18098
18110
  validateStatus: () => true
18099
18111
  });
18100
18112
  if (response.status === 201) {
18101
- const location = _optionalChain([response, 'access', _59 => _59.headers, 'optionalAccess', _60 => _60.location]) || "";
18113
+ const location = _optionalChain([response, 'access', _54 => _54.headers, 'optionalAccess', _55 => _55.location]) || "";
18102
18114
  const newId = location.split("/").pop() || "";
18103
18115
  const output = { id: newId };
18104
18116
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -19829,14 +19841,14 @@ var create_language_default = _mcpserversdk.withStandardDecorators.call(void 0,
19829
19841
 
19830
19842
 
19831
19843
 
19832
- var inputSchema18 = {
19844
+ var inputSchema19 = {
19833
19845
  isoCode: putLanguageByIsoCodeParams.shape.isoCode,
19834
19846
  data: _zod.z.object(putLanguageByIsoCodeBody.shape)
19835
19847
  };
19836
19848
  var UpdateLanguageTool = {
19837
19849
  name: "update-language",
19838
19850
  description: "Updates an existing language by ISO code",
19839
- inputSchema: inputSchema18,
19851
+ inputSchema: inputSchema19,
19840
19852
  annotations: {
19841
19853
  idempotentHint: true
19842
19854
  },
@@ -20304,7 +20316,7 @@ function getExtensionFromMimeType(mimeType) {
20304
20316
  return extension ? `.${extension}` : void 0;
20305
20317
  }
20306
20318
  function validateMediaTypeForSvg(filePath, fileUrl, fileName, mediaTypeName) {
20307
- const isSvg = _optionalChain([filePath, 'optionalAccess', _61 => _61.toLowerCase, 'call', _62 => _62(), 'access', _63 => _63.endsWith, 'call', _64 => _64(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _65 => _65.toLowerCase, 'call', _66 => _66(), 'access', _67 => _67.endsWith, 'call', _68 => _68(".svg")]) || fileName.toLowerCase().endsWith(".svg");
20319
+ const isSvg = _optionalChain([filePath, 'optionalAccess', _56 => _56.toLowerCase, 'call', _57 => _57(), 'access', _58 => _58.endsWith, 'call', _59 => _59(".svg")]) || _optionalChain([fileUrl, 'optionalAccess', _60 => _60.toLowerCase, 'call', _61 => _61(), 'access', _62 => _62.endsWith, 'call', _63 => _63(".svg")]) || fileName.toLowerCase().endsWith(".svg");
20308
20320
  if (isSvg && mediaTypeName === _mcpserversdk.MEDIA_TYPE_IMAGE) {
20309
20321
  console.warn(`SVG detected - using ${_mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS} media type instead of ${_mcpserversdk.MEDIA_TYPE_IMAGE}`);
20310
20322
  return _mcpserversdk.MEDIA_TYPE_VECTOR_GRAPHICS;
@@ -20458,8 +20470,8 @@ async function uploadMediaFile(client, params) {
20458
20470
  });
20459
20471
  } catch (error) {
20460
20472
  const err = error;
20461
- const errorData = _optionalChain([err, 'access', _69 => _69.response, 'optionalAccess', _70 => _70.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
20462
- throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _71 => _71.response, 'optionalAccess', _72 => _72.status]) || "Unknown error"} - ${errorData}`);
20473
+ const errorData = _optionalChain([err, 'access', _64 => _64.response, 'optionalAccess', _65 => _65.data]) ? typeof err.response.data === "string" ? err.response.data : JSON.stringify(err.response.data) : err.message;
20474
+ throw new Error(`Failed to upload temporary file: ${_optionalChain([err, 'access', _66 => _66.response, 'optionalAccess', _67 => _67.status]) || "Unknown error"} - ${errorData}`);
20463
20475
  }
20464
20476
  const valueStructure = buildValueStructure(validatedMediaTypeName, params.temporaryFileId);
20465
20477
  let response;
@@ -20479,12 +20491,12 @@ async function uploadMediaFile(client, params) {
20479
20491
  }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE);
20480
20492
  } catch (error) {
20481
20493
  const err = error;
20482
- throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _73 => _73.response, 'optionalAccess', _74 => _74.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _75 => _75.response, 'optionalAccess', _76 => _76.data])) || err.message}`);
20494
+ throw new Error(`Failed to create media item: ${_optionalChain([err, 'access', _68 => _68.response, 'optionalAccess', _69 => _69.status]) || "Unknown error"} - ${JSON.stringify(_optionalChain([err, 'access', _70 => _70.response, 'optionalAccess', _71 => _71.data])) || err.message}`);
20483
20495
  }
20484
20496
  if (response.status < 200 || response.status >= 300) {
20485
20497
  throw new Error(`Request failed with status code ${response.status}`);
20486
20498
  }
20487
- const locationHeader = _optionalChain([response, 'access', _77 => _77.headers, 'optionalAccess', _78 => _78.location]) || _optionalChain([response, 'access', _79 => _79.headers, 'optionalAccess', _80 => _80.Location]);
20499
+ const locationHeader = _optionalChain([response, 'access', _72 => _72.headers, 'optionalAccess', _73 => _73.location]) || _optionalChain([response, 'access', _74 => _74.headers, 'optionalAccess', _75 => _75.Location]);
20488
20500
  if (!locationHeader) {
20489
20501
  throw new Error("No Location header in response - cannot determine created media ID");
20490
20502
  }
@@ -20516,7 +20528,7 @@ function buildSourceTypeSection(allowFilePath, otherSources) {
20516
20528
 
20517
20529
 
20518
20530
  function isStreamingUploadAvailable() {
20519
- return _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _81 => _81.umbracoAuth]) !== void 0;
20531
+ return _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _76 => _76.umbracoAuth]) !== void 0;
20520
20532
  }
20521
20533
  async function resolveAuth() {
20522
20534
  const { accessToken, baseUrl } = await _mcpserversdk.getSessionUmbracoAuth.call(void 0, );
@@ -20524,7 +20536,7 @@ async function resolveAuth() {
20524
20536
  }
20525
20537
  function ensureExtension(name, contentType, urlPath) {
20526
20538
  if (name.includes(".")) return name;
20527
- const fromUrl = _optionalChain([urlPath, 'access', _82 => _82.match, 'call', _83 => _83(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _84 => _84[0]]);
20539
+ const fromUrl = _optionalChain([urlPath, 'access', _77 => _77.match, 'call', _78 => _78(/\.([a-z0-9]{1,8})$/i), 'optionalAccess', _79 => _79[0]]);
20528
20540
  if (fromUrl) return `${name}${fromUrl}`;
20529
20541
  if (contentType) {
20530
20542
  const subtype = contentType.split(";")[0].split("/")[1];
@@ -20630,8 +20642,8 @@ Content-Type: ${sourceContentType}\r
20630
20642
  if (response.status < 200 || response.status >= 300) {
20631
20643
  throw new Error(`postMedia failed with status ${response.status}`);
20632
20644
  }
20633
- const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _85 => _85.headers, 'optionalAccess', _86 => _86.location]), () => ( _optionalChain([response, 'access', _87 => _87.headers, 'optionalAccess', _88 => _88.Location])));
20634
- const idMatch = _optionalChain([locationHeader, 'optionalAccess', _89 => _89.match, 'call', _90 => _90(/\/([a-f0-9-]{36})$/i)]);
20645
+ const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _80 => _80.headers, 'optionalAccess', _81 => _81.location]), () => ( _optionalChain([response, 'access', _82 => _82.headers, 'optionalAccess', _83 => _83.Location])));
20646
+ const idMatch = _optionalChain([locationHeader, 'optionalAccess', _84 => _84.match, 'call', _85 => _85(/\/([a-f0-9-]{36})$/i)]);
20635
20647
  if (!idMatch) {
20636
20648
  throw new Error(
20637
20649
  `Could not extract media id from Location header: ${_nullishCoalesce(locationHeader, () => ( "(missing)"))}`
@@ -20736,7 +20748,7 @@ ${filePathSection}
20736
20748
  let effectiveSourceType;
20737
20749
  let effectiveFileUrl = model.fileUrl;
20738
20750
  if (model.sourceType === "file") {
20739
- if (!_optionalChain([model, 'access', _91 => _91.file, 'optionalAccess', _92 => _92.download_url])) {
20751
+ if (!_optionalChain([model, 'access', _86 => _86.file, 'optionalAccess', _87 => _87.download_url])) {
20740
20752
  return _mcpserversdk.createToolResultError.call(void 0, {
20741
20753
  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."
20742
20754
  });
@@ -20885,7 +20897,7 @@ ${filePathSection}
20885
20897
  let effectiveSourceType;
20886
20898
  let effectiveFileUrl = file.fileUrl;
20887
20899
  if (model.sourceType === "file") {
20888
- if (!_optionalChain([file, 'access', _93 => _93.file, 'optionalAccess', _94 => _94.download_url])) {
20900
+ if (!_optionalChain([file, 'access', _88 => _88.file, 'optionalAccess', _89 => _89.download_url])) {
20889
20901
  return {
20890
20902
  success: false,
20891
20903
  name: file.name,
@@ -20984,7 +20996,7 @@ var CreateMediaFolderTool = {
20984
20996
  if (response.status < 200 || response.status >= 300) {
20985
20997
  throw new Error(`Request failed with status code ${response.status}`);
20986
20998
  }
20987
- const locationHeader = _optionalChain([response, 'access', _95 => _95.headers, 'optionalAccess', _96 => _96.location]) || _optionalChain([response, 'access', _97 => _97.headers, 'optionalAccess', _98 => _98.Location]);
20999
+ const locationHeader = _optionalChain([response, 'access', _90 => _90.headers, 'optionalAccess', _91 => _91.location]) || _optionalChain([response, 'access', _92 => _92.headers, 'optionalAccess', _93 => _93.Location]);
20988
21000
  if (!locationHeader) {
20989
21001
  throw new Error("No Location header in response - cannot determine created folder ID");
20990
21002
  }
@@ -21058,7 +21070,7 @@ var get_media_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0,
21058
21070
 
21059
21071
 
21060
21072
 
21061
- var inputSchema19 = {
21073
+ var inputSchema20 = {
21062
21074
  id: putMediaByIdParams.shape.id,
21063
21075
  data: _zod.z.object(putMediaByIdBody.shape)
21064
21076
  };
@@ -21068,7 +21080,7 @@ var UpdateMediaTool = {
21068
21080
  Always read the current media value first and only update the required values.
21069
21081
  Don't miss any properties from the original media that you are updating.
21070
21082
  This cannot be used for moving media to a new folder. Use the move endpoint to do that.`,
21071
- inputSchema: inputSchema19,
21083
+ inputSchema: inputSchema20,
21072
21084
  annotations: {
21073
21085
  idempotentHint: true
21074
21086
  },
@@ -21154,14 +21166,14 @@ var validate_media_default = _mcpserversdk.withStandardDecorators.call(void 0, V
21154
21166
 
21155
21167
 
21156
21168
 
21157
- var inputSchema20 = {
21169
+ var inputSchema21 = {
21158
21170
  id: putMediaByIdValidateParams.shape.id,
21159
21171
  data: _zod.z.object(putMediaByIdValidateBody.shape)
21160
21172
  };
21161
21173
  var ValidateMediaUpdateTool = {
21162
21174
  name: "validate-media-update",
21163
21175
  description: "Validates media data before updating an existing media item by Id",
21164
- inputSchema: inputSchema20,
21176
+ inputSchema: inputSchema21,
21165
21177
  annotations: { readOnlyHint: true },
21166
21178
  slices: ["validate"],
21167
21179
  handler: (async (model) => {
@@ -21201,7 +21213,7 @@ var sort_media_default = _mcpserversdk.withStandardDecorators.call(void 0, SortM
21201
21213
 
21202
21214
 
21203
21215
 
21204
- var inputSchema21 = {
21216
+ var inputSchema22 = {
21205
21217
  id: putMediaByIdSortChildrenParams.shape.id,
21206
21218
  data: _zod.z.object(putMediaByIdSortChildrenBody.shape)
21207
21219
  };
@@ -21210,7 +21222,7 @@ var SortMediaChildrenTool = {
21210
21222
  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).
21211
21223
 
21212
21224
  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.`,
21213
- inputSchema: inputSchema21,
21225
+ inputSchema: inputSchema22,
21214
21226
  annotations: {},
21215
21227
  slices: ["sort"],
21216
21228
  handler: (async (model) => {
@@ -21275,14 +21287,14 @@ var get_media_by_id_array_default = _mcpserversdk.withStandardDecorators.call(vo
21275
21287
 
21276
21288
 
21277
21289
 
21278
- var inputSchema22 = {
21290
+ var inputSchema23 = {
21279
21291
  id: putMediaByIdMoveParams.shape.id,
21280
21292
  data: _zod.z.object(putMediaByIdMoveBody.shape)
21281
21293
  };
21282
21294
  var MoveMediaTool = {
21283
21295
  name: "move-media",
21284
21296
  description: "Move a media item to a new location",
21285
- inputSchema: inputSchema22,
21297
+ inputSchema: inputSchema23,
21286
21298
  annotations: {
21287
21299
  idempotentHint: true
21288
21300
  },
@@ -21418,14 +21430,14 @@ var get_root_default6 = _mcpserversdk.withStandardDecorators.call(void 0, GetMed
21418
21430
 
21419
21431
 
21420
21432
 
21421
- var inputSchema23 = {
21433
+ var inputSchema24 = {
21422
21434
  id: getMediaByIdAuditLogParams.shape.id,
21423
21435
  ...getMediaByIdAuditLogQueryParams.shape
21424
21436
  };
21425
21437
  var GetMediaAuditLogTool = {
21426
21438
  name: "get-media-audit-log",
21427
21439
  description: "Fetches the audit log for a media item by Id.",
21428
- inputSchema: inputSchema23,
21440
+ inputSchema: inputSchema24,
21429
21441
  outputSchema: getMediaByIdAuditLogResponse.shape,
21430
21442
  annotations: { readOnlyHint: true },
21431
21443
  slices: ["audit"],
@@ -21640,7 +21652,7 @@ var get_media_are_referenced_default = _mcpserversdk.withStandardDecorators.call
21640
21652
 
21641
21653
 
21642
21654
 
21643
- var inputSchema24 = _zod.z.object({
21655
+ var inputSchema25 = _zod.z.object({
21644
21656
  ...getMediaByIdReferencedByParams.shape,
21645
21657
  ...getMediaByIdReferencedByQueryParams.shape
21646
21658
  }).shape;
@@ -21648,7 +21660,7 @@ var GetMediaByIdReferencedByTool = {
21648
21660
  name: "get-media-by-id-referenced-by",
21649
21661
  description: `Get items that reference a specific media item
21650
21662
  Use this to find all content, documents, or other items that are currently referencing a specific media item.`,
21651
- inputSchema: inputSchema24,
21663
+ inputSchema: inputSchema25,
21652
21664
  outputSchema: getMediaByIdReferencedByResponse.shape,
21653
21665
  annotations: { readOnlyHint: true },
21654
21666
  slices: ["references"],
@@ -21667,7 +21679,7 @@ var get_media_by_id_referenced_by_default = _mcpserversdk.withStandardDecorators
21667
21679
 
21668
21680
 
21669
21681
 
21670
- var inputSchema25 = _zod.z.object({
21682
+ var inputSchema26 = _zod.z.object({
21671
21683
  ...getMediaByIdReferencedDescendantsParams.shape,
21672
21684
  ...getMediaByIdReferencedDescendantsQueryParams.shape
21673
21685
  }).shape;
@@ -21680,7 +21692,7 @@ var GetMediaByIdReferencedDescendantsTool = {
21680
21692
  \u2022 Impact analysis: Before deleting a media folder, see what content would be affected
21681
21693
  \u2022 Dependency tracking: Find all content using media from a specific folder hierarchy
21682
21694
  \u2022 Content auditing: Identify which descendant media items are actually being used`,
21683
- inputSchema: inputSchema25,
21695
+ inputSchema: inputSchema26,
21684
21696
  outputSchema: getMediaByIdReferencedDescendantsResponse.shape,
21685
21697
  annotations: { readOnlyHint: true },
21686
21698
  slices: ["references"],
@@ -21819,7 +21831,7 @@ var MediaCollection = {
21819
21831
  tools.push(validate_media_default);
21820
21832
  tools.push(validate_media_default2);
21821
21833
  tools.push(sort_media_default);
21822
- if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _99 => _99.umbracoVersion]))) {
21834
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _94 => _94.umbracoVersion]))) {
21823
21835
  tools.push(sort_media_children_default);
21824
21836
  tools.push(sort_media_root_children_default);
21825
21837
  }
@@ -21840,7 +21852,7 @@ var MediaCollection = {
21840
21852
  tools.push(get_collection_media_default);
21841
21853
  tools.push(get_recycle_bin_media_referenced_by_default);
21842
21854
  tools.push(get_recycle_bin_media_original_parent_default);
21843
- if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _100 => _100.umbracoVersion]))) {
21855
+ if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _95 => _95.umbracoVersion]))) {
21844
21856
  tools.push(get_media_type_schema_default);
21845
21857
  }
21846
21858
  }
@@ -21898,7 +21910,7 @@ var get_media_type_by_id_default = _mcpserversdk.withStandardDecorators.call(voi
21898
21910
 
21899
21911
 
21900
21912
 
21901
- var inputSchema26 = _zod.z.object({
21913
+ var inputSchema27 = _zod.z.object({
21902
21914
  ids: _zod.z.array(_zod.z.string())
21903
21915
  });
21904
21916
  var outputSchema35 = _zod.z.object({
@@ -21907,7 +21919,7 @@ var outputSchema35 = _zod.z.object({
21907
21919
  var GetMediaTypeByIdsTool = {
21908
21920
  name: "get-media-type-by-ids",
21909
21921
  description: "Gets media types by ids",
21910
- inputSchema: inputSchema26.shape,
21922
+ inputSchema: inputSchema27.shape,
21911
21923
  outputSchema: outputSchema35.shape,
21912
21924
  annotations: { readOnlyHint: true },
21913
21925
  slices: ["list"],
@@ -22020,13 +22032,13 @@ var get_media_type_allowed_at_root_default = _mcpserversdk.withStandardDecorator
22020
22032
 
22021
22033
 
22022
22034
 
22023
- var inputSchema27 = getMediaTypeByIdAllowedChildrenParams.merge(
22035
+ var inputSchema28 = getMediaTypeByIdAllowedChildrenParams.merge(
22024
22036
  getMediaTypeByIdAllowedChildrenQueryParams
22025
22037
  );
22026
22038
  var GetMediaTypeAllowedChildrenTool = {
22027
22039
  name: "get-media-type-allowed-children",
22028
22040
  description: "Gets the media types that are allowed as children of a media type",
22029
- inputSchema: inputSchema27.shape,
22041
+ inputSchema: inputSchema28.shape,
22030
22042
  outputSchema: getMediaTypeByIdAllowedChildrenResponse.shape,
22031
22043
  annotations: { readOnlyHint: true },
22032
22044
  slices: ["configuration"],
@@ -22274,7 +22286,7 @@ var CreateMediaTypeFolderTool = {
22274
22286
  validateStatus: () => true
22275
22287
  });
22276
22288
  if (response.status === 201) {
22277
- const locationHeader = _optionalChain([response, 'access', _101 => _101.headers, 'optionalAccess', _102 => _102["location"]]) || _optionalChain([response, 'access', _103 => _103.headers, 'optionalAccess', _104 => _104["Location"]]);
22289
+ const locationHeader = _optionalChain([response, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97["location"]]) || _optionalChain([response, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99["Location"]]);
22278
22290
  let createdId = model.id || "";
22279
22291
  if (locationHeader) {
22280
22292
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22326,14 +22338,14 @@ var delete_folder_default4 = _mcpserversdk.withStandardDecorators.call(void 0, D
22326
22338
 
22327
22339
 
22328
22340
 
22329
- var inputSchema28 = _zod.z.object({
22341
+ var inputSchema29 = _zod.z.object({
22330
22342
  id: putMediaTypeFolderByIdParams.shape.id,
22331
22343
  data: _zod.z.object(putMediaTypeFolderByIdBody.shape)
22332
22344
  });
22333
22345
  var UpdateMediaTypeFolderTool = {
22334
22346
  name: "update-media-type-folder",
22335
22347
  description: "Updates a media type folder by Id",
22336
- inputSchema: inputSchema28.shape,
22348
+ inputSchema: inputSchema29.shape,
22337
22349
  annotations: { idempotentHint: true },
22338
22350
  slices: ["update", "folders"],
22339
22351
  handler: (async (model) => {
@@ -22408,7 +22420,7 @@ var CreateMediaTypeTool = {
22408
22420
  validateStatus: () => true
22409
22421
  });
22410
22422
  if (response.status === 201) {
22411
- const locationHeader = _optionalChain([response, 'access', _105 => _105.headers, 'optionalAccess', _106 => _106["location"]]) || _optionalChain([response, 'access', _107 => _107.headers, 'optionalAccess', _108 => _108["Location"]]);
22423
+ const locationHeader = _optionalChain([response, 'access', _100 => _100.headers, 'optionalAccess', _101 => _101["location"]]) || _optionalChain([response, 'access', _102 => _102.headers, 'optionalAccess', _103 => _103["Location"]]);
22412
22424
  let createdId = model.id || "";
22413
22425
  if (locationHeader) {
22414
22426
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22438,7 +22450,7 @@ var create_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
22438
22450
 
22439
22451
 
22440
22452
 
22441
- var inputSchema29 = _zod.z.object({
22453
+ var inputSchema30 = _zod.z.object({
22442
22454
  id: _zod.z.string().uuid(),
22443
22455
  data: _zod.z.object(postMediaTypeByIdCopyBody.shape)
22444
22456
  });
@@ -22449,7 +22461,7 @@ var copyMediaTypeOutputSchema = _zod.z.object({
22449
22461
  var CopyMediaTypeTool = {
22450
22462
  name: "copy-media-type",
22451
22463
  description: "Copy a media type to a new location",
22452
- inputSchema: inputSchema29.shape,
22464
+ inputSchema: inputSchema30.shape,
22453
22465
  outputSchema: copyMediaTypeOutputSchema.shape,
22454
22466
  slices: ["copy"],
22455
22467
  handler: (async (model) => {
@@ -22459,7 +22471,7 @@ var CopyMediaTypeTool = {
22459
22471
  validateStatus: () => true
22460
22472
  });
22461
22473
  if (response.status === 201) {
22462
- const locationHeader = _optionalChain([response, 'access', _109 => _109.headers, 'optionalAccess', _110 => _110["location"]]) || _optionalChain([response, 'access', _111 => _111.headers, 'optionalAccess', _112 => _112["Location"]]);
22474
+ const locationHeader = _optionalChain([response, 'access', _104 => _104.headers, 'optionalAccess', _105 => _105["location"]]) || _optionalChain([response, 'access', _106 => _106.headers, 'optionalAccess', _107 => _107["Location"]]);
22463
22475
  let createdId = "";
22464
22476
  if (locationHeader) {
22465
22477
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22514,14 +22526,14 @@ var get_media_type_available_compositions_default = _mcpserversdk.withStandardDe
22514
22526
 
22515
22527
 
22516
22528
 
22517
- var inputSchema30 = _zod.z.object({
22529
+ var inputSchema31 = _zod.z.object({
22518
22530
  id: putMediaTypeByIdParams.shape.id,
22519
22531
  data: _zod.z.object(putMediaTypeByIdBody.shape)
22520
22532
  });
22521
22533
  var UpdateMediaTypeTool = {
22522
22534
  name: "update-media-type",
22523
22535
  description: "Updates a media type by Id",
22524
- inputSchema: inputSchema30.shape,
22536
+ inputSchema: inputSchema31.shape,
22525
22537
  annotations: { idempotentHint: true },
22526
22538
  slices: ["update"],
22527
22539
  handler: (async (model) => {
@@ -22539,14 +22551,14 @@ var update_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
22539
22551
 
22540
22552
 
22541
22553
 
22542
- var inputSchema31 = _zod.z.object({
22554
+ var inputSchema32 = _zod.z.object({
22543
22555
  id: _zod.z.string().uuid(),
22544
22556
  data: _zod.z.object(putMediaTypeByIdMoveBody.shape)
22545
22557
  });
22546
22558
  var MoveMediaTypeTool = {
22547
22559
  name: "move-media-type",
22548
22560
  description: "Move a media type to a new location",
22549
- inputSchema: inputSchema31.shape,
22561
+ inputSchema: inputSchema32.shape,
22550
22562
  annotations: { idempotentHint: true },
22551
22563
  slices: ["move"],
22552
22564
  handler: (async (model) => {
@@ -22669,7 +22681,7 @@ var CreateMemberTool = {
22669
22681
  validateStatus: () => true
22670
22682
  });
22671
22683
  if (response.status === 201) {
22672
- const locationHeader = _optionalChain([response, 'access', _113 => _113.headers, 'optionalAccess', _114 => _114["location"]]) || _optionalChain([response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116["Location"]]);
22684
+ const locationHeader = _optionalChain([response, 'access', _108 => _108.headers, 'optionalAccess', _109 => _109["location"]]) || _optionalChain([response, 'access', _110 => _110.headers, 'optionalAccess', _111 => _111["Location"]]);
22673
22685
  let createdId = model.id || "";
22674
22686
  if (locationHeader) {
22675
22687
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22742,14 +22754,14 @@ var delete_member_default = _mcpserversdk.withStandardDecorators.call(void 0, De
22742
22754
 
22743
22755
 
22744
22756
 
22745
- var inputSchema32 = _zod.z.object({
22757
+ var inputSchema33 = _zod.z.object({
22746
22758
  id: putMemberByIdParams.shape.id,
22747
22759
  data: _zod.z.object(putMemberByIdBody.shape)
22748
22760
  });
22749
22761
  var UpdateMemberTool = {
22750
22762
  name: "update-member",
22751
22763
  description: "Updates a member by Id",
22752
- inputSchema: inputSchema32.shape,
22764
+ inputSchema: inputSchema33.shape,
22753
22765
  annotations: { idempotentHint: true },
22754
22766
  slices: ["update"],
22755
22767
  handler: (async (model) => {
@@ -22767,7 +22779,7 @@ var update_member_default = _mcpserversdk.withStandardDecorators.call(void 0, Up
22767
22779
 
22768
22780
 
22769
22781
 
22770
- var inputSchema33 = _zod.z.object({
22782
+ var inputSchema34 = _zod.z.object({
22771
22783
  id: putMemberByIdValidateParams.shape.id,
22772
22784
  data: _zod.z.object(putMemberByIdValidateBody.shape)
22773
22785
  });
@@ -22775,7 +22787,7 @@ var ValidateMemberUpdateTool = {
22775
22787
  name: "validate-member-update",
22776
22788
  description: `Validates member data before updating using the Umbraco API.
22777
22789
  Use this endpoint to validate member data structure, properties, and business rules before attempting to update an existing member.`,
22778
- inputSchema: inputSchema33.shape,
22790
+ inputSchema: inputSchema34.shape,
22779
22791
  annotations: { readOnlyHint: true },
22780
22792
  slices: ["validate"],
22781
22793
  handler: (async (model) => {
@@ -22835,12 +22847,12 @@ var get_member_are_referenced_default = _mcpserversdk.withStandardDecorators.cal
22835
22847
 
22836
22848
 
22837
22849
 
22838
- var inputSchema34 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
22850
+ var inputSchema35 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
22839
22851
  var GetMemberByIdReferencedByTool = {
22840
22852
  name: "get-member-by-id-referenced-by",
22841
22853
  description: `Get items that reference a specific member
22842
22854
  Use this to find all content, documents, or other items that are currently referencing a specific member account.`,
22843
- inputSchema: inputSchema34.shape,
22855
+ inputSchema: inputSchema35.shape,
22844
22856
  outputSchema: getMemberByIdReferencedByResponse.shape,
22845
22857
  annotations: { readOnlyHint: true },
22846
22858
  slices: ["references"],
@@ -22858,12 +22870,12 @@ var get_member_by_id_referenced_by_default = _mcpserversdk.withStandardDecorator
22858
22870
 
22859
22871
 
22860
22872
 
22861
- var inputSchema35 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
22873
+ var inputSchema36 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
22862
22874
  var GetMemberByIdReferencedDescendantsTool = {
22863
22875
  name: "get-member-by-id-referenced-descendants",
22864
22876
  description: `Get descendant references for a member
22865
22877
  Use this to find all descendant references that are being referenced for a specific member account.`,
22866
- inputSchema: inputSchema35.shape,
22878
+ inputSchema: inputSchema36.shape,
22867
22879
  outputSchema: getMemberByIdReferencedDescendantsResponse.shape,
22868
22880
  annotations: { readOnlyHint: true },
22869
22881
  slices: ["references"],
@@ -22976,7 +22988,7 @@ var MemberCollection = {
22976
22988
  tools.push(get_member_are_referenced_default);
22977
22989
  tools.push(get_member_by_id_referenced_by_default);
22978
22990
  tools.push(get_member_by_id_referenced_descendants_default);
22979
- if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _117 => _117.umbracoVersion]))) {
22991
+ if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _112 => _112.umbracoVersion]))) {
22980
22992
  tools.push(get_member_type_schema_default);
22981
22993
  }
22982
22994
  }
@@ -23129,14 +23141,14 @@ var create_member_group_default = _mcpserversdk.withStandardDecorators.call(void
23129
23141
 
23130
23142
 
23131
23143
 
23132
- var inputSchema36 = {
23144
+ var inputSchema37 = {
23133
23145
  id: putMemberGroupByIdParams.shape.id,
23134
23146
  data: _zod.z.object(putMemberGroupByIdBody.shape)
23135
23147
  };
23136
23148
  var UpdateMemberGroupTool = {
23137
23149
  name: "update-member-group",
23138
23150
  description: "Updates a member group by Id",
23139
- inputSchema: inputSchema36,
23151
+ inputSchema: inputSchema37,
23140
23152
  annotations: {
23141
23153
  idempotentHint: true
23142
23154
  },
@@ -23220,7 +23232,7 @@ var CreateMemberTypeTool = {
23220
23232
  validateStatus: () => true
23221
23233
  });
23222
23234
  if (response.status === 201) {
23223
- const locationHeader = _optionalChain([response, 'access', _118 => _118.headers, 'optionalAccess', _119 => _119["location"]]) || _optionalChain([response, 'access', _120 => _120.headers, 'optionalAccess', _121 => _121["Location"]]);
23235
+ const locationHeader = _optionalChain([response, 'access', _113 => _113.headers, 'optionalAccess', _114 => _114["location"]]) || _optionalChain([response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116["Location"]]);
23224
23236
  let createdId = model.id || "";
23225
23237
  if (locationHeader) {
23226
23238
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -23345,14 +23357,14 @@ var delete_member_type_default = _mcpserversdk.withStandardDecorators.call(void
23345
23357
 
23346
23358
 
23347
23359
 
23348
- var inputSchema37 = _zod.z.object({
23360
+ var inputSchema38 = _zod.z.object({
23349
23361
  id: putMemberTypeByIdParams.shape.id,
23350
23362
  data: _zod.z.object(putMemberTypeByIdBody.shape)
23351
23363
  });
23352
23364
  var UpdateMemberTypeTool = {
23353
23365
  name: "update-member-type",
23354
23366
  description: "Updates a member type by id",
23355
- inputSchema: inputSchema37.shape,
23367
+ inputSchema: inputSchema38.shape,
23356
23368
  annotations: { idempotentHint: true },
23357
23369
  slices: ["update"],
23358
23370
  handler: (async (model) => {
@@ -23370,7 +23382,7 @@ var update_member_type_default = _mcpserversdk.withStandardDecorators.call(void
23370
23382
 
23371
23383
 
23372
23384
 
23373
- var inputSchema38 = _zod.z.object({
23385
+ var inputSchema39 = _zod.z.object({
23374
23386
  id: _zod.z.string().uuid()
23375
23387
  });
23376
23388
  var copyMemberTypeOutputSchema = _zod.z.object({
@@ -23380,7 +23392,7 @@ var copyMemberTypeOutputSchema = _zod.z.object({
23380
23392
  var CopyMemberTypeTool = {
23381
23393
  name: "copy-member-type",
23382
23394
  description: "Copy a member type to a new location",
23383
- inputSchema: inputSchema38.shape,
23395
+ inputSchema: inputSchema39.shape,
23384
23396
  outputSchema: copyMemberTypeOutputSchema.shape,
23385
23397
  slices: ["copy"],
23386
23398
  handler: (async (model) => {
@@ -23390,7 +23402,7 @@ var CopyMemberTypeTool = {
23390
23402
  validateStatus: () => true
23391
23403
  });
23392
23404
  if (response.status === 201) {
23393
- const locationHeader = _optionalChain([response, 'access', _122 => _122.headers, 'optionalAccess', _123 => _123["location"]]) || _optionalChain([response, 'access', _124 => _124.headers, 'optionalAccess', _125 => _125["Location"]]);
23405
+ const locationHeader = _optionalChain([response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118["location"]]) || _optionalChain([response, 'access', _119 => _119.headers, 'optionalAccess', _120 => _120["Location"]]);
23394
23406
  let createdId = "";
23395
23407
  if (locationHeader) {
23396
23408
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -23750,7 +23762,7 @@ var CreatePartialViewTool = {
23750
23762
  validateStatus: () => true
23751
23763
  });
23752
23764
  if (response.status === 201) {
23753
- const locationHeader = _optionalChain([response, 'access', _126 => _126.headers, 'optionalAccess', _127 => _127["location"]]) || _optionalChain([response, 'access', _128 => _128.headers, 'optionalAccess', _129 => _129["Location"]]);
23765
+ const locationHeader = _optionalChain([response, 'access', _121 => _121.headers, 'optionalAccess', _122 => _122["location"]]) || _optionalChain([response, 'access', _123 => _123.headers, 'optionalAccess', _124 => _124["Location"]]);
23754
23766
  let createdPath = "";
23755
23767
  if (locationHeader) {
23756
23768
  const pathMatch = locationHeader.match(/partial-view\/(.+)$/);
@@ -23797,7 +23809,7 @@ var CreatePartialViewFolderTool = {
23797
23809
  validateStatus: () => true
23798
23810
  });
23799
23811
  if (response.status === 201) {
23800
- const locationHeader = _optionalChain([response, 'access', _130 => _130.headers, 'optionalAccess', _131 => _131["location"]]) || _optionalChain([response, 'access', _132 => _132.headers, 'optionalAccess', _133 => _133["Location"]]);
23812
+ const locationHeader = _optionalChain([response, 'access', _125 => _125.headers, 'optionalAccess', _126 => _126["location"]]) || _optionalChain([response, 'access', _127 => _127.headers, 'optionalAccess', _128 => _128["Location"]]);
23801
23813
  let createdPath = "";
23802
23814
  if (locationHeader) {
23803
23815
  const pathMatch = locationHeader.match(/partial-view\/folder\/(.+)$/);
@@ -24198,14 +24210,20 @@ var PropertyTypeCollection = {
24198
24210
  var GetAllRedirectsTool = {
24199
24211
  name: "get-all-redirects",
24200
24212
  description: `Gets all redirects from the Umbraco server.
24201
- Returns a list of redirects with their details.`,
24202
- inputSchema: {},
24213
+
24214
+ Returns a list of redirects with their details. Use "filter" to search redirects by original or
24215
+ destination URL.
24216
+
24217
+ Results are paginated (100 per page by default). Check the returned "total" against the number of
24218
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
24219
+ to page through the remaining redirects.`,
24220
+ inputSchema: getRedirectManagementQueryParams.shape,
24203
24221
  outputSchema: getRedirectManagementResponse.shape,
24204
24222
  annotations: { readOnlyHint: true },
24205
24223
  slices: ["list"],
24206
- handler: (async () => {
24224
+ handler: (async (params) => {
24207
24225
  return _mcpserversdk.executeGetApiCall.call(void 0,
24208
- (client) => client.getRedirectManagement(void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
24226
+ (client) => client.getRedirectManagement(params, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
24209
24227
  );
24210
24228
  })
24211
24229
  };
@@ -24624,7 +24642,7 @@ var CreateScriptTool = {
24624
24642
  validateStatus: () => true
24625
24643
  });
24626
24644
  if (response.status === 201) {
24627
- const locationHeader = _optionalChain([response, 'access', _134 => _134.headers, 'optionalAccess', _135 => _135["location"]]) || _optionalChain([response, 'access', _136 => _136.headers, 'optionalAccess', _137 => _137["Location"]]);
24645
+ const locationHeader = _optionalChain([response, 'access', _129 => _129.headers, 'optionalAccess', _130 => _130["location"]]) || _optionalChain([response, 'access', _131 => _131.headers, 'optionalAccess', _132 => _132["Location"]]);
24628
24646
  let createdPath = "";
24629
24647
  if (locationHeader) {
24630
24648
  const pathMatch = locationHeader.match(/script\/(.+)$/);
@@ -24671,7 +24689,7 @@ var CreateScriptFolderTool = {
24671
24689
  validateStatus: () => true
24672
24690
  });
24673
24691
  if (response.status === 201) {
24674
- const locationHeader = _optionalChain([response, 'access', _138 => _138.headers, 'optionalAccess', _139 => _139["location"]]) || _optionalChain([response, 'access', _140 => _140.headers, 'optionalAccess', _141 => _141["Location"]]);
24692
+ const locationHeader = _optionalChain([response, 'access', _133 => _133.headers, 'optionalAccess', _134 => _134["location"]]) || _optionalChain([response, 'access', _135 => _135.headers, 'optionalAccess', _136 => _136["Location"]]);
24675
24693
  let createdPath = "";
24676
24694
  if (locationHeader) {
24677
24695
  const pathMatch = locationHeader.match(/script\/folder\/(.+)$/);
@@ -25268,7 +25286,7 @@ var CreateStylesheetTool = {
25268
25286
  validateStatus: () => true
25269
25287
  });
25270
25288
  if (response.status === 201) {
25271
- const locationHeader = _optionalChain([response, 'access', _142 => _142.headers, 'optionalAccess', _143 => _143["location"]]) || _optionalChain([response, 'access', _144 => _144.headers, 'optionalAccess', _145 => _145["Location"]]);
25289
+ const locationHeader = _optionalChain([response, 'access', _137 => _137.headers, 'optionalAccess', _138 => _138["location"]]) || _optionalChain([response, 'access', _139 => _139.headers, 'optionalAccess', _140 => _140["Location"]]);
25272
25290
  let createdPath = "";
25273
25291
  if (locationHeader) {
25274
25292
  const pathMatch = locationHeader.match(/stylesheet\/(.+)$/);
@@ -25315,7 +25333,7 @@ var CreateStylesheetFolderTool = {
25315
25333
  validateStatus: () => true
25316
25334
  });
25317
25335
  if (response.status === 201) {
25318
- const locationHeader = _optionalChain([response, 'access', _146 => _146.headers, 'optionalAccess', _147 => _147["location"]]) || _optionalChain([response, 'access', _148 => _148.headers, 'optionalAccess', _149 => _149["Location"]]);
25336
+ const locationHeader = _optionalChain([response, 'access', _141 => _141.headers, 'optionalAccess', _142 => _142["location"]]) || _optionalChain([response, 'access', _143 => _143.headers, 'optionalAccess', _144 => _144["Location"]]);
25319
25337
  let createdPath = "";
25320
25338
  if (locationHeader) {
25321
25339
  const pathMatch = locationHeader.match(/stylesheet\/folder\/(.+)$/);
@@ -25679,7 +25697,7 @@ var CreateTemplateTool = {
25679
25697
  validateStatus: () => true
25680
25698
  });
25681
25699
  if (response.status === 201) {
25682
- const locationHeader = _optionalChain([response, 'access', _150 => _150.headers, 'optionalAccess', _151 => _151["location"]]) || _optionalChain([response, 'access', _152 => _152.headers, 'optionalAccess', _153 => _153["Location"]]);
25700
+ const locationHeader = _optionalChain([response, 'access', _145 => _145.headers, 'optionalAccess', _146 => _146["location"]]) || _optionalChain([response, 'access', _147 => _147.headers, 'optionalAccess', _148 => _148["Location"]]);
25683
25701
  let createdId = "";
25684
25702
  if (locationHeader) {
25685
25703
  const idMatch = locationHeader.match(/template\/([a-f0-9-]+)$/i);
@@ -26493,14 +26511,14 @@ var get_user_batch_default = _mcpserversdk.withStandardDecorators.call(void 0, G
26493
26511
 
26494
26512
 
26495
26513
 
26496
- var inputSchema39 = _zod.z.object({
26514
+ var inputSchema40 = _zod.z.object({
26497
26515
  ...postUserAvatarByIdParams.shape,
26498
26516
  ...postUserAvatarByIdBody.shape
26499
26517
  });
26500
26518
  var UploadUserAvatarByIdTool = {
26501
26519
  name: "upload-user-avatar-by-id",
26502
26520
  description: "Uploads an avatar for a specific user by ID (admin only or self-service)",
26503
- inputSchema: inputSchema39.shape,
26521
+ inputSchema: inputSchema40.shape,
26504
26522
  slices: ["update"],
26505
26523
  handler: (async ({ id, file }) => {
26506
26524
  return _mcpserversdk.executeVoidApiCall.call(void 0,
@@ -26621,7 +26639,7 @@ var UserCollection = {
26621
26639
  tools.push(get_item_user_default);
26622
26640
  tools.push(get_user_configuration_default);
26623
26641
  tools.push(get_user_by_id_calculate_start_nodes_default);
26624
- if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _154 => _154.umbracoVersion]))) {
26642
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _149 => _149.umbracoVersion]))) {
26625
26643
  tools.push(get_user_batch_default);
26626
26644
  }
26627
26645
  tools.push(upload_user_avatar_by_id_default);
@@ -26655,7 +26673,7 @@ var CreateUserDataTool = {
26655
26673
  validateStatus: () => true
26656
26674
  });
26657
26675
  if (response.status === 201) {
26658
- const locationHeader = _optionalChain([response, 'access', _155 => _155.headers, 'optionalAccess', _156 => _156["location"]]) || _optionalChain([response, 'access', _157 => _157.headers, 'optionalAccess', _158 => _158["Location"]]);
26676
+ const locationHeader = _optionalChain([response, 'access', _150 => _150.headers, 'optionalAccess', _151 => _151["location"]]) || _optionalChain([response, 'access', _152 => _152.headers, 'optionalAccess', _153 => _153["Location"]]);
26659
26677
  let createdId = "";
26660
26678
  if (locationHeader) {
26661
26679
  const idMatch = locationHeader.match(/user-data\/([a-f0-9-]+)$/i);
@@ -26893,7 +26911,7 @@ var CreateUserGroupTool = {
26893
26911
  validateStatus: () => true
26894
26912
  });
26895
26913
  if (response.status === 201) {
26896
- const locationHeader = _optionalChain([response, 'access', _159 => _159.headers, 'optionalAccess', _160 => _160["location"]]) || _optionalChain([response, 'access', _161 => _161.headers, 'optionalAccess', _162 => _162["Location"]]);
26914
+ const locationHeader = _optionalChain([response, 'access', _154 => _154.headers, 'optionalAccess', _155 => _155["location"]]) || _optionalChain([response, 'access', _156 => _156.headers, 'optionalAccess', _157 => _157["Location"]]);
26897
26915
  let createdId = "";
26898
26916
  if (locationHeader) {
26899
26917
  const idMatch = locationHeader.match(/user-group\/([a-f0-9-]+)$/i);
@@ -27191,7 +27209,7 @@ var CreateWebhookTool = {
27191
27209
  validateStatus: () => true
27192
27210
  });
27193
27211
  if (response.status === 201) {
27194
- const locationHeader = _optionalChain([response, 'access', _163 => _163.headers, 'optionalAccess', _164 => _164["location"]]) || _optionalChain([response, 'access', _165 => _165.headers, 'optionalAccess', _166 => _166["Location"]]);
27212
+ const locationHeader = _optionalChain([response, 'access', _158 => _158.headers, 'optionalAccess', _159 => _159["location"]]) || _optionalChain([response, 'access', _160 => _160.headers, 'optionalAccess', _161 => _161["Location"]]);
27195
27213
  let createdId = "";
27196
27214
  if (locationHeader) {
27197
27215
  const idMatch = locationHeader.match(/webhook\/([a-f0-9-]+)$/i);
@@ -27220,16 +27238,25 @@ var create_webhook_default = _mcpserversdk.withStandardDecorators.call(void 0, C
27220
27238
 
27221
27239
 
27222
27240
 
27241
+
27242
+ var inputSchema41 = _zod.z.object({
27243
+ ...getWebhookByIdLogsParams.shape,
27244
+ ...getWebhookByIdLogsQueryParams.shape
27245
+ });
27223
27246
  var GetWebhookLogsTool = {
27224
27247
  name: "get-webhook-logs",
27225
- description: "Gets logs for a specific webhook",
27226
- inputSchema: getWebhookByIdLogsParams.shape,
27248
+ description: `Gets logs for a specific webhook.
27249
+
27250
+ Results are paginated (100 per page by default). Check the returned "total" against the number of
27251
+ "items" returned - if total is greater, call again with "cursor" set to the returned "nextCursor"
27252
+ to page through the remaining logs.`,
27253
+ inputSchema: inputSchema41.shape,
27227
27254
  outputSchema: getWebhookByIdLogsResponse.shape,
27228
27255
  annotations: { readOnlyHint: true },
27229
27256
  slices: ["read"],
27230
- handler: (async ({ id }) => {
27257
+ handler: (async ({ id, skip, take }) => {
27231
27258
  return _mcpserversdk.executeGetApiCall.call(void 0,
27232
- (client) => client.getWebhookByIdLogs(id, void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27259
+ (client) => client.getWebhookByIdLogs(id, { skip, take }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27233
27260
  );
27234
27261
  })
27235
27262
  };
@@ -27427,4 +27454,4 @@ var allSliceNames = [...toolSliceNames, "other"];
27427
27454
 
27428
27455
 
27429
27456
  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;
27430
- //# sourceMappingURL=chunk-WAZSHKMB.cjs.map
27457
+ //# sourceMappingURL=chunk-7BJSON54.cjs.map