@noleemits/vision-builder-control-mcp 4.42.0 → 4.42.3
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 +32 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -108,7 +108,7 @@ process.on('SIGINT', () => {
|
|
|
108
108
|
// CONFIG
|
|
109
109
|
// ================================================================
|
|
110
110
|
|
|
111
|
-
const VERSION = '4.42.
|
|
111
|
+
const VERSION = '4.42.3';
|
|
112
112
|
const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
|
|
113
113
|
|
|
114
114
|
// ================================================================
|
|
@@ -2173,6 +2173,18 @@ function getToolDefinitions() {
|
|
|
2173
2173
|
required: ['page_id']
|
|
2174
2174
|
}
|
|
2175
2175
|
},
|
|
2176
|
+
{
|
|
2177
|
+
name: 'fix_atomic_validation',
|
|
2178
|
+
description: 'Fix Elementor V4 atomic widget validation issues introduced when widgets were created via raw add_element calls. Walks _elementor_data and patches: (1) empty styles[*].label fields → defaults to the style id (Elementor requires 2-50 char labels matching a CSS-class regex); (2) invalid tag values on e-heading widgets (e.g. "div", "span") → defaults to "h2" (e-heading enum: h1-h6 only); (3) invalid tag values on e-paragraph widgets → defaults to "p" (e-paragraph enum: p, span only). Returns counts of what was fixed. Use this when the editor throws "class_name_too_short" or "tag: invalid_value" errors after MCP-built atomic content. Idempotent — safe to call multiple times.',
|
|
2179
|
+
inputSchema: {
|
|
2180
|
+
type: 'object',
|
|
2181
|
+
properties: {
|
|
2182
|
+
page_id: { type: 'number', description: 'WordPress page ID' },
|
|
2183
|
+
force: { type: 'boolean', description: 'Override edit locks (default: false)' }
|
|
2184
|
+
},
|
|
2185
|
+
required: ['page_id']
|
|
2186
|
+
}
|
|
2187
|
+
},
|
|
2176
2188
|
{
|
|
2177
2189
|
name: 'audit_links',
|
|
2178
2190
|
description: 'Scan all Elementor pages and audit link targets. Reports internal links that open in new tab and external links that open in same tab. Use include_templates to also scan library templates (menus, headers, footers).',
|
|
@@ -4118,6 +4130,25 @@ async function handleToolCall(name, args) {
|
|
|
4118
4130
|
}
|
|
4119
4131
|
}
|
|
4120
4132
|
|
|
4133
|
+
case 'fix_atomic_validation': {
|
|
4134
|
+
try {
|
|
4135
|
+
const r = await apiCall(`/pages/${args.page_id}/fix-atomic-validation`, 'POST', {
|
|
4136
|
+
force: parseBool(args.force),
|
|
4137
|
+
});
|
|
4138
|
+
if (r.code || r.error) return ok(`Failed: ${r.message || r.error || 'Unknown error'}`);
|
|
4139
|
+
const s = r.stats || {};
|
|
4140
|
+
return ok(
|
|
4141
|
+
`Fixed atomic widgets on page ${r.page_id}:\n` +
|
|
4142
|
+
` Visited: ${s.widgets_visited || 0} atomic widgets\n` +
|
|
4143
|
+
` Labels fixed: ${s.labels_fixed || 0}\n` +
|
|
4144
|
+
` Heading tags fixed: ${s.heading_tags_fixed || 0}\n` +
|
|
4145
|
+
` Paragraph tags fixed: ${s.paragraph_tags_fixed || 0}`
|
|
4146
|
+
);
|
|
4147
|
+
} catch (err) {
|
|
4148
|
+
return ok(`Failed: ${err.message}`);
|
|
4149
|
+
}
|
|
4150
|
+
}
|
|
4151
|
+
|
|
4121
4152
|
case 'audit_links': {
|
|
4122
4153
|
const params = new URLSearchParams();
|
|
4123
4154
|
if (args.page_id) params.set('page_id', args.page_id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noleemits/vision-builder-control-mcp",
|
|
3
|
-
"version": "4.42.
|
|
3
|
+
"version": "4.42.3",
|
|
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",
|