@umbraco-cms/mcp-dev 17.6.10 → 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
@@ -4726,6 +4707,7 @@ var UmbracoManagementClient3 = (_class = class {
4726
4707
  }, _class.__initStatic(), _class);
4727
4708
 
4728
4709
  // src/umbraco-api/runtime-context.ts
4710
+
4729
4711
  var umbracoVersion = null;
4730
4712
  var allowFilePathUploads = false;
4731
4713
  function setAllowFilePathUploads(allow) {
@@ -4737,9 +4719,10 @@ function isFilePathUploadAllowed() {
4737
4719
  function setUmbracoVersion(version) {
4738
4720
  umbracoVersion = _nullishCoalesce(version, () => ( null));
4739
4721
  }
4740
- function isUmbracoAtLeast(major, minor) {
4741
- if (!umbracoVersion) return false;
4742
- const [maj, min] = umbracoVersion.split(".").map((n) => parseInt(n, 10));
4722
+ function isUmbracoAtLeast(major, minor, requestVersion) {
4723
+ const version = _nullishCoalesce(_nullishCoalesce(requestVersion, () => ( _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _2 => _2[_mcpserversdk.UMBRACO_VERSION_CONTEXT_KEY]]))), () => ( umbracoVersion));
4724
+ if (!version) return false;
4725
+ const [maj, min] = version.split(".").map((n) => parseInt(n, 10));
4743
4726
  if (Number.isNaN(maj) || Number.isNaN(min)) return false;
4744
4727
  if (maj > major) return true;
4745
4728
  if (maj < major) return false;
@@ -12552,12 +12535,23 @@ var get_data_type_configuration_default = _mcpserversdk.withStandardDecorators.c
12552
12535
 
12553
12536
  // src/umbraco-api/tools/data-type/get/get-data-type-schema-modern.ts
12554
12537
 
12538
+
12539
+
12540
+
12541
+
12555
12542
  async function getDataTypeSchemaFromApi(id) {
12556
12543
  const client = UmbracoManagementClient3.getClient();
12557
12544
  const response = await client.getDataTypeByIdSchema(
12558
12545
  id,
12559
12546
  _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
12560
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
+ }
12561
12555
  return _nullishCoalesce(response.data, () => ( {}));
12562
12556
  }
12563
12557
 
@@ -12940,7 +12934,7 @@ async function synthesizeDataTypeSchema(id) {
12940
12934
  const client = UmbracoManagementClient3.getClient();
12941
12935
  const dataType = await client.getDataTypeById(id);
12942
12936
  const template = findTemplateByEditorAlias(dataType.editorAlias);
12943
- const valueTypeName = _nullishCoalesce(VALUE_TYPE_BY_EDITOR_ALIAS[dataType.editorAlias], () => ( (_optionalChain([template, 'optionalAccess', _9 => _9.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)));
12944
12938
  const jsonSchema = {
12945
12939
  $schema: "https://json-schema.org/draft/2020-12/schema",
12946
12940
  title: dataType.name,
@@ -12948,8 +12942,8 @@ async function synthesizeDataTypeSchema(id) {
12948
12942
  dataTypeId: dataType.id,
12949
12943
  editorAlias: dataType.editorAlias,
12950
12944
  editorUiAlias: dataType.editorUiAlias,
12951
- example: _optionalChain([template, 'optionalAccess', _10 => _10.value]),
12952
- notes: _optionalChain([template, 'optionalAccess', _11 => _11._notes])
12945
+ example: _optionalChain([template, 'optionalAccess', _5 => _5.value]),
12946
+ notes: _optionalChain([template, 'optionalAccess', _6 => _6._notes])
12953
12947
  };
12954
12948
  return { valueTypeName, jsonSchema };
12955
12949
  }
@@ -13070,7 +13064,7 @@ var CopyDataTypeTool = {
13070
13064
  validateStatus: () => true
13071
13065
  });
13072
13066
  if (response.status === 201) {
13073
- const location = _optionalChain([response, 'access', _12 => _12.headers, 'optionalAccess', _13 => _13.location]) || "";
13067
+ const location = _optionalChain([response, 'access', _7 => _7.headers, 'optionalAccess', _8 => _8.location]) || "";
13074
13068
  const newId = location.split("/").pop() || "";
13075
13069
  const output = {
13076
13070
  message: "Data type copied successfully",
@@ -13144,6 +13138,11 @@ var move_data_type_default = _mcpserversdk.withStandardDecorators.call(void 0, M
13144
13138
 
13145
13139
 
13146
13140
 
13141
+
13142
+ var inputSchema = _zod.z.object({
13143
+ ...getDataTypeByIdReferencedByParams.shape,
13144
+ ...getDataTypeByIdReferencedByQueryParams.shape
13145
+ });
13147
13146
  var GetReferencesDataTypeTool = {
13148
13147
  name: "get-references-data-type",
13149
13148
  description: `Gets the document types and properties that use a specific data type.
@@ -13157,16 +13156,20 @@ var GetReferencesDataTypeTool = {
13157
13156
 
13158
13157
  Returns a detailed list with content type information (id, type, name, icon) and all properties
13159
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.
13160
13163
  `,
13161
- inputSchema: getDataTypeByIdReferencedByParams.shape,
13164
+ inputSchema: inputSchema.shape,
13162
13165
  outputSchema: getDataTypeByIdReferencedByResponse.shape,
13163
13166
  annotations: {
13164
13167
  readOnlyHint: true
13165
13168
  },
13166
13169
  slices: ["references"],
13167
- handler: (async ({ id }) => {
13170
+ handler: (async ({ id, skip, take }) => {
13168
13171
  return _mcpserversdk.executeGetApiCall.call(void 0,
13169
- (client) => client.getDataTypeByIdReferencedBy(id, void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
13172
+ (client) => client.getDataTypeByIdReferencedBy(id, { skip, take }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
13170
13173
  );
13171
13174
  })
13172
13175
  };
@@ -13542,7 +13545,7 @@ var DataTypeCollection = {
13542
13545
  description: "Data type definitions and management",
13543
13546
  dependencies: []
13544
13547
  },
13545
- tools: (user) => {
13548
+ tools: (user, options) => {
13546
13549
  const tools = [get_search_default];
13547
13550
  if (AuthorizationPolicies.TreeAccessDocumentsOrMediaOrMembersOrContentTypes(user)) {
13548
13551
  tools.push(get_references_data_type_default);
@@ -13552,7 +13555,7 @@ var DataTypeCollection = {
13552
13555
  tools.push(get_data_type_batch_default);
13553
13556
  tools.push(get_data_type_configuration_default);
13554
13557
  tools.push(get_data_type_schema_default);
13555
- if (isUmbracoAtLeast(17, 4)) {
13558
+ if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _9 => _9.umbracoVersion]))) {
13556
13559
  tools.push(get_data_type_schemas_default);
13557
13560
  }
13558
13561
  }
@@ -13711,7 +13714,7 @@ var CreateDictionaryItemTool = {
13711
13714
  validateStatus: () => true
13712
13715
  });
13713
13716
  if (response.status === 201) {
13714
- const locationHeader = _optionalChain([response, 'access', _14 => _14.headers, 'optionalAccess', _15 => _15["location"]]) || _optionalChain([response, 'access', _16 => _16.headers, 'optionalAccess', _17 => _17["Location"]]);
13717
+ const locationHeader = _optionalChain([response, 'access', _10 => _10.headers, 'optionalAccess', _11 => _11["location"]]) || _optionalChain([response, 'access', _12 => _12.headers, 'optionalAccess', _13 => _13["Location"]]);
13715
13718
  let createdId = model.id || "";
13716
13719
  if (locationHeader) {
13717
13720
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -14509,7 +14512,7 @@ var get_document_notifications_default = _mcpserversdk.withStandardDecorators.ca
14509
14512
 
14510
14513
 
14511
14514
 
14512
- var inputSchema = _zod.z.object({
14515
+ var inputSchema2 = _zod.z.object({
14513
14516
  ...getDocumentByIdPublicAccessParams.shape,
14514
14517
  ...getDocumentByIdPublicAccessQueryParams.shape
14515
14518
  });
@@ -14518,7 +14521,7 @@ var GetDocumentPublicAccessTool = {
14518
14521
  description: `Gets the public access settings for a document by Id.
14519
14522
  Set includeAncestors=true to also resolve protection inherited from an ancestor
14520
14523
  (the response's isProtectedByAncestor field reflects this).`,
14521
- inputSchema: inputSchema.shape,
14524
+ inputSchema: inputSchema2.shape,
14522
14525
  outputSchema: getDocumentByIdPublicAccessResponse.shape,
14523
14526
  annotations: {
14524
14527
  readOnlyHint: true
@@ -14539,14 +14542,14 @@ var get_document_public_access_default = _mcpserversdk.withStandardDecorators.ca
14539
14542
 
14540
14543
 
14541
14544
 
14542
- var inputSchema2 = {
14545
+ var inputSchema3 = {
14543
14546
  id: getDocumentByIdAuditLogParams.shape.id,
14544
14547
  ...getDocumentByIdAuditLogQueryParams.shape
14545
14548
  };
14546
14549
  var GetDocumentAuditLogTool = {
14547
14550
  name: "get-document-audit-log",
14548
14551
  description: "Fetches the audit log for a document by Id.",
14549
- inputSchema: inputSchema2,
14552
+ inputSchema: inputSchema3,
14550
14553
  outputSchema: getDocumentByIdAuditLogResponse.shape,
14551
14554
  annotations: {
14552
14555
  readOnlyHint: true
@@ -14648,12 +14651,23 @@ var get_document_urls_default = _mcpserversdk.withStandardDecorators.call(void 0
14648
14651
 
14649
14652
  // src/umbraco-api/tools/document/get/get-document-type-schema-modern.ts
14650
14653
 
14654
+
14655
+
14656
+
14657
+
14651
14658
  async function getDocumentTypeSchemaFromApi(id) {
14652
14659
  const client = UmbracoManagementClient3.getClient();
14653
14660
  const response = await client.getDocumentTypeByIdSchema(
14654
14661
  id,
14655
14662
  _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE
14656
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
+ }
14657
14671
  return { schema: response.data };
14658
14672
  }
14659
14673
 
@@ -14671,8 +14685,8 @@ function buildPropertyEntry(prop, dataType, template) {
14671
14685
  editorAlias: dataType.editorAlias,
14672
14686
  dataTypeId: dataType.id,
14673
14687
  dataTypeName: dataType.name,
14674
- example: _optionalChain([template, 'optionalAccess', _18 => _18.value]),
14675
- notes: _optionalChain([template, 'optionalAccess', _19 => _19._notes])
14688
+ example: _optionalChain([template, 'optionalAccess', _15 => _15.value]),
14689
+ notes: _optionalChain([template, 'optionalAccess', _16 => _16._notes])
14676
14690
  };
14677
14691
  }
14678
14692
  async function synthesizeDocumentTypeSchema(id) {
@@ -14753,7 +14767,7 @@ var search_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
14753
14767
 
14754
14768
 
14755
14769
 
14756
- var inputSchema3 = _zod.z.object({
14770
+ var inputSchema4 = _zod.z.object({
14757
14771
  ...getCollectionDocumentByIdParams.shape,
14758
14772
  ...getCollectionDocumentByIdQueryParams.shape
14759
14773
  });
@@ -14761,7 +14775,7 @@ var GetCollectionDocumentByIdTool = {
14761
14775
  name: "get-collection-document-by-id",
14762
14776
  description: `Get a collection of document items
14763
14777
  Use this to retrieve a filtered and paginated collection of document items based on various criteria like data type, ordering, and filtering.`,
14764
- inputSchema: inputSchema3.shape,
14778
+ inputSchema: inputSchema4.shape,
14765
14779
  outputSchema: getCollectionDocumentByIdResponse.shape,
14766
14780
  annotations: {
14767
14781
  readOnlyHint: true
@@ -14840,7 +14854,7 @@ var get_document_are_referenced_default = _mcpserversdk.withStandardDecorators.c
14840
14854
 
14841
14855
 
14842
14856
 
14843
- var inputSchema4 = _zod.z.object({
14857
+ var inputSchema5 = _zod.z.object({
14844
14858
  ...getDocumentByIdReferencedByParams.shape,
14845
14859
  ...getDocumentByIdReferencedByQueryParams.shape
14846
14860
  });
@@ -14848,7 +14862,7 @@ var GetDocumentByIdReferencedByTool = {
14848
14862
  name: "get-document-by-id-referenced-by",
14849
14863
  description: `Get items that reference a specific document item
14850
14864
  Use this to find all content, documents, or other items that are currently referencing a specific document item.`,
14851
- inputSchema: inputSchema4.shape,
14865
+ inputSchema: inputSchema5.shape,
14852
14866
  outputSchema: getDocumentByIdReferencedByResponse.shape,
14853
14867
  annotations: {
14854
14868
  readOnlyHint: true
@@ -14869,7 +14883,7 @@ var get_document_by_id_referenced_by_default = _mcpserversdk.withStandardDecorat
14869
14883
 
14870
14884
 
14871
14885
 
14872
- var inputSchema5 = _zod.z.object({
14886
+ var inputSchema6 = _zod.z.object({
14873
14887
  ...getDocumentByIdReferencedDescendantsParams.shape,
14874
14888
  ...getDocumentByIdReferencedDescendantsQueryParams.shape
14875
14889
  });
@@ -14882,7 +14896,7 @@ var GetDocumentByIdReferencedDescendantsTool = {
14882
14896
  \u2022 Impact analysis: Before deleting a document folder, see what content would be affected
14883
14897
  \u2022 Dependency tracking: Find all content using documents from a specific folder hierarchy
14884
14898
  \u2022 Content auditing: Identify which descendant document items are actually being used`,
14885
- inputSchema: inputSchema5.shape,
14899
+ inputSchema: inputSchema6.shape,
14886
14900
  outputSchema: getDocumentByIdReferencedDescendantsResponse.shape,
14887
14901
  annotations: {
14888
14902
  readOnlyHint: true
@@ -14903,7 +14917,7 @@ var get_document_by_id_referenced_descendants_default = _mcpserversdk.withStanda
14903
14917
 
14904
14918
 
14905
14919
 
14906
- var inputSchema6 = _zod.z.object({
14920
+ var inputSchema7 = _zod.z.object({
14907
14921
  ...getDocumentByIdAvailableSegmentOptionsParams.shape,
14908
14922
  ...getDocumentByIdAvailableSegmentOptionsQueryParams.shape
14909
14923
  });
@@ -14917,7 +14931,7 @@ var GetDocumentAvailableSegmentOptionsTool = {
14917
14931
  \u2022 Understanding what content variations are available for a document
14918
14932
  \u2022 Determining which segments can be used when creating or editing document content
14919
14933
  \u2022 Viewing segment names, aliases, and associated cultures`,
14920
- inputSchema: inputSchema6.shape,
14934
+ inputSchema: inputSchema7.shape,
14921
14935
  outputSchema: getDocumentByIdAvailableSegmentOptionsResponse.shape,
14922
14936
  annotations: {
14923
14937
  readOnlyHint: true
@@ -14986,14 +15000,14 @@ var get_recycle_bin_document_referenced_by_default = _mcpserversdk.withStandardD
14986
15000
 
14987
15001
 
14988
15002
 
14989
- var inputSchema7 = {
15003
+ var inputSchema8 = {
14990
15004
  id: postDocumentByIdPublicAccessParams.shape.id,
14991
15005
  data: _zod.z.object(postDocumentByIdPublicAccessBody.shape)
14992
15006
  };
14993
15007
  var PostDocumentPublicAccessTool = {
14994
15008
  name: "post-document-public-access",
14995
15009
  description: "Adds public access settings to a document by Id.",
14996
- inputSchema: inputSchema7,
15010
+ inputSchema: inputSchema8,
14997
15011
  slices: ["public-access"],
14998
15012
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.PublicAccess),
14999
15013
  handler: (async (model) => {
@@ -15074,7 +15088,7 @@ var CopyDocumentTool = {
15074
15088
  validateStatus: () => true
15075
15089
  });
15076
15090
  if (response.status === 201) {
15077
- const location = _optionalChain([response, 'access', _20 => _20.headers, 'optionalAccess', _21 => _21.location]) || "";
15091
+ const location = _optionalChain([response, 'access', _17 => _17.headers, 'optionalAccess', _18 => _18.location]) || "";
15078
15092
  const newId = location.split("/").pop() || "";
15079
15093
  const output = { id: newId };
15080
15094
  return _mcpserversdk.createToolResult.call(void 0, output);
@@ -15218,7 +15232,7 @@ var CreateDocumentTool = {
15218
15232
  template = { id: model.templateId };
15219
15233
  } else {
15220
15234
  const docType = await client.getDocumentTypeById(model.documentTypeId);
15221
- template = _optionalChain([docType, 'access', _22 => _22.defaultTemplate, 'optionalAccess', _23 => _23.id]) ? { id: docType.defaultTemplate.id } : null;
15235
+ template = _optionalChain([docType, 'access', _19 => _19.defaultTemplate, 'optionalAccess', _20 => _20.id]) ? { id: docType.defaultTemplate.id } : null;
15222
15236
  }
15223
15237
  const payload = {
15224
15238
  id: documentId,
@@ -15396,7 +15410,7 @@ var CreateAndPublishDocumentTool = {
15396
15410
  template = { id: model.templateId };
15397
15411
  } else {
15398
15412
  const docType = await client.getDocumentTypeById(model.documentTypeId);
15399
- template = _optionalChain([docType, 'access', _24 => _24.defaultTemplate, 'optionalAccess', _25 => _25.id]) ? { id: docType.defaultTemplate.id } : null;
15413
+ template = _optionalChain([docType, 'access', _21 => _21.defaultTemplate, 'optionalAccess', _22 => _22.id]) ? { id: docType.defaultTemplate.id } : null;
15400
15414
  }
15401
15415
  const payload = {
15402
15416
  id: documentId,
@@ -15434,14 +15448,14 @@ var create_and_publish_document_default = _mcpserversdk.withStandardDecorators.c
15434
15448
 
15435
15449
 
15436
15450
 
15437
- var inputSchema8 = {
15451
+ var inputSchema9 = {
15438
15452
  id: putDocumentByIdPublicAccessParams.shape.id,
15439
15453
  data: _zod.z.object(putDocumentByIdPublicAccessBody.shape)
15440
15454
  };
15441
15455
  var PutDocumentPublicAccessTool = {
15442
15456
  name: "put-document-public-access",
15443
15457
  description: "Updates public access settings for a document by Id.",
15444
- inputSchema: inputSchema8,
15458
+ inputSchema: inputSchema9,
15445
15459
  annotations: {
15446
15460
  idempotentHint: true
15447
15461
  },
@@ -15462,7 +15476,7 @@ var put_document_public_access_default = _mcpserversdk.withStandardDecorators.ca
15462
15476
 
15463
15477
 
15464
15478
 
15465
- var inputSchema9 = {
15479
+ var inputSchema10 = {
15466
15480
  id: putDocumentByIdDomainsParams.shape.id,
15467
15481
  data: _zod.z.object(putDocumentByIdDomainsBody.shape)
15468
15482
  };
@@ -15470,7 +15484,7 @@ var PutDocumentDomainsTool = {
15470
15484
  name: "put-document-domains",
15471
15485
  description: `Updates the domains assigned to a document by Id. Default value of the defaultIsoCode is null.
15472
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.`,
15473
- inputSchema: inputSchema9,
15487
+ inputSchema: inputSchema10,
15474
15488
  annotations: {
15475
15489
  idempotentHint: true
15476
15490
  },
@@ -15491,14 +15505,14 @@ var put_document_domains_default = _mcpserversdk.withStandardDecorators.call(voi
15491
15505
 
15492
15506
 
15493
15507
 
15494
- var inputSchema10 = {
15508
+ var inputSchema11 = {
15495
15509
  id: putDocumentByIdNotificationsParams.shape.id,
15496
15510
  data: _zod.z.object(putDocumentByIdNotificationsBody.shape)
15497
15511
  };
15498
15512
  var PutDocumentNotificationsTool = {
15499
15513
  name: "put-document-notifications",
15500
15514
  description: "Updates the notifications for a document by Id.",
15501
- inputSchema: inputSchema10,
15515
+ inputSchema: inputSchema11,
15502
15516
  annotations: {
15503
15517
  idempotentHint: true
15504
15518
  },
@@ -15516,7 +15530,7 @@ var put_document_notifications_default = _mcpserversdk.withStandardDecorators.ca
15516
15530
 
15517
15531
 
15518
15532
 
15519
- var inputSchema11 = {
15533
+ var inputSchema12 = {
15520
15534
  id: _zod.z.string().uuid(),
15521
15535
  data: _zod.z.object(putDocumentByIdPublishWithDescendantsBody.shape)
15522
15536
  };
@@ -15524,7 +15538,7 @@ var PublishDocumentWithDescendantsTool = {
15524
15538
  name: "publish-document-with-descendants",
15525
15539
  description: `Publishes a document and its descendants by Id. This is an asynchronous operation that may take time for large document trees.
15526
15540
  The tool will poll for completion and return the final result when finished.`,
15527
- inputSchema: inputSchema11,
15541
+ inputSchema: inputSchema12,
15528
15542
  annotations: {},
15529
15543
  slices: ["publish"],
15530
15544
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
@@ -15603,14 +15617,14 @@ var publish_document_with_descendants_default = _mcpserversdk.withStandardDecora
15603
15617
 
15604
15618
 
15605
15619
 
15606
- var inputSchema12 = {
15620
+ var inputSchema13 = {
15607
15621
  id: _zod.z.string().uuid(),
15608
15622
  data: _zod.z.object(putDocumentByIdUnpublishBody.shape)
15609
15623
  };
15610
15624
  var UnpublishDocumentTool = {
15611
15625
  name: "unpublish-document",
15612
15626
  description: "Unpublishes a document by Id.",
15613
- inputSchema: inputSchema12,
15627
+ inputSchema: inputSchema13,
15614
15628
  annotations: {},
15615
15629
  slices: ["publish"],
15616
15630
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Unpublish),
@@ -15651,7 +15665,7 @@ var sort_document_default = _mcpserversdk.withStandardDecorators.call(void 0, So
15651
15665
 
15652
15666
 
15653
15667
 
15654
- var inputSchema13 = {
15668
+ var inputSchema14 = {
15655
15669
  id: putDocumentByIdSortChildrenParams.shape.id,
15656
15670
  data: _zod.z.object(putDocumentByIdSortChildrenBody.shape)
15657
15671
  };
@@ -15662,7 +15676,7 @@ var SortDocumentChildrenTool = {
15662
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.
15663
15677
 
15664
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.`,
15665
- inputSchema: inputSchema13,
15679
+ inputSchema: inputSchema14,
15666
15680
  annotations: {},
15667
15681
  slices: ["sort"],
15668
15682
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Sort),
@@ -15706,14 +15720,14 @@ var sort_document_root_children_default = _mcpserversdk.withStandardDecorators.c
15706
15720
 
15707
15721
 
15708
15722
 
15709
- var inputSchema14 = {
15723
+ var inputSchema15 = {
15710
15724
  id: _zod.z.string().uuid(),
15711
15725
  data: _zod.z.object(putDocumentByIdMoveBody.shape)
15712
15726
  };
15713
15727
  var MoveDocumentTool = {
15714
15728
  name: "move-document",
15715
15729
  description: "Move a document to a new location",
15716
- inputSchema: inputSchema14,
15730
+ inputSchema: inputSchema15,
15717
15731
  annotations: {},
15718
15732
  slices: ["move"],
15719
15733
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Move),
@@ -15732,7 +15746,7 @@ var move_document_default = _mcpserversdk.withStandardDecorators.call(void 0, Mo
15732
15746
 
15733
15747
 
15734
15748
 
15735
- var inputSchema15 = {
15749
+ var inputSchema16 = {
15736
15750
  id: _zod.z.string().uuid(),
15737
15751
  data: _zod.z.object(putDocumentByIdPublishBody.shape)
15738
15752
  };
@@ -15742,7 +15756,7 @@ var PublishDocumentTool = {
15742
15756
  This function bypasses approval workflows and publishes directly to the live site.
15743
15757
  When the culture is not provided, the default culture is null.
15744
15758
  When the schedule is not provided, the default schedule is null.`,
15745
- inputSchema: inputSchema15,
15759
+ inputSchema: inputSchema16,
15746
15760
  annotations: {},
15747
15761
  slices: ["publish"],
15748
15762
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Publish),
@@ -15830,7 +15844,7 @@ var move_to_recycle_bin_default = _mcpserversdk.withStandardDecorators.call(void
15830
15844
 
15831
15845
 
15832
15846
 
15833
- var inputSchema16 = {
15847
+ var inputSchema17 = {
15834
15848
  id: putDocumentByIdParams.shape.id,
15835
15849
  data: _zod.z.object(putDocumentByIdBody.shape),
15836
15850
  confirmClearValues: _zod.z.boolean().optional().describe(
@@ -15857,21 +15871,21 @@ var UpdateDocumentTool = {
15857
15871
  Always include the full, unmodified "values" array from the document you just read unless you
15858
15872
  intend to clear every property. If the document currently has values, an empty "values" array is
15859
15873
  rejected unless "confirmClearValues" is set to true.`,
15860
- inputSchema: inputSchema16,
15874
+ inputSchema: inputSchema17,
15861
15875
  annotations: {
15862
15876
  idempotentHint: true
15863
15877
  },
15864
15878
  slices: ["update"],
15865
15879
  enabled: (user) => user.fallbackPermissions.includes(UmbracoDocumentPermissions.Update),
15866
15880
  handler: (async (model) => {
15867
- const incomingValues = _optionalChain([model, 'access', _26 => _26.data, 'optionalAccess', _27 => _27.values]);
15881
+ const incomingValues = _optionalChain([model, 'access', _23 => _23.data, 'optionalAccess', _24 => _24.values]);
15868
15882
  if (Array.isArray(incomingValues) && incomingValues.length === 0 && !model.confirmClearValues) {
15869
15883
  const client = UmbracoManagementClient3.getClient();
15870
15884
  let currentDocument;
15871
15885
  try {
15872
15886
  currentDocument = await client.getDocumentById(model.id);
15873
15887
  } catch (error) {
15874
- const status = _optionalChain([error, 'optionalAccess', _28 => _28.response, 'optionalAccess', _29 => _29.status]);
15888
+ const status = _optionalChain([error, 'optionalAccess', _25 => _25.response, 'optionalAccess', _26 => _26.status]);
15875
15889
  if (status !== 404) {
15876
15890
  throw error;
15877
15891
  }
@@ -15897,7 +15911,7 @@ var update_document_default = _mcpserversdk.withStandardDecorators.call(void 0,
15897
15911
 
15898
15912
 
15899
15913
 
15900
- var inputSchema17 = {
15914
+ var inputSchema18 = {
15901
15915
  id: putDocumentByIdUpdateAndPublishParams.shape.id,
15902
15916
  data: _zod.z.object(putDocumentByIdUpdateAndPublishBody.shape)
15903
15917
  };
@@ -15918,7 +15932,7 @@ var UpdateAndPublishDocumentTool = {
15918
15932
  - Always read the current document value first
15919
15933
  - Only update the required values
15920
15934
  - Don't miss any properties from the original document`,
15921
- inputSchema: inputSchema17,
15935
+ inputSchema: inputSchema18,
15922
15936
  annotations: {
15923
15937
  idempotentHint: true
15924
15938
  },
@@ -16301,7 +16315,7 @@ var UpdateDocumentPropertiesTool = {
16301
16315
  const docTypeProps = await getDocumentTypeProperties();
16302
16316
  const propsToValidate = allPropertiesToValidate.map((p) => {
16303
16317
  const def = docTypeProps.find((d) => d.alias === p.alias);
16304
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _30 => _30.dataTypeId]), () => ( "")) };
16318
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _27 => _27.dataTypeId]), () => ( "")) };
16305
16319
  }).filter((p) => p.dataTypeId);
16306
16320
  if (propsToValidate.length > 0) {
16307
16321
  const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
@@ -16703,7 +16717,7 @@ var UpdateBlockPropertyTool = {
16703
16717
  if (!isUmbracoAtLeast(17, 4) && elementTypeProperties.length > 0) {
16704
16718
  const propsToValidate = update.properties.map((p) => {
16705
16719
  const def = elementTypeProperties.find((d) => d.alias === p.alias);
16706
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _31 => _31.dataTypeId]), () => ( "")) };
16720
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _28 => _28.dataTypeId]), () => ( "")) };
16707
16721
  }).filter((p) => p.dataTypeId);
16708
16722
  if (propsToValidate.length > 0) {
16709
16723
  const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
@@ -17035,14 +17049,14 @@ function removeRteBlockElement(markup, contentKey) {
17035
17049
  return markup.slice(0, start) + markup.slice(end);
17036
17050
  }
17037
17051
  function getBlockTypeConfigurations(dataTypeValues) {
17038
- const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _32 => _32.find, 'call', _33 => _33((v) => v.alias === "blocks"), 'optionalAccess', _34 => _34.value]);
17052
+ const blocks = _optionalChain([dataTypeValues, 'optionalAccess', _29 => _29.find, 'call', _30 => _30((v) => v.alias === "blocks"), 'optionalAccess', _31 => _31.value]);
17039
17053
  return Array.isArray(blocks) ? blocks : [];
17040
17054
  }
17041
17055
  function findBlockTypeConfiguration(configs, contentElementTypeKey) {
17042
17056
  return configs.find((c) => c.contentElementTypeKey === contentElementTypeKey);
17043
17057
  }
17044
17058
  function findAreaConfiguration(configs, parentContentTypeKey, areaKey) {
17045
- return _optionalChain([findBlockTypeConfiguration, 'call', _35 => _35(configs, parentContentTypeKey), 'optionalAccess', _36 => _36.areas, 'optionalAccess', _37 => _37.find, 'call', _38 => _38((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)]);
17046
17060
  }
17047
17061
  function checkAllowedInArea(blockConfig, area) {
17048
17062
  if (blockConfig.allowInAreas === false) {
@@ -17184,7 +17198,7 @@ var createDocumentBlockSchema = {
17184
17198
  properties: _zod.z.array(blockPropertyValueSchema).optional().describe("Content property values for the new block"),
17185
17199
  settings: _zod.z.object({
17186
17200
  properties: _zod.z.array(blockPropertyValueSchema).describe("Settings property values")
17187
- }).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"),
17188
17202
  placement: placementSchema.optional().describe("Where to place the block relative to siblings (default: append)"),
17189
17203
  grid: gridSchema.optional().describe("BlockGrid-only layout options. Rejected for BlockList/RichText properties")
17190
17204
  };
@@ -17208,7 +17222,7 @@ async function validateBlockProperties(elementTypeKey, properties, label) {
17208
17222
  if (!isUmbracoAtLeast(17, 4) && definitions.length > 0) {
17209
17223
  const propsToValidate = properties.map((p) => {
17210
17224
  const def = definitions.find((d) => d.alias === p.alias);
17211
- return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _39 => _39.dataTypeId]), () => ( "")) };
17225
+ return { alias: p.alias, value: p.value, dataTypeId: _nullishCoalesce(_optionalChain([def, 'optionalAccess', _36 => _36.dataTypeId]), () => ( "")) };
17212
17226
  }).filter((p) => p.dataTypeId);
17213
17227
  if (propsToValidate.length > 0) {
17214
17228
  const valueValidation = await validatePropertiesBeforeSave(propsToValidate);
@@ -17251,15 +17265,15 @@ var CreateDocumentBlockTool = {
17251
17265
  const { kind, container, blockConfigs } = ctx;
17252
17266
  const placement = _nullishCoalesce(model.placement, () => ( { position: "append" }));
17253
17267
  const contentProperties = _nullishCoalesce(model.properties, () => ( []));
17254
- const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _40 => _40.settings, 'optionalAccess', _41 => _41.properties]), () => ( []));
17268
+ const settingsProperties = _nullishCoalesce(_optionalChain([model, 'access', _37 => _37.settings, 'optionalAccess', _38 => _38.properties]), () => ( []));
17255
17269
  if (model.grid && kind !== "BlockGrid") {
17256
17270
  throw new (0, _mcpserversdk.ToolValidationError)({
17257
17271
  title: "grid options not supported",
17258
17272
  detail: `'grid' only applies to BlockGrid properties; '${model.propertyAlias}' is a ${kind} property`
17259
17273
  });
17260
17274
  }
17261
- const areaKey = _optionalChain([model, 'access', _42 => _42.grid, 'optionalAccess', _43 => _43.areaKey]);
17262
- const parentContentKey = _optionalChain([model, 'access', _44 => _44.grid, 'optionalAccess', _45 => _45.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]);
17263
17277
  if (!!areaKey !== !!parentContentKey) {
17264
17278
  throw new (0, _mcpserversdk.ToolValidationError)({
17265
17279
  title: "Incomplete area target",
@@ -17309,7 +17323,7 @@ var CreateDocumentBlockTool = {
17309
17323
  title: "Area not found",
17310
17324
  detail: `Area '${key}' is not configured for block type '${parentBlock.contentTypeKey}'`,
17311
17325
  extensions: {
17312
- availableAreas: (_nullishCoalesce(_optionalChain([findBlockTypeConfiguration, 'call', _46 => _46(blockConfigs, parentBlock.contentTypeKey), 'optionalAccess', _47 => _47.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)) }))
17313
17327
  }
17314
17328
  });
17315
17329
  }
@@ -17331,7 +17345,7 @@ var CreateDocumentBlockTool = {
17331
17345
  detail: `No block with contentKey '${placement.contentKey}' exists in property '${model.propertyAlias}'`
17332
17346
  });
17333
17347
  }
17334
- if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _48 => _48.parent, 'optionalAccess', _49 => _49.contentKey]) !== parentContentKey)) {
17348
+ if (areaKey && (sibling.areaKey !== areaKey || _optionalChain([sibling, 'access', _45 => _45.parent, 'optionalAccess', _46 => _46.contentKey]) !== parentContentKey)) {
17335
17349
  throw new (0, _mcpserversdk.ToolValidationError)({
17336
17350
  title: "Sibling not in target area",
17337
17351
  detail: `Block '${placement.contentKey}' is not in area '${areaKey}' of block '${parentContentKey}'`
@@ -17372,12 +17386,12 @@ var CreateDocumentBlockTool = {
17372
17386
  }
17373
17387
  }
17374
17388
  const contentKey = _uuid.v4.call(void 0, );
17375
- const settingsKey = model.settings ? _uuid.v4.call(void 0, ) : null;
17389
+ const settingsKey = blockConfig.settingsElementTypeKey ? _uuid.v4.call(void 0, ) : null;
17376
17390
  const layoutEntry = buildLayoutEntry(kind, {
17377
17391
  contentKey,
17378
17392
  settingsKey,
17379
- columnSpan: _optionalChain([model, 'access', _50 => _50.grid, 'optionalAccess', _51 => _51.columnSpan]),
17380
- rowSpan: _optionalChain([model, 'access', _52 => _52.grid, 'optionalAccess', _53 => _53.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]),
17381
17395
  areaKeys: (_nullishCoalesce(blockConfig.areas, () => ( []))).map((a) => a.key)
17382
17396
  });
17383
17397
  const elementType = await client.getDocumentTypeById(model.contentTypeKey);
@@ -17728,7 +17742,7 @@ var DocumentCollection = {
17728
17742
  description: "Document content management and publishing",
17729
17743
  dependencies: []
17730
17744
  },
17731
- tools: (user) => {
17745
+ tools: (user, options) => {
17732
17746
  const tools = [];
17733
17747
  if (AuthorizationPolicies.TreeAccessDocuments(user)) {
17734
17748
  tools.push(get_document_by_id_default);
@@ -17737,7 +17751,7 @@ var DocumentCollection = {
17737
17751
  tools.push(get_document_type_schema_default);
17738
17752
  tools.push(copy_document_default);
17739
17753
  tools.push(create_document_default);
17740
- if (isUmbracoAtLeast(17, 6)) {
17754
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _51 => _51.umbracoVersion]))) {
17741
17755
  tools.push(create_and_publish_document_default);
17742
17756
  }
17743
17757
  tools.push(post_document_public_access_default);
@@ -17754,13 +17768,13 @@ var DocumentCollection = {
17754
17768
  tools.push(publish_document_default);
17755
17769
  tools.push(publish_document_with_descendants_default);
17756
17770
  tools.push(sort_document_default);
17757
- if (isUmbracoAtLeast(17, 6)) {
17771
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _52 => _52.umbracoVersion]))) {
17758
17772
  tools.push(sort_document_children_default);
17759
17773
  tools.push(sort_document_root_children_default);
17760
17774
  }
17761
17775
  tools.push(unpublish_document_default);
17762
17776
  tools.push(update_document_default);
17763
- if (isUmbracoAtLeast(17, 6)) {
17777
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _53 => _53.umbracoVersion]))) {
17764
17778
  tools.push(update_and_publish_document_default);
17765
17779
  }
17766
17780
  tools.push(update_document_properties_default);
@@ -19827,14 +19841,14 @@ var create_language_default = _mcpserversdk.withStandardDecorators.call(void 0,
19827
19841
 
19828
19842
 
19829
19843
 
19830
- var inputSchema18 = {
19844
+ var inputSchema19 = {
19831
19845
  isoCode: putLanguageByIsoCodeParams.shape.isoCode,
19832
19846
  data: _zod.z.object(putLanguageByIsoCodeBody.shape)
19833
19847
  };
19834
19848
  var UpdateLanguageTool = {
19835
19849
  name: "update-language",
19836
19850
  description: "Updates an existing language by ISO code",
19837
- inputSchema: inputSchema18,
19851
+ inputSchema: inputSchema19,
19838
19852
  annotations: {
19839
19853
  idempotentHint: true
19840
19854
  },
@@ -20507,36 +20521,22 @@ function buildSourceTypeSection(allowFilePath, otherSources) {
20507
20521
  // src/umbraco-api/tools/media/post/helpers/streaming-upload.ts
20508
20522
 
20509
20523
 
20510
- var _mcphosted = require('@umbraco-cms/mcp-hosted');
20511
20524
 
20512
20525
 
20513
20526
 
20514
20527
 
20515
20528
 
20516
20529
 
20517
- var authContext = null;
20518
- function isStreamingAuthContextConfigured() {
20519
- return authContext !== null;
20530
+ function isStreamingUploadAvailable() {
20531
+ return _optionalChain([_mcpserversdk.getActiveRequestContext.call(void 0, ), 'optionalAccess', _76 => _76.umbracoAuth]) !== void 0;
20520
20532
  }
20521
20533
  async function resolveAuth() {
20522
- if (!authContext) {
20523
- throw new Error(
20524
- "Streaming auth context not configured. setStreamingAuthContext() must be called in worker init()."
20525
- );
20526
- }
20527
- const entry = await _mcphosted.getStoredUmbracoToken.call(void 0, authContext.env.OAUTH_KV, authContext.tokenKey);
20528
- if (!_optionalChain([entry, 'optionalAccess', _76 => _76.tokens, 'optionalAccess', _77 => _77.access_token])) {
20529
- throw new Error("No Umbraco access token in KV. Reconnect the MCP connector.");
20530
- }
20531
- const baseUrl = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([entry, 'access', _78 => _78.site, 'optionalAccess', _79 => _79.serverUrl]), () => ( _optionalChain([entry, 'access', _80 => _80.site, 'optionalAccess', _81 => _81.baseUrl]))), () => ( authContext.env.UMBRACO_SERVER_URL)), () => ( authContext.env.UMBRACO_BASE_URL));
20532
- if (!baseUrl) {
20533
- throw new Error("No Umbraco base URL resolvable from site or env.");
20534
- }
20535
- return { accessToken: entry.tokens.access_token, baseUrl: _mcpserversdk.normalizeBaseUrl.call(void 0, baseUrl) };
20534
+ const { accessToken, baseUrl } = await _mcpserversdk.getSessionUmbracoAuth.call(void 0, );
20535
+ return { accessToken, baseUrl: _mcpserversdk.normalizeBaseUrl.call(void 0, baseUrl) };
20536
20536
  }
20537
20537
  function ensureExtension(name, contentType, urlPath) {
20538
20538
  if (name.includes(".")) return name;
20539
- 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]]);
20540
20540
  if (fromUrl) return `${name}${fromUrl}`;
20541
20541
  if (contentType) {
20542
20542
  const subtype = contentType.split(";")[0].split("/")[1];
@@ -20556,10 +20556,7 @@ async function streamingUploadFromUrl(params) {
20556
20556
  );
20557
20557
  const [mediaTypeId, auth] = await Promise.all([
20558
20558
  fetchMediaTypeId(client, validatedMediaTypeName),
20559
- (async () => {
20560
- await client.getTemporaryFileConfiguration().catch(() => void 0);
20561
- return resolveAuth();
20562
- })()
20559
+ resolveAuth()
20563
20560
  ]);
20564
20561
  const { accessToken, baseUrl } = auth;
20565
20562
  const ctl = new AbortController();
@@ -20645,8 +20642,8 @@ Content-Type: ${sourceContentType}\r
20645
20642
  if (response.status < 200 || response.status >= 300) {
20646
20643
  throw new Error(`postMedia failed with status ${response.status}`);
20647
20644
  }
20648
- const locationHeader = _nullishCoalesce(_optionalChain([response, 'access', _85 => _85.headers, 'optionalAccess', _86 => _86.location]), () => ( _optionalChain([response, 'access', _87 => _87.headers, 'optionalAccess', _88 => _88.Location])));
20649
- 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)]);
20650
20647
  if (!idMatch) {
20651
20648
  throw new Error(
20652
20649
  `Could not extract media id from Location header: ${_nullishCoalesce(locationHeader, () => ( "(missing)"))}`
@@ -20751,7 +20748,7 @@ ${filePathSection}
20751
20748
  let effectiveSourceType;
20752
20749
  let effectiveFileUrl = model.fileUrl;
20753
20750
  if (model.sourceType === "file") {
20754
- 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])) {
20755
20752
  return _mcpserversdk.createToolResultError.call(void 0, {
20756
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."
20757
20754
  });
@@ -20761,7 +20758,7 @@ ${filePathSection}
20761
20758
  } else {
20762
20759
  effectiveSourceType = model.sourceType;
20763
20760
  }
20764
- if (effectiveSourceType === "url" && isStreamingAuthContextConfigured()) {
20761
+ if (effectiveSourceType === "url" && isStreamingUploadAvailable()) {
20765
20762
  if (!effectiveFileUrl) {
20766
20763
  return _mcpserversdk.createToolResultError.call(void 0, {
20767
20764
  detail: "Error creating media: fileUrl is required when sourceType is 'url'"
@@ -20890,7 +20887,7 @@ ${filePathSection}
20890
20887
  });
20891
20888
  }
20892
20889
  const client = UmbracoManagementClient3.getClient();
20893
- const streamingAvailable = isStreamingAuthContextConfigured();
20890
+ const streamingAvailable = isStreamingUploadAvailable();
20894
20891
  const results = await mapWithConcurrency(
20895
20892
  model.files,
20896
20893
  UPLOAD_CONCURRENCY,
@@ -20900,7 +20897,7 @@ ${filePathSection}
20900
20897
  let effectiveSourceType;
20901
20898
  let effectiveFileUrl = file.fileUrl;
20902
20899
  if (model.sourceType === "file") {
20903
- 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])) {
20904
20901
  return {
20905
20902
  success: false,
20906
20903
  name: file.name,
@@ -20999,7 +20996,7 @@ var CreateMediaFolderTool = {
20999
20996
  if (response.status < 200 || response.status >= 300) {
21000
20997
  throw new Error(`Request failed with status code ${response.status}`);
21001
20998
  }
21002
- 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]);
21003
21000
  if (!locationHeader) {
21004
21001
  throw new Error("No Location header in response - cannot determine created folder ID");
21005
21002
  }
@@ -21073,7 +21070,7 @@ var get_media_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0,
21073
21070
 
21074
21071
 
21075
21072
 
21076
- var inputSchema19 = {
21073
+ var inputSchema20 = {
21077
21074
  id: putMediaByIdParams.shape.id,
21078
21075
  data: _zod.z.object(putMediaByIdBody.shape)
21079
21076
  };
@@ -21083,7 +21080,7 @@ var UpdateMediaTool = {
21083
21080
  Always read the current media value first and only update the required values.
21084
21081
  Don't miss any properties from the original media that you are updating.
21085
21082
  This cannot be used for moving media to a new folder. Use the move endpoint to do that.`,
21086
- inputSchema: inputSchema19,
21083
+ inputSchema: inputSchema20,
21087
21084
  annotations: {
21088
21085
  idempotentHint: true
21089
21086
  },
@@ -21169,14 +21166,14 @@ var validate_media_default = _mcpserversdk.withStandardDecorators.call(void 0, V
21169
21166
 
21170
21167
 
21171
21168
 
21172
- var inputSchema20 = {
21169
+ var inputSchema21 = {
21173
21170
  id: putMediaByIdValidateParams.shape.id,
21174
21171
  data: _zod.z.object(putMediaByIdValidateBody.shape)
21175
21172
  };
21176
21173
  var ValidateMediaUpdateTool = {
21177
21174
  name: "validate-media-update",
21178
21175
  description: "Validates media data before updating an existing media item by Id",
21179
- inputSchema: inputSchema20,
21176
+ inputSchema: inputSchema21,
21180
21177
  annotations: { readOnlyHint: true },
21181
21178
  slices: ["validate"],
21182
21179
  handler: (async (model) => {
@@ -21216,7 +21213,7 @@ var sort_media_default = _mcpserversdk.withStandardDecorators.call(void 0, SortM
21216
21213
 
21217
21214
 
21218
21215
 
21219
- var inputSchema21 = {
21216
+ var inputSchema22 = {
21220
21217
  id: putMediaByIdSortChildrenParams.shape.id,
21221
21218
  data: _zod.z.object(putMediaByIdSortChildrenBody.shape)
21222
21219
  };
@@ -21225,7 +21222,7 @@ var SortMediaChildrenTool = {
21225
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).
21226
21223
 
21227
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.`,
21228
- inputSchema: inputSchema21,
21225
+ inputSchema: inputSchema22,
21229
21226
  annotations: {},
21230
21227
  slices: ["sort"],
21231
21228
  handler: (async (model) => {
@@ -21290,14 +21287,14 @@ var get_media_by_id_array_default = _mcpserversdk.withStandardDecorators.call(vo
21290
21287
 
21291
21288
 
21292
21289
 
21293
- var inputSchema22 = {
21290
+ var inputSchema23 = {
21294
21291
  id: putMediaByIdMoveParams.shape.id,
21295
21292
  data: _zod.z.object(putMediaByIdMoveBody.shape)
21296
21293
  };
21297
21294
  var MoveMediaTool = {
21298
21295
  name: "move-media",
21299
21296
  description: "Move a media item to a new location",
21300
- inputSchema: inputSchema22,
21297
+ inputSchema: inputSchema23,
21301
21298
  annotations: {
21302
21299
  idempotentHint: true
21303
21300
  },
@@ -21433,14 +21430,14 @@ var get_root_default6 = _mcpserversdk.withStandardDecorators.call(void 0, GetMed
21433
21430
 
21434
21431
 
21435
21432
 
21436
- var inputSchema23 = {
21433
+ var inputSchema24 = {
21437
21434
  id: getMediaByIdAuditLogParams.shape.id,
21438
21435
  ...getMediaByIdAuditLogQueryParams.shape
21439
21436
  };
21440
21437
  var GetMediaAuditLogTool = {
21441
21438
  name: "get-media-audit-log",
21442
21439
  description: "Fetches the audit log for a media item by Id.",
21443
- inputSchema: inputSchema23,
21440
+ inputSchema: inputSchema24,
21444
21441
  outputSchema: getMediaByIdAuditLogResponse.shape,
21445
21442
  annotations: { readOnlyHint: true },
21446
21443
  slices: ["audit"],
@@ -21655,7 +21652,7 @@ var get_media_are_referenced_default = _mcpserversdk.withStandardDecorators.call
21655
21652
 
21656
21653
 
21657
21654
 
21658
- var inputSchema24 = _zod.z.object({
21655
+ var inputSchema25 = _zod.z.object({
21659
21656
  ...getMediaByIdReferencedByParams.shape,
21660
21657
  ...getMediaByIdReferencedByQueryParams.shape
21661
21658
  }).shape;
@@ -21663,7 +21660,7 @@ var GetMediaByIdReferencedByTool = {
21663
21660
  name: "get-media-by-id-referenced-by",
21664
21661
  description: `Get items that reference a specific media item
21665
21662
  Use this to find all content, documents, or other items that are currently referencing a specific media item.`,
21666
- inputSchema: inputSchema24,
21663
+ inputSchema: inputSchema25,
21667
21664
  outputSchema: getMediaByIdReferencedByResponse.shape,
21668
21665
  annotations: { readOnlyHint: true },
21669
21666
  slices: ["references"],
@@ -21682,7 +21679,7 @@ var get_media_by_id_referenced_by_default = _mcpserversdk.withStandardDecorators
21682
21679
 
21683
21680
 
21684
21681
 
21685
- var inputSchema25 = _zod.z.object({
21682
+ var inputSchema26 = _zod.z.object({
21686
21683
  ...getMediaByIdReferencedDescendantsParams.shape,
21687
21684
  ...getMediaByIdReferencedDescendantsQueryParams.shape
21688
21685
  }).shape;
@@ -21695,7 +21692,7 @@ var GetMediaByIdReferencedDescendantsTool = {
21695
21692
  \u2022 Impact analysis: Before deleting a media folder, see what content would be affected
21696
21693
  \u2022 Dependency tracking: Find all content using media from a specific folder hierarchy
21697
21694
  \u2022 Content auditing: Identify which descendant media items are actually being used`,
21698
- inputSchema: inputSchema25,
21695
+ inputSchema: inputSchema26,
21699
21696
  outputSchema: getMediaByIdReferencedDescendantsResponse.shape,
21700
21697
  annotations: { readOnlyHint: true },
21701
21698
  slices: ["references"],
@@ -21812,7 +21809,7 @@ var MediaCollection = {
21812
21809
  description: "Media asset management and organization",
21813
21810
  dependencies: ["temporary-file"]
21814
21811
  },
21815
- tools: (user) => {
21812
+ tools: (user, options) => {
21816
21813
  const tools = [];
21817
21814
  tools.push(get_media_by_id_default);
21818
21815
  if (AuthorizationPolicies.SectionAccessForMediaTree(user)) {
@@ -21834,7 +21831,7 @@ var MediaCollection = {
21834
21831
  tools.push(validate_media_default);
21835
21832
  tools.push(validate_media_default2);
21836
21833
  tools.push(sort_media_default);
21837
- if (isUmbracoAtLeast(17, 6)) {
21834
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _94 => _94.umbracoVersion]))) {
21838
21835
  tools.push(sort_media_children_default);
21839
21836
  tools.push(sort_media_root_children_default);
21840
21837
  }
@@ -21855,7 +21852,7 @@ var MediaCollection = {
21855
21852
  tools.push(get_collection_media_default);
21856
21853
  tools.push(get_recycle_bin_media_referenced_by_default);
21857
21854
  tools.push(get_recycle_bin_media_original_parent_default);
21858
- if (isUmbracoAtLeast(17, 4)) {
21855
+ if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _95 => _95.umbracoVersion]))) {
21859
21856
  tools.push(get_media_type_schema_default);
21860
21857
  }
21861
21858
  }
@@ -21913,7 +21910,7 @@ var get_media_type_by_id_default = _mcpserversdk.withStandardDecorators.call(voi
21913
21910
 
21914
21911
 
21915
21912
 
21916
- var inputSchema26 = _zod.z.object({
21913
+ var inputSchema27 = _zod.z.object({
21917
21914
  ids: _zod.z.array(_zod.z.string())
21918
21915
  });
21919
21916
  var outputSchema35 = _zod.z.object({
@@ -21922,7 +21919,7 @@ var outputSchema35 = _zod.z.object({
21922
21919
  var GetMediaTypeByIdsTool = {
21923
21920
  name: "get-media-type-by-ids",
21924
21921
  description: "Gets media types by ids",
21925
- inputSchema: inputSchema26.shape,
21922
+ inputSchema: inputSchema27.shape,
21926
21923
  outputSchema: outputSchema35.shape,
21927
21924
  annotations: { readOnlyHint: true },
21928
21925
  slices: ["list"],
@@ -22035,13 +22032,13 @@ var get_media_type_allowed_at_root_default = _mcpserversdk.withStandardDecorator
22035
22032
 
22036
22033
 
22037
22034
 
22038
- var inputSchema27 = getMediaTypeByIdAllowedChildrenParams.merge(
22035
+ var inputSchema28 = getMediaTypeByIdAllowedChildrenParams.merge(
22039
22036
  getMediaTypeByIdAllowedChildrenQueryParams
22040
22037
  );
22041
22038
  var GetMediaTypeAllowedChildrenTool = {
22042
22039
  name: "get-media-type-allowed-children",
22043
22040
  description: "Gets the media types that are allowed as children of a media type",
22044
- inputSchema: inputSchema27.shape,
22041
+ inputSchema: inputSchema28.shape,
22045
22042
  outputSchema: getMediaTypeByIdAllowedChildrenResponse.shape,
22046
22043
  annotations: { readOnlyHint: true },
22047
22044
  slices: ["configuration"],
@@ -22289,7 +22286,7 @@ var CreateMediaTypeFolderTool = {
22289
22286
  validateStatus: () => true
22290
22287
  });
22291
22288
  if (response.status === 201) {
22292
- const locationHeader = _optionalChain([response, 'access', _99 => _99.headers, 'optionalAccess', _100 => _100["location"]]) || _optionalChain([response, 'access', _101 => _101.headers, 'optionalAccess', _102 => _102["Location"]]);
22289
+ const locationHeader = _optionalChain([response, 'access', _96 => _96.headers, 'optionalAccess', _97 => _97["location"]]) || _optionalChain([response, 'access', _98 => _98.headers, 'optionalAccess', _99 => _99["Location"]]);
22293
22290
  let createdId = model.id || "";
22294
22291
  if (locationHeader) {
22295
22292
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22341,14 +22338,14 @@ var delete_folder_default4 = _mcpserversdk.withStandardDecorators.call(void 0, D
22341
22338
 
22342
22339
 
22343
22340
 
22344
- var inputSchema28 = _zod.z.object({
22341
+ var inputSchema29 = _zod.z.object({
22345
22342
  id: putMediaTypeFolderByIdParams.shape.id,
22346
22343
  data: _zod.z.object(putMediaTypeFolderByIdBody.shape)
22347
22344
  });
22348
22345
  var UpdateMediaTypeFolderTool = {
22349
22346
  name: "update-media-type-folder",
22350
22347
  description: "Updates a media type folder by Id",
22351
- inputSchema: inputSchema28.shape,
22348
+ inputSchema: inputSchema29.shape,
22352
22349
  annotations: { idempotentHint: true },
22353
22350
  slices: ["update", "folders"],
22354
22351
  handler: (async (model) => {
@@ -22423,7 +22420,7 @@ var CreateMediaTypeTool = {
22423
22420
  validateStatus: () => true
22424
22421
  });
22425
22422
  if (response.status === 201) {
22426
- const locationHeader = _optionalChain([response, 'access', _103 => _103.headers, 'optionalAccess', _104 => _104["location"]]) || _optionalChain([response, 'access', _105 => _105.headers, 'optionalAccess', _106 => _106["Location"]]);
22423
+ const locationHeader = _optionalChain([response, 'access', _100 => _100.headers, 'optionalAccess', _101 => _101["location"]]) || _optionalChain([response, 'access', _102 => _102.headers, 'optionalAccess', _103 => _103["Location"]]);
22427
22424
  let createdId = model.id || "";
22428
22425
  if (locationHeader) {
22429
22426
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22453,7 +22450,7 @@ var create_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
22453
22450
 
22454
22451
 
22455
22452
 
22456
- var inputSchema29 = _zod.z.object({
22453
+ var inputSchema30 = _zod.z.object({
22457
22454
  id: _zod.z.string().uuid(),
22458
22455
  data: _zod.z.object(postMediaTypeByIdCopyBody.shape)
22459
22456
  });
@@ -22464,7 +22461,7 @@ var copyMediaTypeOutputSchema = _zod.z.object({
22464
22461
  var CopyMediaTypeTool = {
22465
22462
  name: "copy-media-type",
22466
22463
  description: "Copy a media type to a new location",
22467
- inputSchema: inputSchema29.shape,
22464
+ inputSchema: inputSchema30.shape,
22468
22465
  outputSchema: copyMediaTypeOutputSchema.shape,
22469
22466
  slices: ["copy"],
22470
22467
  handler: (async (model) => {
@@ -22474,7 +22471,7 @@ var CopyMediaTypeTool = {
22474
22471
  validateStatus: () => true
22475
22472
  });
22476
22473
  if (response.status === 201) {
22477
- const locationHeader = _optionalChain([response, 'access', _107 => _107.headers, 'optionalAccess', _108 => _108["location"]]) || _optionalChain([response, 'access', _109 => _109.headers, 'optionalAccess', _110 => _110["Location"]]);
22474
+ const locationHeader = _optionalChain([response, 'access', _104 => _104.headers, 'optionalAccess', _105 => _105["location"]]) || _optionalChain([response, 'access', _106 => _106.headers, 'optionalAccess', _107 => _107["Location"]]);
22478
22475
  let createdId = "";
22479
22476
  if (locationHeader) {
22480
22477
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22529,14 +22526,14 @@ var get_media_type_available_compositions_default = _mcpserversdk.withStandardDe
22529
22526
 
22530
22527
 
22531
22528
 
22532
- var inputSchema30 = _zod.z.object({
22529
+ var inputSchema31 = _zod.z.object({
22533
22530
  id: putMediaTypeByIdParams.shape.id,
22534
22531
  data: _zod.z.object(putMediaTypeByIdBody.shape)
22535
22532
  });
22536
22533
  var UpdateMediaTypeTool = {
22537
22534
  name: "update-media-type",
22538
22535
  description: "Updates a media type by Id",
22539
- inputSchema: inputSchema30.shape,
22536
+ inputSchema: inputSchema31.shape,
22540
22537
  annotations: { idempotentHint: true },
22541
22538
  slices: ["update"],
22542
22539
  handler: (async (model) => {
@@ -22554,14 +22551,14 @@ var update_media_type_default = _mcpserversdk.withStandardDecorators.call(void 0
22554
22551
 
22555
22552
 
22556
22553
 
22557
- var inputSchema31 = _zod.z.object({
22554
+ var inputSchema32 = _zod.z.object({
22558
22555
  id: _zod.z.string().uuid(),
22559
22556
  data: _zod.z.object(putMediaTypeByIdMoveBody.shape)
22560
22557
  });
22561
22558
  var MoveMediaTypeTool = {
22562
22559
  name: "move-media-type",
22563
22560
  description: "Move a media type to a new location",
22564
- inputSchema: inputSchema31.shape,
22561
+ inputSchema: inputSchema32.shape,
22565
22562
  annotations: { idempotentHint: true },
22566
22563
  slices: ["move"],
22567
22564
  handler: (async (model) => {
@@ -22684,7 +22681,7 @@ var CreateMemberTool = {
22684
22681
  validateStatus: () => true
22685
22682
  });
22686
22683
  if (response.status === 201) {
22687
- const locationHeader = _optionalChain([response, 'access', _111 => _111.headers, 'optionalAccess', _112 => _112["location"]]) || _optionalChain([response, 'access', _113 => _113.headers, 'optionalAccess', _114 => _114["Location"]]);
22684
+ const locationHeader = _optionalChain([response, 'access', _108 => _108.headers, 'optionalAccess', _109 => _109["location"]]) || _optionalChain([response, 'access', _110 => _110.headers, 'optionalAccess', _111 => _111["Location"]]);
22688
22685
  let createdId = model.id || "";
22689
22686
  if (locationHeader) {
22690
22687
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -22757,14 +22754,14 @@ var delete_member_default = _mcpserversdk.withStandardDecorators.call(void 0, De
22757
22754
 
22758
22755
 
22759
22756
 
22760
- var inputSchema32 = _zod.z.object({
22757
+ var inputSchema33 = _zod.z.object({
22761
22758
  id: putMemberByIdParams.shape.id,
22762
22759
  data: _zod.z.object(putMemberByIdBody.shape)
22763
22760
  });
22764
22761
  var UpdateMemberTool = {
22765
22762
  name: "update-member",
22766
22763
  description: "Updates a member by Id",
22767
- inputSchema: inputSchema32.shape,
22764
+ inputSchema: inputSchema33.shape,
22768
22765
  annotations: { idempotentHint: true },
22769
22766
  slices: ["update"],
22770
22767
  handler: (async (model) => {
@@ -22782,7 +22779,7 @@ var update_member_default = _mcpserversdk.withStandardDecorators.call(void 0, Up
22782
22779
 
22783
22780
 
22784
22781
 
22785
- var inputSchema33 = _zod.z.object({
22782
+ var inputSchema34 = _zod.z.object({
22786
22783
  id: putMemberByIdValidateParams.shape.id,
22787
22784
  data: _zod.z.object(putMemberByIdValidateBody.shape)
22788
22785
  });
@@ -22790,7 +22787,7 @@ var ValidateMemberUpdateTool = {
22790
22787
  name: "validate-member-update",
22791
22788
  description: `Validates member data before updating using the Umbraco API.
22792
22789
  Use this endpoint to validate member data structure, properties, and business rules before attempting to update an existing member.`,
22793
- inputSchema: inputSchema33.shape,
22790
+ inputSchema: inputSchema34.shape,
22794
22791
  annotations: { readOnlyHint: true },
22795
22792
  slices: ["validate"],
22796
22793
  handler: (async (model) => {
@@ -22850,12 +22847,12 @@ var get_member_are_referenced_default = _mcpserversdk.withStandardDecorators.cal
22850
22847
 
22851
22848
 
22852
22849
 
22853
- var inputSchema34 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
22850
+ var inputSchema35 = getMemberByIdReferencedByParams.merge(getMemberByIdReferencedByQueryParams);
22854
22851
  var GetMemberByIdReferencedByTool = {
22855
22852
  name: "get-member-by-id-referenced-by",
22856
22853
  description: `Get items that reference a specific member
22857
22854
  Use this to find all content, documents, or other items that are currently referencing a specific member account.`,
22858
- inputSchema: inputSchema34.shape,
22855
+ inputSchema: inputSchema35.shape,
22859
22856
  outputSchema: getMemberByIdReferencedByResponse.shape,
22860
22857
  annotations: { readOnlyHint: true },
22861
22858
  slices: ["references"],
@@ -22873,12 +22870,12 @@ var get_member_by_id_referenced_by_default = _mcpserversdk.withStandardDecorator
22873
22870
 
22874
22871
 
22875
22872
 
22876
- var inputSchema35 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
22873
+ var inputSchema36 = getMemberByIdReferencedDescendantsParams.merge(getMemberByIdReferencedDescendantsQueryParams);
22877
22874
  var GetMemberByIdReferencedDescendantsTool = {
22878
22875
  name: "get-member-by-id-referenced-descendants",
22879
22876
  description: `Get descendant references for a member
22880
22877
  Use this to find all descendant references that are being referenced for a specific member account.`,
22881
- inputSchema: inputSchema35.shape,
22878
+ inputSchema: inputSchema36.shape,
22882
22879
  outputSchema: getMemberByIdReferencedDescendantsResponse.shape,
22883
22880
  annotations: { readOnlyHint: true },
22884
22881
  slices: ["references"],
@@ -22979,7 +22976,7 @@ var MemberCollection = {
22979
22976
  description: "Member account management and administration",
22980
22977
  dependencies: []
22981
22978
  },
22982
- tools: (user) => {
22979
+ tools: (user, options) => {
22983
22980
  const tools = [];
22984
22981
  if (AuthorizationPolicies.SectionAccessMembers(user)) {
22985
22982
  tools.push(get_member_default);
@@ -22991,7 +22988,7 @@ var MemberCollection = {
22991
22988
  tools.push(get_member_are_referenced_default);
22992
22989
  tools.push(get_member_by_id_referenced_by_default);
22993
22990
  tools.push(get_member_by_id_referenced_descendants_default);
22994
- if (isUmbracoAtLeast(17, 4)) {
22991
+ if (isUmbracoAtLeast(17, 4, _optionalChain([options, 'optionalAccess', _112 => _112.umbracoVersion]))) {
22995
22992
  tools.push(get_member_type_schema_default);
22996
22993
  }
22997
22994
  }
@@ -23144,14 +23141,14 @@ var create_member_group_default = _mcpserversdk.withStandardDecorators.call(void
23144
23141
 
23145
23142
 
23146
23143
 
23147
- var inputSchema36 = {
23144
+ var inputSchema37 = {
23148
23145
  id: putMemberGroupByIdParams.shape.id,
23149
23146
  data: _zod.z.object(putMemberGroupByIdBody.shape)
23150
23147
  };
23151
23148
  var UpdateMemberGroupTool = {
23152
23149
  name: "update-member-group",
23153
23150
  description: "Updates a member group by Id",
23154
- inputSchema: inputSchema36,
23151
+ inputSchema: inputSchema37,
23155
23152
  annotations: {
23156
23153
  idempotentHint: true
23157
23154
  },
@@ -23235,7 +23232,7 @@ var CreateMemberTypeTool = {
23235
23232
  validateStatus: () => true
23236
23233
  });
23237
23234
  if (response.status === 201) {
23238
- const locationHeader = _optionalChain([response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116["location"]]) || _optionalChain([response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118["Location"]]);
23235
+ const locationHeader = _optionalChain([response, 'access', _113 => _113.headers, 'optionalAccess', _114 => _114["location"]]) || _optionalChain([response, 'access', _115 => _115.headers, 'optionalAccess', _116 => _116["Location"]]);
23239
23236
  let createdId = model.id || "";
23240
23237
  if (locationHeader) {
23241
23238
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -23360,14 +23357,14 @@ var delete_member_type_default = _mcpserversdk.withStandardDecorators.call(void
23360
23357
 
23361
23358
 
23362
23359
 
23363
- var inputSchema37 = _zod.z.object({
23360
+ var inputSchema38 = _zod.z.object({
23364
23361
  id: putMemberTypeByIdParams.shape.id,
23365
23362
  data: _zod.z.object(putMemberTypeByIdBody.shape)
23366
23363
  });
23367
23364
  var UpdateMemberTypeTool = {
23368
23365
  name: "update-member-type",
23369
23366
  description: "Updates a member type by id",
23370
- inputSchema: inputSchema37.shape,
23367
+ inputSchema: inputSchema38.shape,
23371
23368
  annotations: { idempotentHint: true },
23372
23369
  slices: ["update"],
23373
23370
  handler: (async (model) => {
@@ -23385,7 +23382,7 @@ var update_member_type_default = _mcpserversdk.withStandardDecorators.call(void
23385
23382
 
23386
23383
 
23387
23384
 
23388
- var inputSchema38 = _zod.z.object({
23385
+ var inputSchema39 = _zod.z.object({
23389
23386
  id: _zod.z.string().uuid()
23390
23387
  });
23391
23388
  var copyMemberTypeOutputSchema = _zod.z.object({
@@ -23395,7 +23392,7 @@ var copyMemberTypeOutputSchema = _zod.z.object({
23395
23392
  var CopyMemberTypeTool = {
23396
23393
  name: "copy-member-type",
23397
23394
  description: "Copy a member type to a new location",
23398
- inputSchema: inputSchema38.shape,
23395
+ inputSchema: inputSchema39.shape,
23399
23396
  outputSchema: copyMemberTypeOutputSchema.shape,
23400
23397
  slices: ["copy"],
23401
23398
  handler: (async (model) => {
@@ -23405,7 +23402,7 @@ var CopyMemberTypeTool = {
23405
23402
  validateStatus: () => true
23406
23403
  });
23407
23404
  if (response.status === 201) {
23408
- const locationHeader = _optionalChain([response, 'access', _119 => _119.headers, 'optionalAccess', _120 => _120["location"]]) || _optionalChain([response, 'access', _121 => _121.headers, 'optionalAccess', _122 => _122["Location"]]);
23405
+ const locationHeader = _optionalChain([response, 'access', _117 => _117.headers, 'optionalAccess', _118 => _118["location"]]) || _optionalChain([response, 'access', _119 => _119.headers, 'optionalAccess', _120 => _120["Location"]]);
23409
23406
  let createdId = "";
23410
23407
  if (locationHeader) {
23411
23408
  const idMatch = locationHeader.match(/([0-9a-f-]{36})$/i);
@@ -23765,7 +23762,7 @@ var CreatePartialViewTool = {
23765
23762
  validateStatus: () => true
23766
23763
  });
23767
23764
  if (response.status === 201) {
23768
- const locationHeader = _optionalChain([response, 'access', _123 => _123.headers, 'optionalAccess', _124 => _124["location"]]) || _optionalChain([response, 'access', _125 => _125.headers, 'optionalAccess', _126 => _126["Location"]]);
23765
+ const locationHeader = _optionalChain([response, 'access', _121 => _121.headers, 'optionalAccess', _122 => _122["location"]]) || _optionalChain([response, 'access', _123 => _123.headers, 'optionalAccess', _124 => _124["Location"]]);
23769
23766
  let createdPath = "";
23770
23767
  if (locationHeader) {
23771
23768
  const pathMatch = locationHeader.match(/partial-view\/(.+)$/);
@@ -23812,7 +23809,7 @@ var CreatePartialViewFolderTool = {
23812
23809
  validateStatus: () => true
23813
23810
  });
23814
23811
  if (response.status === 201) {
23815
- const locationHeader = _optionalChain([response, 'access', _127 => _127.headers, 'optionalAccess', _128 => _128["location"]]) || _optionalChain([response, 'access', _129 => _129.headers, 'optionalAccess', _130 => _130["Location"]]);
23812
+ const locationHeader = _optionalChain([response, 'access', _125 => _125.headers, 'optionalAccess', _126 => _126["location"]]) || _optionalChain([response, 'access', _127 => _127.headers, 'optionalAccess', _128 => _128["Location"]]);
23816
23813
  let createdPath = "";
23817
23814
  if (locationHeader) {
23818
23815
  const pathMatch = locationHeader.match(/partial-view\/folder\/(.+)$/);
@@ -24213,14 +24210,20 @@ var PropertyTypeCollection = {
24213
24210
  var GetAllRedirectsTool = {
24214
24211
  name: "get-all-redirects",
24215
24212
  description: `Gets all redirects from the Umbraco server.
24216
- Returns a list of redirects with their details.`,
24217
- 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,
24218
24221
  outputSchema: getRedirectManagementResponse.shape,
24219
24222
  annotations: { readOnlyHint: true },
24220
24223
  slices: ["list"],
24221
- handler: (async () => {
24224
+ handler: (async (params) => {
24222
24225
  return _mcpserversdk.executeGetApiCall.call(void 0,
24223
- (client) => client.getRedirectManagement(void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
24226
+ (client) => client.getRedirectManagement(params, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
24224
24227
  );
24225
24228
  })
24226
24229
  };
@@ -24639,7 +24642,7 @@ var CreateScriptTool = {
24639
24642
  validateStatus: () => true
24640
24643
  });
24641
24644
  if (response.status === 201) {
24642
- const locationHeader = _optionalChain([response, 'access', _131 => _131.headers, 'optionalAccess', _132 => _132["location"]]) || _optionalChain([response, 'access', _133 => _133.headers, 'optionalAccess', _134 => _134["Location"]]);
24645
+ const locationHeader = _optionalChain([response, 'access', _129 => _129.headers, 'optionalAccess', _130 => _130["location"]]) || _optionalChain([response, 'access', _131 => _131.headers, 'optionalAccess', _132 => _132["Location"]]);
24643
24646
  let createdPath = "";
24644
24647
  if (locationHeader) {
24645
24648
  const pathMatch = locationHeader.match(/script\/(.+)$/);
@@ -24686,7 +24689,7 @@ var CreateScriptFolderTool = {
24686
24689
  validateStatus: () => true
24687
24690
  });
24688
24691
  if (response.status === 201) {
24689
- const locationHeader = _optionalChain([response, 'access', _135 => _135.headers, 'optionalAccess', _136 => _136["location"]]) || _optionalChain([response, 'access', _137 => _137.headers, 'optionalAccess', _138 => _138["Location"]]);
24692
+ const locationHeader = _optionalChain([response, 'access', _133 => _133.headers, 'optionalAccess', _134 => _134["location"]]) || _optionalChain([response, 'access', _135 => _135.headers, 'optionalAccess', _136 => _136["Location"]]);
24690
24693
  let createdPath = "";
24691
24694
  if (locationHeader) {
24692
24695
  const pathMatch = locationHeader.match(/script\/folder\/(.+)$/);
@@ -25283,7 +25286,7 @@ var CreateStylesheetTool = {
25283
25286
  validateStatus: () => true
25284
25287
  });
25285
25288
  if (response.status === 201) {
25286
- const locationHeader = _optionalChain([response, 'access', _139 => _139.headers, 'optionalAccess', _140 => _140["location"]]) || _optionalChain([response, 'access', _141 => _141.headers, 'optionalAccess', _142 => _142["Location"]]);
25289
+ const locationHeader = _optionalChain([response, 'access', _137 => _137.headers, 'optionalAccess', _138 => _138["location"]]) || _optionalChain([response, 'access', _139 => _139.headers, 'optionalAccess', _140 => _140["Location"]]);
25287
25290
  let createdPath = "";
25288
25291
  if (locationHeader) {
25289
25292
  const pathMatch = locationHeader.match(/stylesheet\/(.+)$/);
@@ -25330,7 +25333,7 @@ var CreateStylesheetFolderTool = {
25330
25333
  validateStatus: () => true
25331
25334
  });
25332
25335
  if (response.status === 201) {
25333
- const locationHeader = _optionalChain([response, 'access', _143 => _143.headers, 'optionalAccess', _144 => _144["location"]]) || _optionalChain([response, 'access', _145 => _145.headers, 'optionalAccess', _146 => _146["Location"]]);
25336
+ const locationHeader = _optionalChain([response, 'access', _141 => _141.headers, 'optionalAccess', _142 => _142["location"]]) || _optionalChain([response, 'access', _143 => _143.headers, 'optionalAccess', _144 => _144["Location"]]);
25334
25337
  let createdPath = "";
25335
25338
  if (locationHeader) {
25336
25339
  const pathMatch = locationHeader.match(/stylesheet\/folder\/(.+)$/);
@@ -25694,7 +25697,7 @@ var CreateTemplateTool = {
25694
25697
  validateStatus: () => true
25695
25698
  });
25696
25699
  if (response.status === 201) {
25697
- const locationHeader = _optionalChain([response, 'access', _147 => _147.headers, 'optionalAccess', _148 => _148["location"]]) || _optionalChain([response, 'access', _149 => _149.headers, 'optionalAccess', _150 => _150["Location"]]);
25700
+ const locationHeader = _optionalChain([response, 'access', _145 => _145.headers, 'optionalAccess', _146 => _146["location"]]) || _optionalChain([response, 'access', _147 => _147.headers, 'optionalAccess', _148 => _148["Location"]]);
25698
25701
  let createdId = "";
25699
25702
  if (locationHeader) {
25700
25703
  const idMatch = locationHeader.match(/template\/([a-f0-9-]+)$/i);
@@ -26423,15 +26426,11 @@ var get_user_current_permissions_default = _mcpserversdk.withStandardDecorators.
26423
26426
 
26424
26427
 
26425
26428
 
26426
-
26427
- var outputSchema62 = _zod.z.object({
26428
- items: getUserCurrentPermissionsDocumentResponse
26429
- });
26430
26429
  var GetUserCurrentPermissionsDocumentTool = {
26431
26430
  name: "get-user-current-permissions-document",
26432
26431
  description: "Gets the current user's document permissions for specific documents",
26433
26432
  inputSchema: getUserCurrentPermissionsDocumentQueryParams.shape,
26434
- outputSchema: outputSchema62.shape,
26433
+ outputSchema: getUserCurrentPermissionsDocumentResponse.shape,
26435
26434
  annotations: { readOnlyHint: true },
26436
26435
  slices: ["permissions"],
26437
26436
  handler: (async (params) => {
@@ -26512,14 +26511,14 @@ var get_user_batch_default = _mcpserversdk.withStandardDecorators.call(void 0, G
26512
26511
 
26513
26512
 
26514
26513
 
26515
- var inputSchema39 = _zod.z.object({
26514
+ var inputSchema40 = _zod.z.object({
26516
26515
  ...postUserAvatarByIdParams.shape,
26517
26516
  ...postUserAvatarByIdBody.shape
26518
26517
  });
26519
26518
  var UploadUserAvatarByIdTool = {
26520
26519
  name: "upload-user-avatar-by-id",
26521
26520
  description: "Uploads an avatar for a specific user by ID (admin only or self-service)",
26522
- inputSchema: inputSchema39.shape,
26521
+ inputSchema: inputSchema40.shape,
26523
26522
  slices: ["update"],
26524
26523
  handler: (async ({ id, file }) => {
26525
26524
  return _mcpserversdk.executeVoidApiCall.call(void 0,
@@ -26622,7 +26621,7 @@ var UserCollection = {
26622
26621
  description: "User account management and administration",
26623
26622
  dependencies: ["temporary-file"]
26624
26623
  },
26625
- tools: (user) => {
26624
+ tools: (user, options) => {
26626
26625
  const tools = [];
26627
26626
  tools.push(get_user_current_default);
26628
26627
  tools.push(get_user_current_configuration_default);
@@ -26640,7 +26639,7 @@ var UserCollection = {
26640
26639
  tools.push(get_item_user_default);
26641
26640
  tools.push(get_user_configuration_default);
26642
26641
  tools.push(get_user_by_id_calculate_start_nodes_default);
26643
- if (isUmbracoAtLeast(17, 6)) {
26642
+ if (isUmbracoAtLeast(17, 6, _optionalChain([options, 'optionalAccess', _149 => _149.umbracoVersion]))) {
26644
26643
  tools.push(get_user_batch_default);
26645
26644
  }
26646
26645
  tools.push(upload_user_avatar_by_id_default);
@@ -26674,7 +26673,7 @@ var CreateUserDataTool = {
26674
26673
  validateStatus: () => true
26675
26674
  });
26676
26675
  if (response.status === 201) {
26677
- const locationHeader = _optionalChain([response, 'access', _151 => _151.headers, 'optionalAccess', _152 => _152["location"]]) || _optionalChain([response, 'access', _153 => _153.headers, 'optionalAccess', _154 => _154["Location"]]);
26676
+ const locationHeader = _optionalChain([response, 'access', _150 => _150.headers, 'optionalAccess', _151 => _151["location"]]) || _optionalChain([response, 'access', _152 => _152.headers, 'optionalAccess', _153 => _153["Location"]]);
26678
26677
  let createdId = "";
26679
26678
  if (locationHeader) {
26680
26679
  const idMatch = locationHeader.match(/user-data\/([a-f0-9-]+)$/i);
@@ -26828,14 +26827,14 @@ var get_user_group_default = _mcpserversdk.withStandardDecorators.call(void 0, G
26828
26827
 
26829
26828
 
26830
26829
 
26831
- var outputSchema63 = _zod.z.object({
26830
+ var outputSchema62 = _zod.z.object({
26832
26831
  items: getItemUserGroupResponse
26833
26832
  });
26834
26833
  var GetUserGroupByIdArrayTool = {
26835
26834
  name: "get-user-group-by-id-array",
26836
26835
  description: "Gets user groups by an array of IDs",
26837
26836
  inputSchema: getItemUserGroupQueryParams.shape,
26838
- outputSchema: outputSchema63.shape,
26837
+ outputSchema: outputSchema62.shape,
26839
26838
  annotations: { readOnlyHint: true },
26840
26839
  slices: ["list"],
26841
26840
  handler: (async (params) => {
@@ -26912,7 +26911,7 @@ var CreateUserGroupTool = {
26912
26911
  validateStatus: () => true
26913
26912
  });
26914
26913
  if (response.status === 201) {
26915
- const locationHeader = _optionalChain([response, 'access', _155 => _155.headers, 'optionalAccess', _156 => _156["location"]]) || _optionalChain([response, 'access', _157 => _157.headers, 'optionalAccess', _158 => _158["Location"]]);
26914
+ const locationHeader = _optionalChain([response, 'access', _154 => _154.headers, 'optionalAccess', _155 => _155["location"]]) || _optionalChain([response, 'access', _156 => _156.headers, 'optionalAccess', _157 => _157["Location"]]);
26916
26915
  let createdId = "";
26917
26916
  if (locationHeader) {
26918
26917
  const idMatch = locationHeader.match(/user-group\/([a-f0-9-]+)$/i);
@@ -27056,14 +27055,14 @@ var get_webhook_by_id_default = _mcpserversdk.withStandardDecorators.call(void 0
27056
27055
 
27057
27056
 
27058
27057
 
27059
- var outputSchema64 = _zod.z.object({
27058
+ var outputSchema63 = _zod.z.object({
27060
27059
  items: getItemWebhookResponse
27061
27060
  });
27062
27061
  var GetWebhookItemTool = {
27063
27062
  name: "get-webhook-item",
27064
27063
  description: "Gets webhooks by IDs (or empty array if no IDs are provided)",
27065
27064
  inputSchema: getItemWebhookQueryParams.shape,
27066
- outputSchema: outputSchema64.shape,
27065
+ outputSchema: outputSchema63.shape,
27067
27066
  annotations: { readOnlyHint: true },
27068
27067
  slices: ["list"],
27069
27068
  handler: (async (params) => {
@@ -27210,7 +27209,7 @@ var CreateWebhookTool = {
27210
27209
  validateStatus: () => true
27211
27210
  });
27212
27211
  if (response.status === 201) {
27213
- const locationHeader = _optionalChain([response, 'access', _159 => _159.headers, 'optionalAccess', _160 => _160["location"]]) || _optionalChain([response, 'access', _161 => _161.headers, 'optionalAccess', _162 => _162["Location"]]);
27212
+ const locationHeader = _optionalChain([response, 'access', _158 => _158.headers, 'optionalAccess', _159 => _159["location"]]) || _optionalChain([response, 'access', _160 => _160.headers, 'optionalAccess', _161 => _161["Location"]]);
27214
27213
  let createdId = "";
27215
27214
  if (locationHeader) {
27216
27215
  const idMatch = locationHeader.match(/webhook\/([a-f0-9-]+)$/i);
@@ -27239,16 +27238,25 @@ var create_webhook_default = _mcpserversdk.withStandardDecorators.call(void 0, C
27239
27238
 
27240
27239
 
27241
27240
 
27241
+
27242
+ var inputSchema41 = _zod.z.object({
27243
+ ...getWebhookByIdLogsParams.shape,
27244
+ ...getWebhookByIdLogsQueryParams.shape
27245
+ });
27242
27246
  var GetWebhookLogsTool = {
27243
27247
  name: "get-webhook-logs",
27244
- description: "Gets logs for a specific webhook",
27245
- 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,
27246
27254
  outputSchema: getWebhookByIdLogsResponse.shape,
27247
27255
  annotations: { readOnlyHint: true },
27248
27256
  slices: ["read"],
27249
- handler: (async ({ id }) => {
27257
+ handler: (async ({ id, skip, take }) => {
27250
27258
  return _mcpserversdk.executeGetApiCall.call(void 0,
27251
- (client) => client.getWebhookByIdLogs(id, void 0, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27259
+ (client) => client.getWebhookByIdLogs(id, { skip, take }, _mcpserversdk.CAPTURE_RAW_HTTP_RESPONSE)
27252
27260
  );
27253
27261
  })
27254
27262
  };
@@ -27446,4 +27454,4 @@ var allSliceNames = [...toolSliceNames, "other"];
27446
27454
 
27447
27455
 
27448
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;
27449
- //# sourceMappingURL=chunk-3FBX4NTJ.cjs.map
27457
+ //# sourceMappingURL=chunk-7BJSON54.cjs.map