@umbraco-cms/mcp-dev 18.0.0 → 18.0.2

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.
@@ -1412,6 +1412,10 @@ export interface UpdateDocumentInput {
1412
1412
  name: string;
1413
1413
  }[];
1414
1414
  };
1415
+ /**
1416
+ * Must be set to true to proceed when 'data.values' is an empty array and the document currently has property values. Without this, the call is rejected to prevent accidentally wiping every property value - the exact mistake that motivated this guard. Not needed if the document has no existing values, or if 'data.values' is non-empty.
1417
+ */
1418
+ confirmClearValues?: boolean;
1415
1419
  }
1416
1420
 
1417
1421
  export interface UpdateDocumentPropertiesInput {
@@ -1477,6 +1481,35 @@ export interface UpdateDocumentPropertiesOutput {
1477
1481
  };
1478
1482
  }
1479
1483
 
1484
+ export interface UpdateDocumentNameInput {
1485
+ /**
1486
+ * The unique identifier of the document to rename
1487
+ */
1488
+ id: string;
1489
+ /**
1490
+ * The new name for the document (or the document variant matching the given culture)
1491
+ */
1492
+ name: string;
1493
+ /**
1494
+ * Optional culture code identifying which variant to rename (e.g., 'en-US'). Required when the document varies by culture and has more than one variant; omit for invariant documents.
1495
+ */
1496
+ culture?: string | null;
1497
+ }
1498
+
1499
+ export interface UpdateDocumentNameOutput {
1500
+ success: boolean;
1501
+ message: string;
1502
+ previousName: string;
1503
+ name: string;
1504
+ culture: string | null;
1505
+ /**
1506
+ * The updated document object
1507
+ */
1508
+ document: {
1509
+ [k: string]: unknown;
1510
+ };
1511
+ }
1512
+
1480
1513
  export interface UpdateBlockPropertyInput {
1481
1514
  /**
1482
1515
  * The document containing the block
@@ -2864,6 +2897,10 @@ export interface CreateElementTypeInput {
2864
2897
  tab?: string;
2865
2898
  group?: string;
2866
2899
  }[];
2900
+ /**
2901
+ * Allow standalone library elements to be created from this element type (Umbraco Element Library). Must be true before create-element will succeed for this type; otherwise create-element returns 'Operation not permitted' (NotAllowed).
2902
+ */
2903
+ allowedInLibrary: boolean;
2867
2904
  }
2868
2905
 
2869
2906
  export interface CreateElementTypeOutput {
@@ -4222,6 +4259,152 @@ export interface UpdateElementPropertiesOutput {
4222
4259
  };
4223
4260
  }
4224
4261
 
