@noleemits/vision-builder-control-mcp 4.42.0 → 4.42.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.
Files changed (2) hide show
  1. package/index.js +33 -2
  2. 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.0';
111
+ const VERSION = '4.42.5';
112
112
  const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
113
113
 
114
114
  // ================================================================
@@ -2152,7 +2152,7 @@ function getToolDefinitions() {
2152
2152
  },
2153
2153
  {
2154
2154
  name: 'update_element',
2155
- description: 'Update any element\'s settings by its Elementor ID or path. Patch widget properties like hover_color, background_color, __globals__ overrides, text, link URLs, etc. Supports dot-notation for nested keys (e.g. "__globals__.hover_color"). Supports element_path as alternative to element_id (e.g. "sectionId/1/0" = section → child 1 → child 0). Use list_elements or export_page first to find the element ID and current settings. IMPORTANT: Prefer settings_json (JSON string) over settings (object) for reliable MCP transport. AUTO-INJECTED KEYS: background_background:"classic" auto-set when you set background_color; typography_typography:"custom" auto-set when you set font properties; flex_grow expands to all 3 required keys; grid column strings auto-wrapped in object format. ICON WIDGET: For view="default" use "icon_size" for dimensions. For view="stacked" or "framed" (circle/square background) use "size" instead — "icon_size" is silently ignored in stacked/framed mode. LOOP-GRID WIDGET: query settings use the prefix "post_query_" (post_query_post_type, post_query_orderby, post_query_order, post_query_posts_per_page) — NOT "posts_post_type". Setting "posts_post_type" is silently accepted but ignored. RACE CONDITION: when patching multiple elements on the SAME page in parallel, use batch_update_elements instead — parallel update_element calls can clobber each other.',
2155
+ description: 'Update any element\'s settings by its Elementor ID or path. Patch widget properties like hover_color, background_color, __globals__ overrides, text, link URLs, etc. Supports dot-notation for nested keys (e.g. "__globals__.hover_color"). Supports element_path as alternative to element_id (e.g. "sectionId/1/0" = section → child 1 → child 0). Use list_elements or export_page first to find the element ID and current settings. IMPORTANT: Prefer settings_json (JSON string) over settings (object) for reliable MCP transport. AUTO-INJECTED KEYS: background_background:"classic" auto-set when you set background_color; typography_typography:"custom" auto-set when you set font properties; flex_grow expands to all 3 required keys; grid column strings auto-wrapped in object format. ICON WIDGET: For view="default" use "icon_size" for dimensions. For view="stacked" or "framed" (circle/square background) use "size" instead — "icon_size" is silently ignored in stacked/framed mode. LOOP-GRID WIDGET: query settings use the prefix "post_query_" (post_query_post_type, post_query_orderby, post_query_order, post_query_posts_per_page) — NOT "posts_post_type". Setting "posts_post_type" is silently accepted but ignored. RACE CONDITION: when patching multiple elements on the SAME page in parallel, use batch_update_elements instead — parallel update_element calls can clobber each other. ATOMIC SCHEMA VALIDATION (v4.42.5+): writes that violate the Elementor V4 atomic schema are rejected up front (HTTP 400 invalid_atomic_setting) instead of silently corrupting the page. Currently enforced: e-heading.tag ∈ {h1..h6}, e-paragraph.tag ∈ {p, span}. If you need a non-heading visual element styled like an eyebrow, use e-paragraph (tag=p or span) — not e-heading with tag=div.',
2156
2156
  inputSchema: {
2157
2157
  type: 'object',
2158
2158
  properties: {
@@ -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.0",
3
+ "version": "4.42.5",
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",