@noleemits/vision-builder-control-mcp 4.45.0 → 4.45.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.
- package/index.js +33 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -109,7 +109,7 @@ process.on('SIGINT', () => {
|
|
|
109
109
|
// CONFIG
|
|
110
110
|
// ================================================================
|
|
111
111
|
|
|
112
|
-
const VERSION = '4.45.
|
|
112
|
+
const VERSION = '4.45.2';
|
|
113
113
|
const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
|
|
114
114
|
|
|
115
115
|
// ================================================================
|
|
@@ -3450,7 +3450,7 @@ function getToolDefinitions() {
|
|
|
3450
3450
|
},
|
|
3451
3451
|
{
|
|
3452
3452
|
name: 'delete_acf_field',
|
|
3453
|
-
description: 'Remove a field from an ACF field group by field key. Use list_acf_field_groups first to find the key. Permanently deletes the field definition
|
|
3453
|
+
description: 'Remove a field from an ACF field group by field key. Use list_acf_field_groups first to find the key. Permanently deletes the field definition AND strips it from any acf-json/<group_key>.json sync file (v4.45.1+) so ACF Local JSON does not re-register it on the next request. Existing values in post meta are NOT removed.',
|
|
3454
3454
|
inputSchema: {
|
|
3455
3455
|
type: 'object',
|
|
3456
3456
|
properties: {
|
|
@@ -3459,6 +3459,18 @@ function getToolDefinitions() {
|
|
|
3459
3459
|
required: ['field_key']
|
|
3460
3460
|
}
|
|
3461
3461
|
},
|
|
3462
|
+
{
|
|
3463
|
+
name: 'delete_acf_field_group',
|
|
3464
|
+
description: 'Delete an entire ACF field group (e.g. "group_wal_location") and the matching <group_key>.json sync file from every acf-json/ load path so ACF Local JSON does not re-register it. By default refuses if the group still has fields — pass force=true to wipe the group anyway. v4.45.2+.',
|
|
3465
|
+
inputSchema: {
|
|
3466
|
+
type: 'object',
|
|
3467
|
+
properties: {
|
|
3468
|
+
group_key: { type: 'string', description: 'ACF field group key (e.g. "group_wal_location"). Use list_acf_field_groups to discover.' },
|
|
3469
|
+
force: { type: 'boolean', description: 'If true, delete even when the group still has fields. Default false.' }
|
|
3470
|
+
},
|
|
3471
|
+
required: ['group_key']
|
|
3472
|
+
}
|
|
3473
|
+
},
|
|
3462
3474
|
// ── Audits ──
|
|
3463
3475
|
{
|
|
3464
3476
|
name: 'audit_orphan_pages',
|
|
@@ -6153,7 +6165,25 @@ async function handleToolCall(name, args) {
|
|
|
6153
6165
|
case 'delete_acf_field': {
|
|
6154
6166
|
const r = await apiCall(`/acf-field?field_key=${encodeURIComponent(args.field_key)}`, 'DELETE');
|
|
6155
6167
|
if (r.code || r.error) return ok(`Failed: ${r.message || r.error}`);
|
|
6156
|
-
|
|
6168
|
+
let msg = `Deleted ACF field: "${r.label}" (${r.name}) [${r.field_key}] from group "${r.group_title}"`;
|
|
6169
|
+
if (Array.isArray(r.json_files_updated) && r.json_files_updated.length) {
|
|
6170
|
+
msg += `\nAlso stripped from ${r.json_files_updated.length} acf-json file(s):`;
|
|
6171
|
+
for (const p of r.json_files_updated) msg += `\n - ${p}`;
|
|
6172
|
+
}
|
|
6173
|
+
return ok(msg);
|
|
6174
|
+
}
|
|
6175
|
+
|
|
6176
|
+
case 'delete_acf_field_group': {
|
|
6177
|
+
const params = new URLSearchParams({ group_key: args.group_key });
|
|
6178
|
+
if (args.force) params.set('force', '1');
|
|
6179
|
+
const r = await apiCall(`/acf-field-group?${params.toString()}`, 'DELETE');
|
|
6180
|
+
if (r.code || r.error) return ok(`Failed: ${r.message || r.error}`);
|
|
6181
|
+
let msg = `Deleted ACF field group: "${r.title}" [${r.group_key}] (removed ${r.fields_removed} field(s))`;
|
|
6182
|
+
if (Array.isArray(r.json_files_deleted) && r.json_files_deleted.length) {
|
|
6183
|
+
msg += `\nAlso deleted ${r.json_files_deleted.length} acf-json file(s):`;
|
|
6184
|
+
for (const p of r.json_files_deleted) msg += `\n - ${p}`;
|
|
6185
|
+
}
|
|
6186
|
+
return ok(msg);
|
|
6157
6187
|
}
|
|
6158
6188
|
|
|
6159
6189
|
case 'audit_orphan_pages': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noleemits/vision-builder-control-mcp",
|
|
3
|
-
"version": "4.45.
|
|
3
|
+
"version": "4.45.2",
|
|
4
4
|
"description": "Vision Builder Control MCP server - design token-driven page builder tools for WordPress/Elementor websites",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|