@noleemits/vision-builder-control-mcp 4.34.0 → 4.35.1
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 +153 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Noleemits Vision Builder Control MCP Server
|
|
4
4
|
*
|
|
5
5
|
* Provides 67 tools for building and managing WordPress/Elementor sites.
|
|
6
|
+
* v4.35.0: PixelVault image integration — pixelvault_status, find_images, generate_image, get_batch_status, insert_image tools; proxy REST endpoints at /nvbc/v1/pixelvault/*.
|
|
6
7
|
* 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.
|
|
7
8
|
* v4.33.0: Elementor kit layout settings (get_kit_settings, set_kit_settings) — read/write container_width, viewports, gutter.
|
|
8
9
|
* v4.15.0: Injection engine v2 — icon-list injection, unfilled slot clearing.
|
|
@@ -106,7 +107,7 @@ process.on('SIGINT', () => {
|
|
|
106
107
|
// CONFIG
|
|
107
108
|
// ================================================================
|
|
108
109
|
|
|
109
|
-
const VERSION = '4.
|
|
110
|
+
const VERSION = '4.35.1';
|
|
110
111
|
const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
|
|
111
112
|
|
|
112
113
|
// ================================================================
|
|
@@ -3087,6 +3088,67 @@ function getToolDefinitions() {
|
|
|
3087
3088
|
required: ['css']
|
|
3088
3089
|
}
|
|
3089
3090
|
},
|
|
3091
|
+
// ── PixelVault image generation (v4.35.0) ──
|
|
3092
|
+
{
|
|
3093
|
+
name: 'pixelvault_status',
|
|
3094
|
+
description: 'Check whether the PixelVault plugin is installed, connected (API key configured), and the backend is reachable. Call this before any other PixelVault tool to confirm readiness.',
|
|
3095
|
+
inputSchema: { type: 'object', properties: {} }
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
name: 'find_images',
|
|
3099
|
+
description: 'Search the PixelVault AI image library for images matching a query. Returns image results with IDs, URLs, descriptions, and thumbnails. Use the `id` field from results to call insert_image. **Workflow:** 1) Call find_images. 2) Read the `description` of each result to judge relevance. 3) If a clearly relevant match exists, call insert_image with its id. 4) If no relevant match, call generate_image instead.',
|
|
3100
|
+
inputSchema: {
|
|
3101
|
+
type: 'object',
|
|
3102
|
+
properties: {
|
|
3103
|
+
query: { type: 'string', description: 'Text search query describing what the image should show.' },
|
|
3104
|
+
industry: { type: 'string', description: 'Industry filter (e.g. "legal", "healthcare", "construction").' },
|
|
3105
|
+
style: { type: 'string', description: 'Style filter (e.g. "photo", "illustration").' },
|
|
3106
|
+
tags: { type: 'string', description: 'Comma-separated tag names to filter by.' },
|
|
3107
|
+
tag_mode: { type: 'string', enum: ['and', 'or'], description: 'Match all tags ("and") or any tag ("or", default).' },
|
|
3108
|
+
batch_id: { type: 'number', description: 'Filter to images from a specific generation batch (returned by generate_image).' },
|
|
3109
|
+
per_page: { type: 'number', description: 'Results per page (default 10, max 50).' },
|
|
3110
|
+
page: { type: 'number', description: 'Page number for pagination (default 1).' }
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
name: 'generate_image',
|
|
3116
|
+
description: 'Generate a new AI image from a text prompt using PixelVault. Generation is asynchronous — returns a batch_id immediately. Poll with get_batch_status until status is "ready", then call insert_image with the returned image id.',
|
|
3117
|
+
inputSchema: {
|
|
3118
|
+
type: 'object',
|
|
3119
|
+
properties: {
|
|
3120
|
+
prompt: { type: 'string', description: 'Detailed description of the image to generate. Be specific about subject, setting, mood, and style.' },
|
|
3121
|
+
post_id: { type: 'number', description: 'Optional WP post ID to associate with this generation.' },
|
|
3122
|
+
ratio: { type: 'string', enum: ['16:9', '1:1', '4:3', '9:16'], description: 'Aspect ratio (default: "16:9").' },
|
|
3123
|
+
quality: { type: 'string', enum: ['sd', 'hq'], description: 'Quality level: "sd" standard (default), "hq" high quality (uses more credits).' }
|
|
3124
|
+
},
|
|
3125
|
+
required: ['prompt']
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
name: 'get_batch_status',
|
|
3130
|
+
description: 'Poll the status of an image generation batch started by generate_image. When status is "ready" the response includes image ids and URLs — pass an id to insert_image to add it to the WP media library.',
|
|
3131
|
+
inputSchema: {
|
|
3132
|
+
type: 'object',
|
|
3133
|
+
properties: {
|
|
3134
|
+
batch_id: { type: 'number', description: 'The batch_id returned by generate_image.' }
|
|
3135
|
+
},
|
|
3136
|
+
required: ['batch_id']
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
name: 'insert_image',
|
|
3141
|
+
description: 'Sideload a PixelVault library image into the WordPress media library and return its attachment URL for use in Elementor widgets. Use image IDs from find_images or get_batch_status results.',
|
|
3142
|
+
inputSchema: {
|
|
3143
|
+
type: 'object',
|
|
3144
|
+
properties: {
|
|
3145
|
+
image_id: { type: 'string', description: 'PixelVault image ID (UUID from find_images or get_batch_status).' },
|
|
3146
|
+
post_id: { type: 'number', description: 'Optional WP post ID to attach the image to.' },
|
|
3147
|
+
as_featured: { type: 'boolean', description: 'Set as the post\'s featured image (default: false).' }
|
|
3148
|
+
},
|
|
3149
|
+
required: ['image_id']
|
|
3150
|
+
}
|
|
3151
|
+
},
|
|
3090
3152
|
{
|
|
3091
3153
|
name: 'audit_broken_images',
|
|
3092
3154
|
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.',
|
|
@@ -5282,6 +5344,96 @@ async function handleToolCall(name, args) {
|
|
|
5282
5344
|
return ok(out);
|
|
5283
5345
|
}
|
|
5284
5346
|
|
|
5347
|
+
// ── PixelVault image generation ──
|
|
5348
|
+
|
|
5349
|
+
case 'pixelvault_status': {
|
|
5350
|
+
const r = await apiCall('/pixelvault/status');
|
|
5351
|
+
let out = `=== PIXELVAULT STATUS ===\n`;
|
|
5352
|
+
out += `Available: ${r.available ? '✓ yes' : '✗ no'}\n`;
|
|
5353
|
+
out += `Connected: ${r.connected ? '✓ yes' : '✗ no'}\n`;
|
|
5354
|
+
out += `Backend OK: ${r.backend_ok ? '✓ yes' : '✗ no'}\n`;
|
|
5355
|
+
out += `\n${r.message}`;
|
|
5356
|
+
return ok(out);
|
|
5357
|
+
}
|
|
5358
|
+
|
|
5359
|
+
case 'find_images': {
|
|
5360
|
+
const params = new URLSearchParams();
|
|
5361
|
+
if (args.query) params.set('search', args.query);
|
|
5362
|
+
if (args.industry) params.set('industry', args.industry);
|
|
5363
|
+
if (args.style) params.set('style', args.style);
|
|
5364
|
+
if (args.tags) params.set('tags', args.tags);
|
|
5365
|
+
if (args.tag_mode) params.set('tag_mode', args.tag_mode);
|
|
5366
|
+
if (args.batch_id) params.set('batch_id', args.batch_id);
|
|
5367
|
+
if (args.per_page) params.set('per_page', args.per_page);
|
|
5368
|
+
if (args.page) params.set('page', args.page);
|
|
5369
|
+
const r = await apiCall(`/pixelvault/images?${params}`);
|
|
5370
|
+
if (r.error || r.code) return ok(`PixelVault error: ${r.message || r.error}`);
|
|
5371
|
+
let out = `=== PIXELVAULT IMAGES (${r.query_matched || 0} matched, ${r.library_size || 0} total) ===\n`;
|
|
5372
|
+
if (!r.results || r.results.length === 0) {
|
|
5373
|
+
out += `\nNo results. ${r.hint || ''}\n`;
|
|
5374
|
+
} else {
|
|
5375
|
+
r.results.forEach((img, i) => {
|
|
5376
|
+
out += `\n[${i + 1}] ${img.id || img.image_id}\n`;
|
|
5377
|
+
out += ` URL: ${img.url || img.thumbnail_url || img.cdn_url || '(no url)'}\n`;
|
|
5378
|
+
if (img.description) out += ` Description: ${img.description}\n`;
|
|
5379
|
+
if (img.industry) out += ` Industry: ${img.industry}\n`;
|
|
5380
|
+
if (img.style) out += ` Style: ${img.style}\n`;
|
|
5381
|
+
if (img.ratio) out += ` Ratio: ${img.ratio}\n`;
|
|
5382
|
+
});
|
|
5383
|
+
}
|
|
5384
|
+
return ok(out);
|
|
5385
|
+
}
|
|
5386
|
+
|
|
5387
|
+
case 'generate_image': {
|
|
5388
|
+
if (!args.prompt) return ok('Error: prompt is required.');
|
|
5389
|
+
const body = { prompt: args.prompt };
|
|
5390
|
+
if (args.post_id) body.post_id = args.post_id;
|
|
5391
|
+
if (args.ratio) body.ratio = args.ratio;
|
|
5392
|
+
if (args.quality) body.quality = args.quality;
|
|
5393
|
+
const r = await apiCall('/pixelvault/generate', 'POST', body);
|
|
5394
|
+
if (r.error || r.code) return ok(`Generation failed: ${r.detail || r.message || r.error} [${r.category || ''}]`);
|
|
5395
|
+
let out = `=== IMAGE GENERATION STARTED ===\n`;
|
|
5396
|
+
out += `Batch ID: ${r.batch_id}\n`;
|
|
5397
|
+
out += `Status: ${r.status || 'generating'}\n`;
|
|
5398
|
+
out += `\n${r.message || 'Poll with get_batch_status(batch_id) until status is "ready", then insert_image.'}\n`;
|
|
5399
|
+
return ok(out);
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5402
|
+
case 'get_batch_status': {
|
|
5403
|
+
if (!args.batch_id) return ok('Error: batch_id is required.');
|
|
5404
|
+
const r = await apiCall(`/pixelvault/batch/${args.batch_id}`);
|
|
5405
|
+
if (r.error || r.code) return ok(`Batch error: ${r.message || r.error}`);
|
|
5406
|
+
let out = `=== BATCH ${args.batch_id} — ${(r.status || 'unknown').toUpperCase()} ===\n`;
|
|
5407
|
+
if (r.status === 'ready' && r.images && r.images.length) {
|
|
5408
|
+
out += `\nImages ready (${r.images.length}):\n`;
|
|
5409
|
+
r.images.forEach((img, i) => {
|
|
5410
|
+
out += ` [${i + 1}] id: ${img.id || img.image_id} url: ${img.url || img.cdn_url || ''}\n`;
|
|
5411
|
+
if (img.description) out += ` ${img.description}\n`;
|
|
5412
|
+
});
|
|
5413
|
+
out += `\nCall insert_image with one of the ids above to add it to the media library.\n`;
|
|
5414
|
+
} else if (r.status === 'generating') {
|
|
5415
|
+
out += `\nStill generating. Poll again in a few seconds.\n`;
|
|
5416
|
+
} else if (r.status === 'failed') {
|
|
5417
|
+
out += `\nGeneration failed: ${r.error || r.message || '(no detail)'}\n`;
|
|
5418
|
+
}
|
|
5419
|
+
return ok(out);
|
|
5420
|
+
}
|
|
5421
|
+
|
|
5422
|
+
case 'insert_image': {
|
|
5423
|
+
if (!args.image_id) return ok('Error: image_id is required.');
|
|
5424
|
+
const body = { image_id: args.image_id };
|
|
5425
|
+
if (args.post_id) body.post_id = args.post_id;
|
|
5426
|
+
if (args.as_featured) body.as_featured = args.as_featured;
|
|
5427
|
+
const r = await apiCall('/pixelvault/insert', 'POST', body);
|
|
5428
|
+
if (r.error || r.code) return ok(`Insert failed: ${r.message || r.error}`);
|
|
5429
|
+
let out = `${r.was_existing ? 'Existing' : 'Inserted'} attachment #${r.attachment_id}\n`;
|
|
5430
|
+
out += ` URL: ${r.url}\n`;
|
|
5431
|
+
if (r.filename) out += ` File: ${r.filename}\n`;
|
|
5432
|
+
if (r.description) out += ` Description: ${r.description}\n`;
|
|
5433
|
+
if (r.industry) out += ` Industry: ${r.industry}\n`;
|
|
5434
|
+
return ok(out);
|
|
5435
|
+
}
|
|
5436
|
+
|
|
5285
5437
|
case 'audit_broken_images': {
|
|
5286
5438
|
const params = new URLSearchParams();
|
|
5287
5439
|
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.35.1",
|
|
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",
|