@noleemits/vision-builder-control-mcp 4.33.0 → 4.34.0
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 +54 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Noleemits Vision Builder Control MCP Server
|
|
4
4
|
*
|
|
5
|
-
* Provides
|
|
5
|
+
* Provides 67 tools for building and managing WordPress/Elementor sites.
|
|
6
|
+
* v4.34.0: Design tokens auto-inject as CSS custom properties (--nvbc-color-*, --nvbc-fs-*, --nvbc-space-*) site-wide via wp_head; kit global CSS tools (get_kit_global_css, set_kit_global_css); get_kit_settings formatter handles gap-style objects.
|
|
6
7
|
* v4.33.0: Elementor kit layout settings (get_kit_settings, set_kit_settings) — read/write container_width, viewports, gutter.
|
|
7
8
|
* v4.15.0: Injection engine v2 — icon-list injection, unfilled slot clearing.
|
|
8
9
|
* v4.14.0: Pipeline quality fixes — smart counter parsing, post-processing, quality scores in browse, injection completeness.
|
|
@@ -105,7 +106,7 @@ process.on('SIGINT', () => {
|
|
|
105
106
|
// CONFIG
|
|
106
107
|
// ================================================================
|
|
107
108
|
|
|
108
|
-
const VERSION = '4.
|
|
109
|
+
const VERSION = '4.34.0';
|
|
109
110
|
const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
|
|
110
111
|
|
|
111
112
|
// ================================================================
|
|
@@ -3068,6 +3069,24 @@ function getToolDefinitions() {
|
|
|
3068
3069
|
required: ['settings']
|
|
3069
3070
|
}
|
|
3070
3071
|
},
|
|
3072
|
+
{
|
|
3073
|
+
name: 'get_kit_global_css',
|
|
3074
|
+
description: 'Read the active kit\'s custom_css (Elementor "Custom CSS" field). This CSS is output site-wide via Elementor\'s own stylesheet pipeline. Use to inspect site-wide CSS variables, base styles, etc.',
|
|
3075
|
+
inputSchema: { type: 'object', properties: {} }
|
|
3076
|
+
},
|
|
3077
|
+
{
|
|
3078
|
+
name: 'set_kit_global_css',
|
|
3079
|
+
description: 'Write to the active kit\'s custom_css. Modes: "replace" (default — overwrites), "append" (adds to end), "prepend" (adds to start). Output goes through Elementor\'s stylesheet pipeline (no HTML widget needed). Always dry_run=true first.',
|
|
3080
|
+
inputSchema: {
|
|
3081
|
+
type: 'object',
|
|
3082
|
+
properties: {
|
|
3083
|
+
css: { type: 'string', description: 'CSS text. Will be wrapped in <style> by Elementor — do not include style tags.' },
|
|
3084
|
+
mode: { type: 'string', enum: ['replace', 'append', 'prepend'], description: 'How to combine with existing CSS (default: replace).' },
|
|
3085
|
+
dry_run: { type: 'boolean', description: 'Preview without saving (default: true).' }
|
|
3086
|
+
},
|
|
3087
|
+
required: ['css']
|
|
3088
|
+
}
|
|
3089
|
+
},
|
|
3071
3090
|
{
|
|
3072
3091
|
name: 'audit_broken_images',
|
|
3073
3092
|
description: 'Scan all published posts and Elementor pages for broken images (non-200 HTTP responses). Checks <img> tags in post_content and image/image-box widgets + background images in Elementor data. Returns broken URLs with HTTP status, error details, and which posts are affected.',
|
|
@@ -5201,9 +5220,18 @@ async function handleToolCall(name, args) {
|
|
|
5201
5220
|
if (r.code || r.error) return ok(`Failed: ${r.message || r.error}`);
|
|
5202
5221
|
let out = `=== ELEMENTOR KIT SETTINGS ===\nKit ID: ${r.kit_id}\n\n`;
|
|
5203
5222
|
for (const [k, v] of Object.entries(r.settings || {})) {
|
|
5204
|
-
if (v === null) { out += ` ${k}: (unset)\n`; continue; }
|
|
5205
|
-
if (typeof v === 'object'
|
|
5206
|
-
|
|
5223
|
+
if (v === null || v === '') { out += ` ${k}: (unset)\n`; continue; }
|
|
5224
|
+
if (typeof v === 'object') {
|
|
5225
|
+
const unit = v.unit || 'px';
|
|
5226
|
+
if ('size' in v && v.size !== '' && v.size !== null) {
|
|
5227
|
+
out += ` ${k}: ${v.size}${unit}\n`;
|
|
5228
|
+
} else if ('column' in v || 'row' in v) {
|
|
5229
|
+
const col = v.column ?? '';
|
|
5230
|
+
const row = v.row ?? '';
|
|
5231
|
+
out += ` ${k}: column=${col}${unit}, row=${row}${unit}\n`;
|
|
5232
|
+
} else {
|
|
5233
|
+
out += ` ${k}: ${JSON.stringify(v)}\n`;
|
|
5234
|
+
}
|
|
5207
5235
|
} else {
|
|
5208
5236
|
out += ` ${k}: ${v}\n`;
|
|
5209
5237
|
}
|
|
@@ -5233,6 +5261,27 @@ async function handleToolCall(name, args) {
|
|
|
5233
5261
|
return ok(out);
|
|
5234
5262
|
}
|
|
5235
5263
|
|
|
5264
|
+
case 'get_kit_global_css': {
|
|
5265
|
+
const r = await apiCall('/kit-global-css');
|
|
5266
|
+
if (r.code || r.error) return ok(`Failed: ${r.message || r.error}`);
|
|
5267
|
+
let out = `=== KIT GLOBAL CSS ===\nKit ID: ${r.kit_id}\nLength: ${r.length} bytes\n\n`;
|
|
5268
|
+
out += r.css || '(empty)';
|
|
5269
|
+
return ok(out);
|
|
5270
|
+
}
|
|
5271
|
+
|
|
5272
|
+
case 'set_kit_global_css': {
|
|
5273
|
+
const body = { css: args.css ?? '' };
|
|
5274
|
+
if (args.mode !== undefined) body.mode = args.mode;
|
|
5275
|
+
if (args.dry_run !== undefined) body.dry_run = args.dry_run;
|
|
5276
|
+
const r = await apiCall('/kit-global-css', 'POST', body);
|
|
5277
|
+
if (r.code || r.error) return ok(`Failed: ${r.message || r.error}`);
|
|
5278
|
+
let out = r.dry_run ? `=== SET KIT GLOBAL CSS (DRY RUN) ===\n` : `=== SET KIT GLOBAL CSS ===\n`;
|
|
5279
|
+
out += `Kit ID: ${r.kit_id}\n`;
|
|
5280
|
+
out += `Mode: ${r.mode}\n`;
|
|
5281
|
+
out += `${r.summary}\n\n${r.note}`;
|
|
5282
|
+
return ok(out);
|
|
5283
|
+
}
|
|
5284
|
+
|
|
5236
5285
|
case 'audit_broken_images': {
|
|
5237
5286
|
const params = new URLSearchParams();
|
|
5238
5287
|
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.
|
|
3
|
+
"version": "4.34.0",
|
|
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",
|