4262
+ export interface UpdateElementBlockPropertyInput {
4263
+ /**
4264
+ * The element containing the block
4265
+ */
4266
+ elementId: string;
4267
+ /**
4268
+ * Element property alias containing BlockList/BlockGrid
4269
+ */
4270
+ propertyAlias: string;
4271
+ /**
4272
+ * Optional culture for variant element properties
4273
+ */
4274
+ culture?: string | null;
4275
+ /**
4276
+ * Optional segment for variant element properties
4277
+ */
4278
+ segment?: string | null;
4279
+ /**
4280
+ * Array of block updates
4281
+ *
4282
+ * @minItems 1
4283
+ */
4284
+ updates: [
4285
+ {
4286
+ /**
4287
+ * The unique key (UUID) identifying the block
4288
+ */
4289
+ contentKey: string;
4290
+ /**
4291
+ * 'content' for contentData, 'settings' for settingsData
4292
+ */
4293
+ blockType: "content" | "settings";
4294
+ /**
4295
+ * Properties to update within this block
4296
+ *
4297
+ * @minItems 1
4298
+ */
4299
+ properties: [
4300
+ {
4301
+ /**
4302
+ * The property alias within the block to update
4303
+ */
4304
+ alias: string;
4305
+ /**
4306
+ * The new value for the property
4307
+ */
4308
+ value?: unknown | null;
4309
+ /**
4310
+ * Optional culture code for variant block properties
4311
+ */
4312
+ culture?: string | null;
4313
+ /**
4314
+ * Optional segment identifier for variant block properties
4315
+ */
4316
+ segment?: string | null;
4317
+ },
4318
+ ...{
4319
+ /**
4320
+ * The property alias within the block to update
4321
+ */
4322
+ alias: string;
4323
+ /**
4324
+ * The new value for the property
4325
+ */
4326
+ value?: unknown | null;
4327
+ /**
4328
+ * Optional culture code for variant block properties
4329
+ */
4330
+ culture?: string | null;
4331
+ /**
4332
+ * Optional segment identifier for variant block properties
4333
+ */
4334
+ segment?: string | null;
4335
+ }[]
4336
+ ];
4337
+ },
4338
+ ...{
4339
+ /**
4340
+ * The unique key (UUID) identifying the block
4341
+ */
4342
+ contentKey: string;
4343
+ /**
4344
+ * 'content' for contentData, 'settings' for settingsData
4345
+ */
4346
+ blockType: "content" | "settings";
4347
+ /**
4348
+ * Properties to update within this block
4349
+ *
4350
+ * @minItems 1
4351
+ */
4352
+ properties: [
4353
+ {
4354
+ /**
4355
+ * The property alias within the block to update
4356
+ */
4357
+ alias: string;
4358
+ /**
4359
+ * The new value for the property
4360
+ */
4361
+ value?: unknown | null;
4362
+ /**
4363
+ * Optional culture code for variant block properties
4364
+ */
4365
+ culture?: string | null;
4366
+ /**
4367
+ * Optional segment identifier for variant block properties
4368
+ */
4369
+ segment?: string | null;
4370
+ },
4371
+ ...{
4372
+ /**
4373
+ * The property alias within the block to update
4374
+ */
4375
+ alias: string;
4376
+ /**
4377
+ * The new value for the property
4378
+ */
4379
+ value?: unknown | null;
4380
+ /**
4381
+ * Optional culture code for variant block properties
4382
+ */
4383
+ culture?: string | null;
4384
+ /**
4385
+ * Optional segment identifier for variant block properties
4386
+ */
4387
+ segment?: string | null;
4388
+ }[]
4389
+ ];
4390
+ }[]
4391
+ ];
4392
+ }
4393
+
4394
+ export interface UpdateElementBlockPropertyOutput {
4395
+ success: boolean;
4396
+ message: string;
4397
+ results: {
4398
+ success: boolean;
4399
+ contentKey: string;
4400
+ message: string;
4401
+ updatedCount?: number;
4402
+ addedCount?: number;
4403
+ warnings?: string[];
4404
+ errors?: string[];
4405
+ }[];
4406
+ }
4407
+
4225
4408
  export interface MoveElementInput {
4226
4409
  id: string;
4227
4410
  data: {
@@ -17801,6 +17984,7 @@ export interface CmsTools {
17801
17984
  "unpublish-document": { input: UnpublishDocumentInput; output: unknown };
17802
17985
  "update-document": { input: UpdateDocumentInput; output: unknown };
17803
17986
  "update-document-properties": { input: UpdateDocumentPropertiesInput; output: UpdateDocumentPropertiesOutput };
17987
+ "update-document-name": { input: UpdateDocumentNameInput; output: UpdateDocumentNameOutput };
17804
17988
  "update-block-property": { input: UpdateBlockPropertyInput; output: UpdateBlockPropertyOutput };
17805
17989
  "put-document-domains": { input: PutDocumentDomainsInput; output: unknown };
17806
17990
  "put-document-notifications": { input: PutDocumentNotificationsInput; output: unknown };
@@ -17884,6 +18068,7 @@ export interface CmsTools {
17884
18068
  "rollback-element-version": { input: RollbackElementVersionInput; output: unknown };
17885
18069
  "update-element": { input: UpdateElementInput; output: unknown };
17886
18070
  "update-element-properties": { input: UpdateElementPropertiesInput; output: UpdateElementPropertiesOutput };
18071
+ "update-element-block-property": { input: UpdateElementBlockPropertyInput; output: UpdateElementBlockPropertyOutput };
17887
18072
  "move-element": { input: MoveElementInput; output: unknown };
17888
18073
  "move-element-to-recycle-bin": { input: MoveElementToRecycleBinInput; output: unknown };
17889
18074
  "publish-element": { input: PublishElementInput; output: unknown };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-cms/mcp-dev",
3
- "version": "18.0.0",
3
+ "version": "18.0.2",
4
4
  "type": "module",
5
5
  "description": "A model context protocol (MCP) server for Umbraco CMS",
6
6
  "main": "dist/index.js",
@@ -27,6 +27,9 @@
27
27
  "generate": "orval --config orval.config.ts",
28
28
  "inspect": "npx @modelcontextprotocol/inspector node dist/index.js",
29
29
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
30
+ "test:all": "npm run build && npm run test && npm run test:evals",
31
+ "test:one": "node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --forceExit",
32
+ "test:changed": "node scripts/test-changed.mjs",
30
33
  "test:rerun-failures": "grep '^FAIL ' test-failures.log 2>/dev/null | sed 's/^FAIL //' | tr '\\n' ' ' | xargs -r node --experimental-vm-modules node_modules/jest/bin/jest.js --no-coverage || echo 'No failures to rerun (test-failures.log not found or empty)'",
31
34
  "test:evals": "node --experimental-vm-modules node_modules/jest/bin/jest.js --no-coverage --config tests/evals/jest.config.ts",
32
35
  "patch-publish-alpha": "npm version prerelease --preid=alpha && npm publish --tag alpha --access public",
@@ -36,6 +39,7 @@
36
39
  "test:e2e": "npx playwright test --config tests/cms-hosted-e2e/playwright.config.ts",
37
40
  "umbraco:bootstrap": "bash scripts/bootstrap-demo-site.sh",
38
41
  "umbraco:start": "bash scripts/bootstrap-demo-site.sh && dotnet run --project demo-site",
42
+ "start:umbraco": "npm run umbraco:start",
39
43
  "umbraco:stop": "lsof -ti :44391 | xargs kill 2>/dev/null; lsof -ti :56472 | xargs kill 2>/dev/null",
40
44
  "dev:hosted": "wrangler dev"
41
45
  },
@@ -70,7 +74,6 @@
70
74
  "@types/yargs": "^17.0.33",
71
75
  "@umbraco-cms/mcp-hosted": "^1.0.0-beta.31",
72
76
  "@umbraco-cms/mcp-server-sdk": "^1.0.0-beta.31",
73
- "axios": "^1.8.4",
74
77
  "dotenv": "^16.5.0",
75
78
  "form-data": "^4.0.4",
76
79
  "mime-types": "^3.0.1",