@diviops/mcp-server 1.5.4 → 1.5.5
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/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -415,7 +415,7 @@ registerPluginTool("diviops_global_color_update", {
|
|
|
415
415
|
return { content: [{ type: "text", text: serializeEnvelope(result, "diviops_global_color_update") }] };
|
|
416
416
|
});
|
|
417
417
|
registerPluginTool("diviops_global_color_delete", {
|
|
418
|
-
description: "Delete a global color from the registry by gcid. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }. Live-reference
|
|
418
|
+
description: "Delete a global color from the registry by gcid. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }. Live-reference detection uses parse_blocks over post_content across pages / TB layouts / library / canvas + the preset registry (mirrors diviops_variable_delete) — MCP-authored content is detected reliably, not just VB-saved content. Returns code 'conflict' (HTTP 409) when references exist with `error.data = { id, ref_count, locations[], scan_truncated, scanned_posts }`. Pass `force: true` to override; orphan refs will render as invalid CSS until pages are re-authored. Always refuses to delete the 5 customizer-bound defaults (gcid-primary-color, gcid-secondary-color, gcid-heading-color, gcid-body-color, gcid-link-color) regardless of force — returns code 'variable.customizer_default_immutable' (HTTP 403) with `error.data = { id, managed_by: 'wp_customizer' }`. Missing gcids return 'not_found' (HTTP 404). Malformed gcid (empty or missing `gcid-` prefix) returns 'invalid_input'. CONCURRENCY: same VB-session race caveat as diviops_global_color_create — an active VB session's next save can re-introduce a color we just deleted if the session held stale data." +
|
|
419
419
|
DRY_RUN_DESC_SUFFIX,
|
|
420
420
|
inputSchema: {
|
|
421
421
|
gcid: z
|
|
@@ -425,7 +425,7 @@ registerPluginTool("diviops_global_color_delete", {
|
|
|
425
425
|
.boolean()
|
|
426
426
|
.optional()
|
|
427
427
|
.default(false)
|
|
428
|
-
.describe("If true, delete even when
|
|
428
|
+
.describe("If true, delete even when live references exist. Customizer-bound defaults remain protected regardless."),
|
|
429
429
|
dry_run: DRY_RUN_FIELD,
|
|
430
430
|
},
|
|
431
431
|
annotations: { idempotentHint: true },
|
|
@@ -1527,7 +1527,7 @@ registerPluginTool("diviops_tb_template_create", {
|
|
|
1527
1527
|
});
|
|
1528
1528
|
// ── Canvas Tools ────────────────────────────────────────────────────
|
|
1529
1529
|
registerPluginTool("diviops_canvas_create", {
|
|
1530
|
-
description: "Create a canvas (off-canvas workspace) linked to a page. Used for popups, off-canvas menus, modals. Content uses standard Divi block markup. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; missing parent_page_id returns ok:false with code 'not_found'; non-string content / malformed canvas_id / append_to_main outside {above, below} returns 'invalid_input'." +
|
|
1530
|
+
description: "Create a canvas (off-canvas workspace) linked to a page. Used for popups, off-canvas menus, modals. Content uses standard Divi block markup. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; missing parent_page_id returns ok:false with code 'not_found'; non-string content / malformed canvas_id / append_to_main outside {above, below} returns 'invalid_input'. Returns code 'conflict' (HTTP 409) when a canvas with the same title already exists under the same parent_page_id — error.data = { existing_canvas_id, parent_page_id, title }. Mirrors diviops_preset_create's uniqueness contract." +
|
|
1531
1531
|
DRY_RUN_DESC_SUFFIX,
|
|
1532
1532
|
inputSchema: {
|
|
1533
1533
|
title: z
|
|
@@ -1554,7 +1554,7 @@ registerPluginTool("diviops_canvas_create", {
|
|
|
1554
1554
|
dry_run: DRY_RUN_FIELD,
|
|
1555
1555
|
},
|
|
1556
1556
|
annotations: { idempotentHint: false },
|
|
1557
|
-
_meta: { idempotent: "
|
|
1557
|
+
_meta: { idempotent: "conditional" },
|
|
1558
1558
|
}, async ({ title, parent_page_id, content, canvas_id, append_to_main, z_index, dry_run, }) => {
|
|
1559
1559
|
const body = {
|
|
1560
1560
|
title,
|