@noleemits/vision-builder-control-mcp 4.15.2 → 4.16.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.
Files changed (2) hide show
  1. package/index.js +61 -1
  2. 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.15.2';
107
+ const VERSION = '4.16.0';
108
108
  const MIN_PLUGIN_VERSION = '4.13.0'; // Minimum WP plugin version required by this MCP server
109
109
 
110
110
  // ================================================================
@@ -2230,6 +2230,35 @@ function getToolDefinitions() {
2230
2230
  }
2231
2231
  }
2232
2232
  },
2233
+ {
2234
+ name: 'update_term_seo',
2235
+ 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).',
2236
+ inputSchema: {
2237
+ type: 'object',
2238
+ properties: {
2239
+ term_id: { type: 'number', description: 'WordPress term ID' },
2240
+ taxonomy: { type: 'string', description: 'Taxonomy slug, e.g. "category", "post_tag", "testimonial-category"' },
2241
+ title: { type: 'string', description: 'SEO meta title' },
2242
+ description: { type: 'string', description: 'SEO meta description' },
2243
+ focus_keyword: { type: 'string', description: 'Primary focus keyword' },
2244
+ canonical_url: { type: 'string', description: 'Canonical URL' },
2245
+ noindex: { type: 'boolean', description: 'Set true to noindex this term archive' }
2246
+ },
2247
+ required: ['term_id']
2248
+ }
2249
+ },
2250
+ {
2251
+ name: 'get_term_seo',
2252
+ description: 'Read current RankMath SEO fields for a taxonomy term.',
2253
+ inputSchema: {
2254
+ type: 'object',
2255
+ properties: {
2256
+ term_id: { type: 'number', description: 'WordPress term ID' },
2257
+ taxonomy: { type: 'string', description: 'Optional taxonomy slug for validation' }
2258
+ },
2259
+ required: ['term_id']
2260
+ }
2261
+ },
2233
2262
  // ── Taxonomies ──
2234
2263
  {
2235
2264
  name: 'list_taxonomies',
@@ -3810,6 +3839,37 @@ async function handleToolCall(name, args) {
3810
3839
  return ok(out);
3811
3840
  }
3812
3841
 
3842
+ case 'update_term_seo': {
3843
+ const { term_id, taxonomy, ...seoFields } = args;
3844
+ const body = { ...seoFields };
3845
+ if (taxonomy) body.taxonomy = taxonomy;
3846
+ const r = await apiCall(`/terms/${term_id}/seo`, 'POST', body);
3847
+ if (!r.success) return ok(`Failed: ${r.message || 'Unknown error'}`);
3848
+ 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`;
3849
+ if (r.seo) {
3850
+ for (const [k, v] of Object.entries(r.seo)) {
3851
+ out += ` ${k}: ${typeof v === 'object' ? JSON.stringify(v) : v}\n`;
3852
+ }
3853
+ }
3854
+ return ok(out);
3855
+ }
3856
+
3857
+ case 'get_term_seo': {
3858
+ const { term_id, taxonomy } = args;
3859
+ const qs = taxonomy ? `?taxonomy=${encodeURIComponent(taxonomy)}` : '';
3860
+ const r = await apiCall(`/terms/${term_id}/seo${qs}`);
3861
+ if (!r.success) return ok(`Failed: ${r.message || 'Unknown error'}`);
3862
+ let out = `SEO for term "${r.name}" (${r.taxonomy}, ID ${r.term_id}):\n`;
3863
+ if (r.seo) {
3864
+ for (const [k, v] of Object.entries(r.seo)) {
3865
+ out += ` ${k}: ${typeof v === 'object' ? JSON.stringify(v) : v}\n`;
3866
+ }
3867
+ } else {
3868
+ out += ' No RankMath SEO data set on this term.';
3869
+ }
3870
+ return ok(out);
3871
+ }
3872
+
3813
3873
  // ── Taxonomies ──
3814
3874
 
3815
3875
  case 'list_taxonomies': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noleemits/vision-builder-control-mcp",
3
- "version": "4.15.2",
3
+ "version": "4.16.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",