@noleemits/vision-builder-control-mcp 4.15.2 → 4.16.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 +66 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -104,7 +104,7 @@ process.on('SIGINT', () => {
|
|
|
104
104
|
// CONFIG
|
|
105
105
|
// ================================================================
|
|
106
106
|
|
|
107
|
-
const VERSION = '4.
|
|
107
|
+
const VERSION = '4.16.1';
|
|
108
108
|
const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
|
|
109
109
|
|
|
110
110
|
// ================================================================
|
|
@@ -2168,7 +2168,8 @@ function getToolDefinitions() {
|
|
|
2168
2168
|
parent: { type: 'number', description: 'Parent post/page ID (for hierarchical types like pages). Changes URL structure.' },
|
|
2169
2169
|
taxonomies: { type: 'object', description: '{"category": [1,2]}' },
|
|
2170
2170
|
featured_image_id: { type: 'number', description: 'Attachment ID (omit to keep, pass null to remove)' },
|
|
2171
|
-
seo: { type: 'object', description: 'RankMath SEO fields to update' }
|
|
2171
|
+
seo: { type: 'object', description: 'RankMath SEO fields to update' },
|
|
2172
|
+
preserve_modified_date: { type: 'boolean', description: 'If true, keep the original last-modified date instead of updating it to now. Useful for content fixes that should not change the published "updated" date.' }
|
|
2172
2173
|
},
|
|
2173
2174
|
required: ['post_id']
|
|
2174
2175
|
}
|
|
@@ -2230,6 +2231,35 @@ function getToolDefinitions() {
|
|
|
2230
2231
|
}
|
|
2231
2232
|
}
|
|
2232
2233
|
},
|
|
2234
|
+
{
|
|
2235
|
+
name: 'update_term_seo',
|
|
2236
|
+
description: 'Update RankMath SEO fields on a taxonomy term (category, tag, custom taxonomy). Accepts any subset: title, description, focus_keyword, canonical_url, noindex (boolean convenience flag).',
|
|
2237
|
+
inputSchema: {
|
|
2238
|
+
type: 'object',
|
|
2239
|
+
properties: {
|
|
2240
|
+
term_id: { type: 'number', description: 'WordPress term ID' },
|
|
2241
|
+
taxonomy: { type: 'string', description: 'Taxonomy slug, e.g. "category", "post_tag", "testimonial-category"' },
|
|
2242
|
+
title: { type: 'string', description: 'SEO meta title' },
|
|
2243
|
+
description: { type: 'string', description: 'SEO meta description' },
|
|
2244
|
+
focus_keyword: { type: 'string', description: 'Primary focus keyword' },
|
|
2245
|
+
canonical_url: { type: 'string', description: 'Canonical URL' },
|
|
2246
|
+
noindex: { type: 'boolean', description: 'Set true to noindex this term archive' }
|
|
2247
|
+
},
|
|
2248
|
+
required: ['term_id']
|
|
2249
|
+
}
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
name: 'get_term_seo',
|
|
2253
|
+
description: 'Read current RankMath SEO fields for a taxonomy term.',
|
|
2254
|
+
inputSchema: {
|
|
2255
|
+
type: 'object',
|
|
2256
|
+
properties: {
|
|
2257
|
+
term_id: { type: 'number', description: 'WordPress term ID' },
|
|
2258
|
+
taxonomy: { type: 'string', description: 'Optional taxonomy slug for validation' }
|
|
2259
|
+
},
|
|
2260
|
+
required: ['term_id']
|
|
2261
|
+
}
|
|
2262
|
+
},
|
|
2233
2263
|
// ── Taxonomies ──
|
|
2234
2264
|
{
|
|
2235
2265
|
name: 'list_taxonomies',
|
|
@@ -3745,7 +3775,9 @@ async function handleToolCall(name, args) {
|
|
|
3745
3775
|
const { post_id, ...fields } = args;
|
|
3746
3776
|
const r = await apiCall(`/posts/${post_id}`, 'PUT', fields);
|
|
3747
3777
|
if (!r.success) return ok(`Failed: ${r.message || 'Unknown error'}`);
|
|
3748
|
-
|
|
3778
|
+
let out = `Post updated!\nID: ${r.id} | Status: ${r.status}\nTitle: ${r.title}\nUpdated: ${r.updated_fields.join(', ')}\nURL: ${r.url}`;
|
|
3779
|
+
if (r.modified_date_preserved) out += `\n📌 Modified date preserved: ${r.post_modified}`;
|
|
3780
|
+
return ok(out);
|
|
3749
3781
|
}
|
|
3750
3782
|
|
|
3751
3783
|
case 'delete_post': {
|
|
@@ -3810,6 +3842,37 @@ async function handleToolCall(name, args) {
|
|
|
3810
3842
|
return ok(out);
|
|
3811
3843
|
}
|
|
3812
3844
|
|
|
3845
|
+
case 'update_term_seo': {
|
|
3846
|
+
const { term_id, taxonomy, ...seoFields } = args;
|
|
3847
|
+
const body = { ...seoFields };
|
|
3848
|
+
if (taxonomy) body.taxonomy = taxonomy;
|
|
3849
|
+
const r = await apiCall(`/terms/${term_id}/seo`, 'POST', body);
|
|
3850
|
+
if (!r.success) return ok(`Failed: ${r.message || 'Unknown error'}`);
|
|
3851
|
+
let out = `SEO updated for term "${r.name}" (${r.taxonomy}, ID ${r.term_id})!\nFields changed: ${r.updated_fields.join(', ')}\n\n--- Current SEO ---\n`;
|
|
3852
|
+
if (r.seo) {
|
|
3853
|
+
for (const [k, v] of Object.entries(r.seo)) {
|
|
3854
|
+
out += ` ${k}: ${typeof v === 'object' ? JSON.stringify(v) : v}\n`;
|
|
3855
|
+
}
|
|
3856
|
+
}
|
|
3857
|
+
return ok(out);
|
|
3858
|
+
}
|
|
3859
|
+
|
|
3860
|
+
case 'get_term_seo': {
|
|
3861
|
+
const { term_id, taxonomy } = args;
|
|
3862
|
+
const qs = taxonomy ? `?taxonomy=${encodeURIComponent(taxonomy)}` : '';
|
|
3863
|
+
const r = await apiCall(`/terms/${term_id}/seo${qs}`);
|
|
3864
|
+
if (!r.success) return ok(`Failed: ${r.message || 'Unknown error'}`);
|
|
3865
|
+
let out = `SEO for term "${r.name}" (${r.taxonomy}, ID ${r.term_id}):\n`;
|
|
3866
|
+
if (r.seo) {
|
|
3867
|
+
for (const [k, v] of Object.entries(r.seo)) {
|
|
3868
|
+
out += ` ${k}: ${typeof v === 'object' ? JSON.stringify(v) : v}\n`;
|
|
3869
|
+
}
|
|
3870
|
+
} else {
|
|
3871
|
+
out += ' No RankMath SEO data set on this term.';
|
|
3872
|
+
}
|
|
3873
|
+
return ok(out);
|
|
3874
|
+
}
|
|
3875
|
+
|
|
3813
3876
|
// ── Taxonomies ──
|
|
3814
3877
|
|
|
3815
3878
|
case 'list_taxonomies': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noleemits/vision-builder-control-mcp",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.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",
|