@diviops/mcp-server 1.5.63 → 1.5.65
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 +18 -2
- package/dist/index.js +28 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,23 @@ The Node.js MCP server inside the DiviOps harness. It gives Claude Code, Codex,
|
|
|
8
8
|
Claude Code <-> MCP Server (stdio) <-> WordPress REST API <-> DiviOps Agent plugin
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## 1.5.
|
|
11
|
+
## 1.5.65 release note
|
|
12
|
+
|
|
13
|
+
Variable scans now report incompatible legacy non-color IDs, whether they are defined, and their known page/preset references. Scan coverage and truncation are explicit. Existing orphan and unused classifications are unchanged. Native page-usage detection is not proof of successful frontend rendering.
|
|
14
|
+
|
|
15
|
+
Existing mixed-case or underscore IDs still need reviewed replacement variables and reference updates. No variable is renamed or deleted automatically; zero known references does not establish that deletion is safe.
|
|
16
|
+
|
|
17
|
+
Pair with Free Agent 1.5.38. Public builder remains 1.4.11.
|
|
18
|
+
|
|
19
|
+
## Previous 1.5.64 release note
|
|
20
|
+
|
|
21
|
+
Adds `diviops_page_settings_get` and `diviops_page_settings_update` with Free
|
|
22
|
+
Agent 1.5.37. Read and update page-wide Content Area and Section backgrounds on ordinary Divi pages. Supports previews, literal colors, transparency and clearing to native defaults, with checksum checks and preservation of unrelated page data. Explicit per-section backgrounds remain intact.
|
|
23
|
+
|
|
24
|
+
Verified on WordPress 7.1, PHP 8.3 and Divi 5.13.1, including native settings
|
|
25
|
+
save/reopen and frontend rendering. Public builder and compatibility floors are unchanged.
|
|
26
|
+
|
|
27
|
+
## Previous 1.5.63 release note
|
|
12
28
|
|
|
13
29
|
With Free Agent 1.5.36, runtime schema discovery accepts registered third-party
|
|
14
30
|
Divi modules and routes their namespaced identifiers without dropping the
|
|
@@ -424,7 +440,7 @@ The skill enforces the Divi block format, the design system, and the response co
|
|
|
424
440
|
|
|
425
441
|
## Tools at a glance
|
|
426
442
|
|
|
427
|
-
The server exposes **
|
|
443
|
+
The server exposes **97 always-on tools** across the categories below. Each category links to representative tools; the full table lives in [server-reference.md](../docs/server-reference.md).
|
|
428
444
|
|
|
429
445
|
| Category | Use case | Tool prefixes |
|
|
430
446
|
|----------|----------|---------------|
|
package/dist/index.js
CHANGED
|
@@ -1363,6 +1363,32 @@ registerPluginTool("diviops_page_update_content", {
|
|
|
1363
1363
|
pageContentCandidates.cancel(reservation.data.content_ref);
|
|
1364
1364
|
}
|
|
1365
1365
|
});
|
|
1366
|
+
registerPluginTool("diviops_page_settings_get", {
|
|
1367
|
+
description: "Read ordinary WordPress page background settings: stored values/presence, native defaults and a settings_checksum. These are not computed browser colors. Requires edit permission. No Theme Builder layout or global Theme Options access.",
|
|
1368
|
+
inputSchema: { page_id: z.number().int().positive() },
|
|
1369
|
+
annotations: { readOnlyHint: true },
|
|
1370
|
+
_meta: { idempotent: "true" },
|
|
1371
|
+
}, async ({ page_id }) => {
|
|
1372
|
+
const result = await wp.requestEnveloped(`/page/settings/${page_id}`);
|
|
1373
|
+
return { content: [{ type: "text", text: serializeEnvelope(result, "diviops_page_settings_get") }] };
|
|
1374
|
+
});
|
|
1375
|
+
registerPluginTool("diviops_page_settings_update", {
|
|
1376
|
+
description: "Set/clear Content Area and Section backgrounds on ordinary WordPress pages. Read settings first and pass settings_checksum as expected_checksum. Omission preserves; null deletes the override; empty strings are rejected. Colors: #RGB/#RRGGBB, bounded rgb()/rgba(), or transparent. Existing dynamic values are preserved when omitted but new dynamic values are unsupported. Explicit defaults may be normalized away by native Divi save. Refuses native background drafts. Applies post-scoped CSS/dynamic-assets cache refresh, without canvas-reference cleanup; no-op does not flush. If cache_refresh_failed reports settings_applied, read state and retry cache flush, not the write. Optimistic checksum is not an editor lock." + DRY_RUN_DESC_SUFFIX,
|
|
1377
|
+
inputSchema: {
|
|
1378
|
+
page_id: z.number().int().positive(),
|
|
1379
|
+
expected_checksum: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
1380
|
+
settings: z.object({ content_area_background: z.string().nullable().optional(), section_background: z.string().nullable().optional() }).strict().refine(value => Object.keys(value).length > 0, "Provide at least one background field"),
|
|
1381
|
+
dry_run: DRY_RUN_FIELD,
|
|
1382
|
+
},
|
|
1383
|
+
annotations: { idempotentHint: false },
|
|
1384
|
+
_meta: { idempotent: "false" },
|
|
1385
|
+
}, async ({ page_id, expected_checksum, settings, dry_run }) => {
|
|
1386
|
+
const result = await wp.requestEnveloped(`/page/settings/${page_id}`, {
|
|
1387
|
+
method: "POST",
|
|
1388
|
+
body: { expected_checksum, settings, dry_run: dry_run ?? false },
|
|
1389
|
+
});
|
|
1390
|
+
return { content: [{ type: "text", text: serializeEnvelope(result, "diviops_page_settings_update") }] };
|
|
1391
|
+
});
|
|
1366
1392
|
registerPluginTool("diviops_page_update_meta", {
|
|
1367
1393
|
description: "Update page/post metadata fields without touching post_content. Supports title, slug, parent, and menu_order; use diviops_page_update_status for status changes. Slug input must already be in sanitized WordPress post_name form. When a published post's slug changes, preserve_old_slug defaults to true and records the previous slug in _wp_old_slug so WordPress old-slug redirects can work. Returns readback fields after apply. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; missing page_id or invalid parent returns 'not_found', edit-permission failures return 'forbidden' (HTTP 403), invalid/empty slug or malformed field values return 'invalid_input' with `error.data` documenting the field and sanitized slug where relevant." +
|
|
1368
1394
|
DRY_RUN_DESC_SUFFIX,
|
|
@@ -4147,7 +4173,7 @@ registerPluginTool("diviops_variable_delete", {
|
|
|
4147
4173
|
};
|
|
4148
4174
|
});
|
|
4149
4175
|
registerPluginTool("diviops_variable_scan_orphans", {
|
|
4150
|
-
description: "Scan pages, Theme Builder layouts (header/body/footer), Divi Library items, canvas pages, and the preset registry for gvid-/gcid- references that have no backing entry in the Variable Manager (orphans), plus variables defined but referenced nowhere (unused). Orphans render as invalid CSS on the frontend — the $variable()$ resolver falls through with no fallback. Use after a deletion with force=true, or periodically as a hygiene check. Symmetric to diviops_preset_scan_orphans. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
|
|
4176
|
+
description: "Scan pages, Theme Builder layouts (header/body/footer), Divi Library items, canvas pages, and the preset registry for gvid-/gcid- references that have no backing entry in the Variable Manager (orphans), plus variables defined but referenced nowhere (unused). Orphans render as invalid CSS on the frontend — the $variable()$ resolver falls through with no fallback. Use after a deletion with force=true, or periodically as a hygiene check. Also reports incompatible_variables: exact legacy non-color IDs, whether defined, type (null if undefined), known reference count and locations. These can be defined and referenced without being orphans. scan_scope describes coverage and truncation; zero known references is not proof safe to delete. Recreate reviewed replacements and update reviewed references; never silently lowercase IDs. ID compatibility is not frontend rendering verification. Symmetric to diviops_preset_scan_orphans. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }.",
|
|
4151
4177
|
annotations: { idempotentHint: true },
|
|
4152
4178
|
_meta: { idempotent: "true" },
|
|
4153
4179
|
}, async () => {
|
|
@@ -4159,7 +4185,7 @@ registerPluginTool("diviops_variable_scan_orphans", {
|
|
|
4159
4185
|
};
|
|
4160
4186
|
});
|
|
4161
4187
|
registerPluginTool("diviops_variable_used_on_page", {
|
|
4162
|
-
description: "
|
|
4188
|
+
description: "Return native-detected numeric/font variable IDs for a single page — the set Divi 5.4.0+ uses to scope selective `:root{--gvid-*}` CSS variable emission. Walks the same content stack the frontend assembles: post_content + active Theme Builder header/body/footer template content + appended canvas content (interaction targets etc.), plus presets referenced by that content. NOTE: this is `gvid-*` only — color variables (`gcid-*`) are emitted via a separate path (`GlobalData` color block) that is NOT scoped per-page in 5.4.0; this tool returns gvid IDs only. Native detection may truncate incompatible legacy IDs; this is not proof of successful CSS emission or a complete recovery inventory. Use diviops_variable_scan_orphans for full recognized legacy IDs and known locations. Use this tool to debug why a numeric/font variable doesn't render on a specific page. Read-only. Returns the standardized envelope { ok, data?, error: { code, message, hint? } }; success payload is { post_id, variable_ids (sorted, deduped), count, tb_template_ids }. Missing post_id returns 'not_found'; non-positive post_id returns 'invalid_input'; a Divi 5 environment without the `\\\\ET\\\\Builder\\\\FrontEnd\\\\Assets\\\\DetectFeature` class (e.g. Divi 4 active, or Divi disabled) returns 'wp_error' (HTTP 500) with a hint to activate Divi 5.",
|
|
4163
4189
|
inputSchema: {
|
|
4164
4190
|
post_id: z
|
|
4165
4191
|
.number()
|