@noleemits/vision-builder-control-mcp 4.37.0 → 4.39.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 +149 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -107,7 +107,7 @@ process.on('SIGINT', () => {
|
|
|
107
107
|
// CONFIG
|
|
108
108
|
// ================================================================
|
|
109
109
|
|
|
110
|
-
const VERSION = '4.
|
|
110
|
+
const VERSION = '4.39.0';
|
|
111
111
|
const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
|
|
112
112
|
|
|
113
113
|
// ================================================================
|
|
@@ -2151,7 +2151,7 @@ function getToolDefinitions() {
|
|
|
2151
2151
|
},
|
|
2152
2152
|
{
|
|
2153
2153
|
name: 'update_element',
|
|
2154
|
-
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.',
|
|
2154
|
+
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
2155
|
inputSchema: {
|
|
2156
2156
|
type: 'object',
|
|
2157
2157
|
properties: {
|
|
@@ -2309,11 +2309,12 @@ function getToolDefinitions() {
|
|
|
2309
2309
|
},
|
|
2310
2310
|
{
|
|
2311
2311
|
name: 'get_post',
|
|
2312
|
-
description: 'Get a single WordPress post/page with ALL details: content, excerpt, Elementor status, RankMath SEO data (title, description, keywords, score), taxonomies (categories, tags), and featured image.',
|
|
2312
|
+
description: 'Get a single WordPress post/page with ALL details: content, excerpt, Elementor status, RankMath SEO data (title, description, keywords, score), taxonomies (categories, tags), and featured image. Pass full_content=true to return the complete raw post_content (default: 500-char preview).',
|
|
2313
2313
|
inputSchema: {
|
|
2314
2314
|
type: 'object',
|
|
2315
2315
|
properties: {
|
|
2316
|
-
post_id: { type: 'number', description: 'WordPress post/page ID' }
|
|
2316
|
+
post_id: { type: 'number', description: 'WordPress post/page ID' },
|
|
2317
|
+
full_content: { type: 'boolean', description: 'If true, return the complete raw post_content instead of a 500-char preview. Default: false.' }
|
|
2317
2318
|
},
|
|
2318
2319
|
required: ['post_id']
|
|
2319
2320
|
}
|
|
@@ -2421,6 +2422,62 @@ function getToolDefinitions() {
|
|
|
2421
2422
|
}
|
|
2422
2423
|
}
|
|
2423
2424
|
},
|
|
2425
|
+
{
|
|
2426
|
+
name: 'get_rankmath_global',
|
|
2427
|
+
description: 'Read RankMath sitewide settings: Knowledge Graph / Organization (name, type, logo, phone, email, address), social profiles (Facebook URL, Twitter handle, additional profile URLs), and default Open Graph image. Use to audit before bulk-updating sitewide schema/social data.',
|
|
2428
|
+
inputSchema: {
|
|
2429
|
+
type: 'object',
|
|
2430
|
+
properties: {}
|
|
2431
|
+
}
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
name: 'update_rankmath_global',
|
|
2435
|
+
description: 'Update RankMath sitewide settings (Knowledge Graph / Organization, social profiles, defaults). Send a partial structured object — only provided keys are written. Use to push organization name/logo/phone/address, social URLs, and default OG image into RankMath schema in one call.',
|
|
2436
|
+
inputSchema: {
|
|
2437
|
+
type: 'object',
|
|
2438
|
+
properties: {
|
|
2439
|
+
organization: {
|
|
2440
|
+
type: 'object',
|
|
2441
|
+
description: 'Knowledge Graph / Organization fields',
|
|
2442
|
+
properties: {
|
|
2443
|
+
type: { type: 'string', description: '"company" or "person"' },
|
|
2444
|
+
name: { type: 'string' },
|
|
2445
|
+
logo: { type: 'string', description: 'Logo URL (use a media library URL)' },
|
|
2446
|
+
phone: { type: 'string' },
|
|
2447
|
+
email: { type: 'string' },
|
|
2448
|
+
address: {
|
|
2449
|
+
type: 'object',
|
|
2450
|
+
properties: {
|
|
2451
|
+
street: { type: 'string' },
|
|
2452
|
+
city: { type: 'string' },
|
|
2453
|
+
state: { type: 'string' },
|
|
2454
|
+
zip: { type: 'string' },
|
|
2455
|
+
country: { type: 'string' }
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
},
|
|
2460
|
+
social: {
|
|
2461
|
+
type: 'object',
|
|
2462
|
+
description: 'Social profile URLs',
|
|
2463
|
+
properties: {
|
|
2464
|
+
facebook: { type: 'string', description: 'Facebook page URL' },
|
|
2465
|
+
twitter: { type: 'string', description: 'Twitter handle (e.g. "@firmname")' },
|
|
2466
|
+
additional_profiles: { type: 'array', items: { type: 'string' }, description: 'Additional profile URLs (LinkedIn, Instagram, YouTube, etc.) — one URL per array entry' }
|
|
2467
|
+
}
|
|
2468
|
+
},
|
|
2469
|
+
defaults: {
|
|
2470
|
+
type: 'object',
|
|
2471
|
+
description: 'Sitewide defaults',
|
|
2472
|
+
properties: {
|
|
2473
|
+
open_graph_image: { type: 'string', description: 'Default OG image URL' },
|
|
2474
|
+
open_graph_image_id: { type: 'number', description: 'Default OG image attachment ID' }
|
|
2475
|
+
}
|
|
2476
|
+
},
|
|
2477
|
+
local_business_type: { type: 'string', description: 'schema.org Local Business type (e.g. "LegalService")' }
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
},
|
|
2424
2481
|
{
|
|
2425
2482
|
name: 'audit_faq_schema',
|
|
2426
2483
|
description: 'Audit all published posts/pages for FAQ schema issues: duplicate FAQPage markup (NVBC meta + RankMath block), orphaned NVBC schemas, unconverted plain FAQs, invalid JSON, empty Q&As, and encoding issues (bare u003c).',
|
|
@@ -3248,6 +3305,21 @@ function getToolDefinitions() {
|
|
|
3248
3305
|
required: ['source_id', 'section_index', 'target_id']
|
|
3249
3306
|
}
|
|
3250
3307
|
},
|
|
3308
|
+
{
|
|
3309
|
+
name: 'clone_template',
|
|
3310
|
+
description: 'Clone an entire Theme Builder template (single, archive, loop-item, header, footer, popup) in one call. Auto-handles the elementor_library_type taxonomy, _elementor_template_type meta, edit-mode meta, and (optionally) display conditions. Saves 4-5 calls (create_post + copy_section × N + display_conditions) into one. Use this instead of stitching those calls together when you need a brand-new Theme Builder template based on an existing design.',
|
|
3311
|
+
inputSchema: {
|
|
3312
|
+
type: 'object',
|
|
3313
|
+
properties: {
|
|
3314
|
+
source_template_id: { type: 'number', description: 'Existing template ID to clone (must be a post of type elementor_library)' },
|
|
3315
|
+
title: { type: 'string', description: 'Title for the new template (e.g. "WAL Single Location")' },
|
|
3316
|
+
slug: { type: 'string', description: 'Optional URL slug. Auto-derived from title if omitted.' },
|
|
3317
|
+
conditions: { type: 'array', items: { type: 'string' }, description: 'Display conditions to set on the new template, e.g. ["include/singular/location"] or ["include/archive/location_archive"]. Omit to leave unset.' },
|
|
3318
|
+
status: { type: 'string', enum: ['publish', 'draft', 'private', 'pending'], description: 'Post status (default: publish)' }
|
|
3319
|
+
},
|
|
3320
|
+
required: ['source_template_id', 'title']
|
|
3321
|
+
}
|
|
3322
|
+
},
|
|
3251
3323
|
{
|
|
3252
3324
|
name: 'append_section',
|
|
3253
3325
|
description: 'Append a section to an existing page or template without downloading the full template. Pass the section JSON directly — no need to export, merge, and re-upload. Useful for adding CTA sections, footers, or any reusable block.',
|
|
@@ -4313,8 +4385,8 @@ async function handleToolCall(name, args) {
|
|
|
4313
4385
|
}
|
|
4314
4386
|
}
|
|
4315
4387
|
if (r.content) {
|
|
4316
|
-
const
|
|
4317
|
-
out += `\n--- CONTENT (${r.content_length} chars) ---\n${
|
|
4388
|
+
const body = args.full_content ? r.content : (r.content.length > 500 ? r.content.slice(0, 500) + '...' : r.content);
|
|
4389
|
+
out += `\n--- CONTENT (${r.content_length} chars) ---\n${body}\n`;
|
|
4318
4390
|
}
|
|
4319
4391
|
return ok(out);
|
|
4320
4392
|
}
|
|
@@ -4375,6 +4447,52 @@ async function handleToolCall(name, args) {
|
|
|
4375
4447
|
return ok(out);
|
|
4376
4448
|
}
|
|
4377
4449
|
|
|
4450
|
+
case 'get_rankmath_global': {
|
|
4451
|
+
const r = await apiCall('/seo/global');
|
|
4452
|
+
if (!r.success) return ok(`Failed: ${r.message || 'Unknown error'}`);
|
|
4453
|
+
let out = `=== RANKMATH GLOBAL SETTINGS ===\n`;
|
|
4454
|
+
out += `\n--- Organization ---\n`;
|
|
4455
|
+
out += ` Type: ${r.organization.type || '(unset)'}\n`;
|
|
4456
|
+
out += ` Name: ${r.organization.name || '(unset)'}\n`;
|
|
4457
|
+
out += ` Logo: ${r.organization.logo || '(unset)'}\n`;
|
|
4458
|
+
out += ` Phone: ${r.organization.phone || '(unset)'}\n`;
|
|
4459
|
+
out += ` Email: ${r.organization.email || '(unset)'}\n`;
|
|
4460
|
+
const a = r.organization.address || {};
|
|
4461
|
+
if (a.street || a.city) {
|
|
4462
|
+
out += ` Address: ${a.street || ''}${a.street && a.city ? ', ' : ''}${a.city || ''}${a.state ? ', ' + a.state : ''} ${a.zip || ''}${a.country ? ' ' + a.country : ''}\n`;
|
|
4463
|
+
} else {
|
|
4464
|
+
out += ` Address: (unset)\n`;
|
|
4465
|
+
}
|
|
4466
|
+
out += `\n--- Social ---\n`;
|
|
4467
|
+
out += ` Facebook: ${r.social.facebook || '(unset)'}\n`;
|
|
4468
|
+
out += ` Twitter: ${r.social.twitter || '(unset)'}\n`;
|
|
4469
|
+
if (r.social.additional_profiles && r.social.additional_profiles.length) {
|
|
4470
|
+
out += ` Additional profiles:\n`;
|
|
4471
|
+
r.social.additional_profiles.forEach(u => out += ` - ${u}\n`);
|
|
4472
|
+
} else {
|
|
4473
|
+
out += ` Additional profiles: (none)\n`;
|
|
4474
|
+
}
|
|
4475
|
+
out += `\n--- Defaults ---\n`;
|
|
4476
|
+
out += ` OG image: ${r.defaults.open_graph_image || '(unset)'}\n`;
|
|
4477
|
+
if (r.defaults.open_graph_image_id) out += ` OG image ID: ${r.defaults.open_graph_image_id}\n`;
|
|
4478
|
+
if (r.local_business_type) out += `\nLocal business type: ${r.local_business_type}\n`;
|
|
4479
|
+
return ok(out);
|
|
4480
|
+
}
|
|
4481
|
+
|
|
4482
|
+
case 'update_rankmath_global': {
|
|
4483
|
+
const r = await apiCall('/seo/global', 'POST', args);
|
|
4484
|
+
if (!r.success) return ok(`Failed: ${r.message || 'Unknown error'}`);
|
|
4485
|
+
let out = `RankMath sitewide settings updated!\n`;
|
|
4486
|
+
out += `Updated: ${(r.updated_fields || []).join(', ') || '(none)'}\n`;
|
|
4487
|
+
if (r.current && r.current.organization) {
|
|
4488
|
+
out += `\n--- New state ---\n`;
|
|
4489
|
+
out += ` Org: ${r.current.organization.name || '(unset)'} (${r.current.organization.type || 'unset'})\n`;
|
|
4490
|
+
out += ` Phone: ${r.current.organization.phone || '(unset)'}\n`;
|
|
4491
|
+
out += ` Facebook: ${r.current.social.facebook || '(unset)'}\n`;
|
|
4492
|
+
}
|
|
4493
|
+
return ok(out);
|
|
4494
|
+
}
|
|
4495
|
+
|
|
4378
4496
|
case 'audit_seo': {
|
|
4379
4497
|
const params = new URLSearchParams();
|
|
4380
4498
|
if (args.post_type) params.set('post_type', args.post_type);
|
|
@@ -5619,6 +5737,31 @@ async function handleToolCall(name, args) {
|
|
|
5619
5737
|
return ok(msg);
|
|
5620
5738
|
}
|
|
5621
5739
|
|
|
5740
|
+
case 'clone_template': {
|
|
5741
|
+
const sourceId = args.source_template_id;
|
|
5742
|
+
if (!sourceId || !args.title) {
|
|
5743
|
+
return ok('Failed: source_template_id and title are required.');
|
|
5744
|
+
}
|
|
5745
|
+
const body = { title: args.title };
|
|
5746
|
+
if (args.slug) body.slug = args.slug;
|
|
5747
|
+
if (Array.isArray(args.conditions)) body.conditions = args.conditions;
|
|
5748
|
+
if (args.status) body.status = args.status;
|
|
5749
|
+
const r = await apiCall(`/templates/${sourceId}/clone`, 'POST', body);
|
|
5750
|
+
if (r.code || r.error) return ok(`Failed: ${r.message || r.error || 'Unknown error'}`);
|
|
5751
|
+
let msg = `Template cloned!\n`;
|
|
5752
|
+
msg += `Source: ID ${r.source_id}\n`;
|
|
5753
|
+
msg += `New template: ID ${r.new_id} ("${r.title}")\n`;
|
|
5754
|
+
msg += `Type: ${r.template_type || '(none — taxonomy missing on source)'}\n`;
|
|
5755
|
+
msg += `Sections copied: ${r.sections_copied} | Elements: ${r.elements_copied}\n`;
|
|
5756
|
+
if (r.conditions && r.conditions.length) {
|
|
5757
|
+
msg += `Conditions: ${r.conditions.join(', ')}\n`;
|
|
5758
|
+
} else {
|
|
5759
|
+
msg += `Conditions: (none — set via display_conditions if needed)\n`;
|
|
5760
|
+
}
|
|
5761
|
+
msg += `Edit URL: ${r.edit_url}`;
|
|
5762
|
+
return ok(msg);
|
|
5763
|
+
}
|
|
5764
|
+
|
|
5622
5765
|
case 'append_section': {
|
|
5623
5766
|
// Enforce root settings on appended sections
|
|
5624
5767
|
if (args.section) addBoilerplate(args.section);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noleemits/vision-builder-control-mcp",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.39.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",
|