@umbraco-cms/mcp-dev 18.1.8 → 18.1.9
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.
- package/README.md +2 -0
- package/dist/{chunk-O6YXPPS2.js → chunk-OF7HVRKR.js} +37 -58
- package/dist/{chunk-O6YXPPS2.js.map → chunk-OF7HVRKR.js.map} +1 -1
- package/dist/{chunk-GOS3TR7Z.cjs → chunk-R2HBS7YH.cjs} +35 -56
- package/dist/chunk-R2HBS7YH.cjs.map +1 -0
- package/dist/collections.cjs +2 -2
- package/dist/collections.js +1 -1
- package/dist/index.cjs +122 -108
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +37 -23
- package/dist/index.js.map +1 -1
- package/dist/tool-types.d.ts +4 -6
- package/package.json +4 -4
- package/dist/chunk-GOS3TR7Z.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ Download and install the [Claude Desktop app](https://claude.ai/download), then
|
|
|
39
39
|
|
|
40
40
|
3. Fully restart Claude Desktop (including in the system tray on Windows)
|
|
41
41
|
|
|
42
|
+
> **Tip:** Pin `@umbraco-cms/mcp-dev` to your site's Umbraco major (e.g. `@17` above, or `@18` for an Umbraco 18.x site) rather than `@latest`. Tool schemas track the Management API of the package's own major, so a mismatched major can fail confusingly mid-task once a tool's shape has drifted. The server checks the connected site's version on startup and warns on a mismatch, but pinning avoids it altogether.
|
|
43
|
+
|
|
42
44
|
## Documentation
|
|
43
45
|
|
|
44
46
|
For complete installation instructions, configuration options, tool listings, and usage examples, see the full documentation:
|
|
@@ -23635,34 +23635,20 @@ function buildSourceTypeSection(allowFilePath, otherSources) {
|
|
|
23635
23635
|
}
|
|
23636
23636
|
|
|
23637
23637
|
// src/umbraco-api/tools/media/post/helpers/streaming-upload.ts
|
|
23638
|
-
import {
|
|
23639
|
-
getStoredUmbracoToken
|
|
23640
|
-
} from "@umbraco-cms/mcp-hosted";
|
|
23641
23638
|
import {
|
|
23642
23639
|
CAPTURE_RAW_HTTP_RESPONSE as CAPTURE_RAW_HTTP_RESPONSE198,
|
|
23640
|
+
getActiveRequestContext,
|
|
23641
|
+
getSessionUmbracoAuth,
|
|
23643
23642
|
createToolResult as createToolResult29,
|
|
23644
23643
|
createToolResultError as createToolResultError14,
|
|
23645
23644
|
normalizeBaseUrl
|
|
23646
23645
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
return authContext !== null;
|
|
23646
|
+
function isStreamingUploadAvailable() {
|
|
23647
|
+
return getActiveRequestContext()?.umbracoAuth !== void 0;
|
|
23650
23648
|
}
|
|
23651
23649
|
async function resolveAuth() {
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
"Streaming auth context not configured. setStreamingAuthContext() must be called in worker init()."
|
|
23655
|
-
);
|
|
23656
|
-
}
|
|
23657
|
-
const entry = await getStoredUmbracoToken(authContext.env.OAUTH_KV, authContext.tokenKey);
|
|
23658
|
-
if (!entry?.tokens?.access_token) {
|
|
23659
|
-
throw new Error("No Umbraco access token in KV. Reconnect the MCP connector.");
|
|
23660
|
-
}
|
|
23661
|
-
const baseUrl = entry.site?.serverUrl ?? entry.site?.baseUrl ?? authContext.env.UMBRACO_SERVER_URL ?? authContext.env.UMBRACO_BASE_URL;
|
|
23662
|
-
if (!baseUrl) {
|
|
23663
|
-
throw new Error("No Umbraco base URL resolvable from site or env.");
|
|
23664
|
-
}
|
|
23665
|
-
return { accessToken: entry.tokens.access_token, baseUrl: normalizeBaseUrl(baseUrl) };
|
|
23650
|
+
const { accessToken, baseUrl } = await getSessionUmbracoAuth();
|
|
23651
|
+
return { accessToken, baseUrl: normalizeBaseUrl(baseUrl) };
|
|
23666
23652
|
}
|
|
23667
23653
|
function ensureExtension(name, contentType, urlPath) {
|
|
23668
23654
|
if (name.includes(".")) return name;
|
|
@@ -23686,10 +23672,7 @@ async function streamingUploadFromUrl(params) {
|
|
|
23686
23672
|
);
|
|
23687
23673
|
const [mediaTypeId, auth] = await Promise.all([
|
|
23688
23674
|
fetchMediaTypeId(client, validatedMediaTypeName),
|
|
23689
|
-
(
|
|
23690
|
-
await client.getTemporaryFileConfiguration().catch(() => void 0);
|
|
23691
|
-
return resolveAuth();
|
|
23692
|
-
})()
|
|
23675
|
+
resolveAuth()
|
|
23693
23676
|
]);
|
|
23694
23677
|
const { accessToken, baseUrl } = auth;
|
|
23695
23678
|
const ctl = new AbortController();
|
|
@@ -23891,7 +23874,7 @@ ${filePathSection}
|
|
|
23891
23874
|
} else {
|
|
23892
23875
|
effectiveSourceType = model.sourceType;
|
|
23893
23876
|
}
|
|
23894
|
-
if (effectiveSourceType === "url" &&
|
|
23877
|
+
if (effectiveSourceType === "url" && isStreamingUploadAvailable()) {
|
|
23895
23878
|
if (!effectiveFileUrl) {
|
|
23896
23879
|
return createToolResultError15({
|
|
23897
23880
|
detail: "Error creating media: fileUrl is required when sourceType is 'url'"
|
|
@@ -24020,7 +24003,7 @@ ${filePathSection}
|
|
|
24020
24003
|
});
|
|
24021
24004
|
}
|
|
24022
24005
|
const client = UmbracoManagementClient3.getClient();
|
|
24023
|
-
const streamingAvailable =
|
|
24006
|
+
const streamingAvailable = isStreamingUploadAvailable();
|
|
24024
24007
|
const results = await mapWithConcurrency(
|
|
24025
24008
|
model.files,
|
|
24026
24009
|
UPLOAD_CONCURRENCY,
|
|
@@ -29513,20 +29496,16 @@ var GetUserCurrentPermissionsTool = {
|
|
|
29513
29496
|
var get_user_current_permissions_default = withStandardDecorators403(GetUserCurrentPermissionsTool);
|
|
29514
29497
|
|
|
29515
29498
|
// src/umbraco-api/tools/user/get/get-user-current-permissions-document.ts
|
|
29516
|
-
import { z as z171 } from "zod";
|
|
29517
29499
|
import {
|
|
29518
29500
|
CAPTURE_RAW_HTTP_RESPONSE as CAPTURE_RAW_HTTP_RESPONSE369,
|
|
29519
29501
|
executeGetApiCall as executeGetApiCall187,
|
|
29520
29502
|
withStandardDecorators as withStandardDecorators404
|
|
29521
29503
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
29522
|
-
var outputSchema66 = z171.object({
|
|
29523
|
-
items: getUserCurrentPermissionsDocumentResponse
|
|
29524
|
-
});
|
|
29525
29504
|
var GetUserCurrentPermissionsDocumentTool = {
|
|
29526
29505
|
name: "get-user-current-permissions-document",
|
|
29527
29506
|
description: "Gets the current user's document permissions for specific documents",
|
|
29528
29507
|
inputSchema: getUserCurrentPermissionsDocumentQueryParams.shape,
|
|
29529
|
-
outputSchema:
|
|
29508
|
+
outputSchema: getUserCurrentPermissionsDocumentResponse.shape,
|
|
29530
29509
|
annotations: { readOnlyHint: true },
|
|
29531
29510
|
slices: ["permissions"],
|
|
29532
29511
|
handler: (async (params) => {
|
|
@@ -29601,13 +29580,13 @@ var GetUserBatchTool = {
|
|
|
29601
29580
|
var get_user_batch_default = withStandardDecorators407(GetUserBatchTool);
|
|
29602
29581
|
|
|
29603
29582
|
// src/umbraco-api/tools/user/post/upload-user-avatar-by-id.ts
|
|
29604
|
-
import { z as
|
|
29583
|
+
import { z as z171 } from "zod";
|
|
29605
29584
|
import {
|
|
29606
29585
|
CAPTURE_RAW_HTTP_RESPONSE as CAPTURE_RAW_HTTP_RESPONSE373,
|
|
29607
29586
|
executeVoidApiCall as executeVoidApiCall116,
|
|
29608
29587
|
withStandardDecorators as withStandardDecorators408
|
|
29609
29588
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
29610
|
-
var inputSchema49 =
|
|
29589
|
+
var inputSchema49 = z171.object({
|
|
29611
29590
|
...postUserAvatarByIdParams.shape,
|
|
29612
29591
|
...postUserAvatarByIdBody.shape
|
|
29613
29592
|
});
|
|
@@ -29698,15 +29677,15 @@ var UserCollection = {
|
|
|
29698
29677
|
};
|
|
29699
29678
|
|
|
29700
29679
|
// src/umbraco-api/tools/user-data/post/create-user-data.ts
|
|
29701
|
-
import { z as
|
|
29680
|
+
import { z as z172 } from "zod";
|
|
29702
29681
|
import {
|
|
29703
29682
|
createToolResult as createToolResult53,
|
|
29704
29683
|
createToolResultError as createToolResultError33,
|
|
29705
29684
|
withStandardDecorators as withStandardDecorators411
|
|
29706
29685
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
29707
|
-
var createUserDataOutputSchema =
|
|
29708
|
-
message:
|
|
29709
|
-
id:
|
|
29686
|
+
var createUserDataOutputSchema = z172.object({
|
|
29687
|
+
message: z172.string(),
|
|
29688
|
+
id: z172.string().guid()
|
|
29710
29689
|
});
|
|
29711
29690
|
var CreateUserDataTool = {
|
|
29712
29691
|
name: "create-user-data",
|
|
@@ -29869,20 +29848,20 @@ var GetUserGroupTool = {
|
|
|
29869
29848
|
var get_user_group_default = withStandardDecorators416(GetUserGroupTool);
|
|
29870
29849
|
|
|
29871
29850
|
// src/umbraco-api/tools/user-group/get/get-user-group-by-id-array.ts
|
|
29872
|
-
import { z as
|
|
29851
|
+
import { z as z173 } from "zod";
|
|
29873
29852
|
import {
|
|
29874
29853
|
CAPTURE_RAW_HTTP_RESPONSE as CAPTURE_RAW_HTTP_RESPONSE381,
|
|
29875
29854
|
executeGetItemsApiCall as executeGetItemsApiCall56,
|
|
29876
29855
|
withStandardDecorators as withStandardDecorators417
|
|
29877
29856
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
29878
|
-
var
|
|
29857
|
+
var outputSchema66 = z173.object({
|
|
29879
29858
|
items: getItemUserGroupResponse
|
|
29880
29859
|
});
|
|
29881
29860
|
var GetUserGroupByIdArrayTool = {
|
|
29882
29861
|
name: "get-user-group-by-id-array",
|
|
29883
29862
|
description: "Gets user groups by an array of IDs",
|
|
29884
29863
|
inputSchema: getItemUserGroupQueryParams.shape,
|
|
29885
|
-
outputSchema:
|
|
29864
|
+
outputSchema: outputSchema66.shape,
|
|
29886
29865
|
annotations: { readOnlyHint: true },
|
|
29887
29866
|
slices: ["list"],
|
|
29888
29867
|
handler: (async (params) => {
|
|
@@ -29936,15 +29915,15 @@ var GetFilterUserGroupTool = {
|
|
|
29936
29915
|
var get_filter_user_group_default = withStandardDecorators419(GetFilterUserGroupTool);
|
|
29937
29916
|
|
|
29938
29917
|
// src/umbraco-api/tools/user-group/post/create-user-group.ts
|
|
29939
|
-
import { z as
|
|
29918
|
+
import { z as z174 } from "zod";
|
|
29940
29919
|
import {
|
|
29941
29920
|
createToolResult as createToolResult54,
|
|
29942
29921
|
createToolResultError as createToolResultError34,
|
|
29943
29922
|
withStandardDecorators as withStandardDecorators420
|
|
29944
29923
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
29945
|
-
var createUserGroupOutputSchema =
|
|
29946
|
-
message:
|
|
29947
|
-
id:
|
|
29924
|
+
var createUserGroupOutputSchema = z174.object({
|
|
29925
|
+
message: z174.string(),
|
|
29926
|
+
id: z174.string().guid()
|
|
29948
29927
|
});
|
|
29949
29928
|
var CreateUserGroupTool = {
|
|
29950
29929
|
name: "create-user-group",
|
|
@@ -29983,15 +29962,15 @@ var CreateUserGroupTool = {
|
|
|
29983
29962
|
var create_user_group_default = withStandardDecorators420(CreateUserGroupTool);
|
|
29984
29963
|
|
|
29985
29964
|
// src/umbraco-api/tools/user-group/put/update-user-group.ts
|
|
29986
|
-
import { z as
|
|
29965
|
+
import { z as z175 } from "zod";
|
|
29987
29966
|
import {
|
|
29988
29967
|
CAPTURE_RAW_HTTP_RESPONSE as CAPTURE_RAW_HTTP_RESPONSE384,
|
|
29989
29968
|
executeVoidApiCall as executeVoidApiCall121,
|
|
29990
29969
|
withStandardDecorators as withStandardDecorators421
|
|
29991
29970
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
29992
|
-
var updateUserGroupSchema =
|
|
29971
|
+
var updateUserGroupSchema = z175.object({
|
|
29993
29972
|
id: putUserGroupByIdParams.shape.id,
|
|
29994
|
-
data:
|
|
29973
|
+
data: z175.object(putUserGroupByIdBody.shape)
|
|
29995
29974
|
});
|
|
29996
29975
|
var UpdateUserGroupTool = {
|
|
29997
29976
|
name: "update-user-group",
|
|
@@ -30097,20 +30076,20 @@ var GetWebhookByIdTool = {
|
|
|
30097
30076
|
var get_webhook_by_id_default = withStandardDecorators424(GetWebhookByIdTool);
|
|
30098
30077
|
|
|
30099
30078
|
// src/umbraco-api/tools/webhook/get/get-webhook-by-id-array.ts
|
|
30100
|
-
import { z as
|
|
30079
|
+
import { z as z176 } from "zod";
|
|
30101
30080
|
import {
|
|
30102
30081
|
CAPTURE_RAW_HTTP_RESPONSE as CAPTURE_RAW_HTTP_RESPONSE388,
|
|
30103
30082
|
executeGetItemsApiCall as executeGetItemsApiCall57,
|
|
30104
30083
|
withStandardDecorators as withStandardDecorators425
|
|
30105
30084
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
30106
|
-
var
|
|
30085
|
+
var outputSchema67 = z176.object({
|
|
30107
30086
|
items: getItemWebhookResponse
|
|
30108
30087
|
});
|
|
30109
30088
|
var GetWebhookItemTool = {
|
|
30110
30089
|
name: "get-webhook-item",
|
|
30111
30090
|
description: "Gets webhooks by IDs (or empty array if no IDs are provided)",
|
|
30112
30091
|
inputSchema: getItemWebhookQueryParams.shape,
|
|
30113
|
-
outputSchema:
|
|
30092
|
+
outputSchema: outputSchema67.shape,
|
|
30114
30093
|
annotations: { readOnlyHint: true },
|
|
30115
30094
|
slices: ["list"],
|
|
30116
30095
|
handler: (async (params) => {
|
|
@@ -30165,15 +30144,15 @@ var DeleteWebhookTool = {
|
|
|
30165
30144
|
var delete_webhook_default = withStandardDecorators427(DeleteWebhookTool);
|
|
30166
30145
|
|
|
30167
30146
|
// src/umbraco-api/tools/webhook/put/update-webhook.ts
|
|
30168
|
-
import { z as
|
|
30147
|
+
import { z as z177 } from "zod";
|
|
30169
30148
|
import {
|
|
30170
30149
|
CAPTURE_RAW_HTTP_RESPONSE as CAPTURE_RAW_HTTP_RESPONSE391,
|
|
30171
30150
|
executeVoidApiCall as executeVoidApiCall125,
|
|
30172
30151
|
withStandardDecorators as withStandardDecorators428
|
|
30173
30152
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
30174
|
-
var updateWebhookSchema =
|
|
30153
|
+
var updateWebhookSchema = z177.object({
|
|
30175
30154
|
id: putWebhookByIdParams.shape.id,
|
|
30176
|
-
data:
|
|
30155
|
+
data: z177.object(putWebhookByIdBody.shape)
|
|
30177
30156
|
});
|
|
30178
30157
|
var UpdateWebhookTool = {
|
|
30179
30158
|
name: "update-webhook",
|
|
@@ -30232,15 +30211,15 @@ var GetAllWebhookLogsTool = {
|
|
|
30232
30211
|
var get_all_webhook_logs_default = withStandardDecorators430(GetAllWebhookLogsTool);
|
|
30233
30212
|
|
|
30234
30213
|
// src/umbraco-api/tools/webhook/post/create-webhook.ts
|
|
30235
|
-
import { z as
|
|
30214
|
+
import { z as z178 } from "zod";
|
|
30236
30215
|
import {
|
|
30237
30216
|
createToolResult as createToolResult55,
|
|
30238
30217
|
createToolResultError as createToolResultError35,
|
|
30239
30218
|
withStandardDecorators as withStandardDecorators431
|
|
30240
30219
|
} from "@umbraco-cms/mcp-server-sdk";
|
|
30241
|
-
var createWebhookOutputSchema =
|
|
30242
|
-
message:
|
|
30243
|
-
id:
|
|
30220
|
+
var createWebhookOutputSchema = z178.object({
|
|
30221
|
+
message: z178.string(),
|
|
30222
|
+
id: z178.string().guid()
|
|
30244
30223
|
});
|
|
30245
30224
|
var CreateWebhookTool = {
|
|
30246
30225
|
name: "create-webhook",
|
|
@@ -30494,4 +30473,4 @@ export {
|
|
|
30494
30473
|
allModeNames,
|
|
30495
30474
|
allSliceNames
|
|
30496
30475
|
};
|
|
30497
|
-
//# sourceMappingURL=chunk-
|
|
30476
|
+
//# sourceMappingURL=chunk-OF7HVRKR.js.map
|