@wplaunchify/ml-mcp-server 2.5.1 → 2.5.2

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.
@@ -4,681 +4,451 @@ import { makeWordPressRequest } from '../wordpress.js';
4
4
  // Requires: fluent-mcp-pro.php WordPress plugin
5
5
  // 63 tools across 10 categories
6
6
  // ============================================================================
7
- // FILE SYSTEM OPERATIONS (7 tools)
7
+ // SCHEMA DEFINITIONS (Define schemas FIRST, then use .shape)
8
+ // ============================================================================
9
+ // File System Schemas
10
+ const fsReadSchema = z.object({
11
+ path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
12
+ encoding: z.enum(['utf8', 'base64']).optional().describe('File encoding (default: utf8)'),
13
+ });
14
+ const fsWriteSchema = z.object({
15
+ path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
16
+ content: z.string().describe('File content to write'),
17
+ encoding: z.enum(['utf8', 'base64']).optional().describe('File encoding (default: utf8)'),
18
+ });
19
+ const fsListSchema = z.object({
20
+ path: z.string().describe('Directory path relative to WordPress root or absolute path within allowed directories'),
21
+ recursive: z.boolean().optional().describe('List subdirectories recursively (default: false)'),
22
+ });
23
+ const fsDeleteSchema = z.object({
24
+ path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
25
+ });
26
+ const fsMkdirSchema = z.object({
27
+ path: z.string().describe('Directory path relative to WordPress root or absolute path within allowed directories'),
28
+ recursive: z.boolean().optional().describe('Create parent directories if needed (default: true)'),
29
+ });
30
+ const fsMoveSchema = z.object({
31
+ source: z.string().describe('Source file path'),
32
+ destination: z.string().describe('Destination file path'),
33
+ });
34
+ const fsInfoSchema = z.object({
35
+ path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
36
+ });
37
+ // Database Schemas
38
+ const dbQuerySchema = z.object({
39
+ query: z.string().describe('SQL query to execute'),
40
+ type: z.enum(['SELECT', 'INSERT', 'UPDATE', 'DELETE']).optional().describe('Query type (default: SELECT)'),
41
+ });
42
+ const dbBackupSchema = z.object({
43
+ tables: z.array(z.string()).optional().describe('Specific tables to backup (default: all tables)'),
44
+ });
45
+ const dbRestoreSchema = z.object({
46
+ file: z.string().describe('Path to SQL backup file to restore'),
47
+ });
48
+ const dbTableListSchema = z.object({
49
+ prefix: z.string().optional().describe('Filter tables by prefix (default: wp_)'),
50
+ });
51
+ const dbTableInfoSchema = z.object({
52
+ table: z.string().describe('Table name to get information about'),
53
+ });
54
+ const dbOptimizeSchema = z.object({
55
+ tables: z.array(z.string()).optional().describe('Specific tables to optimize (default: all tables)'),
56
+ });
57
+ const dbRepairSchema = z.object({
58
+ tables: z.array(z.string()).optional().describe('Specific tables to repair (default: all tables)'),
59
+ });
60
+ const dbExportSchema = z.object({
61
+ table: z.string().describe('Table name to export'),
62
+ format: z.enum(['csv', 'json']).optional().describe('Export format (default: csv)'),
63
+ });
64
+ // WordPress Settings Schemas
65
+ const wpGetOptionSchema = z.object({
66
+ option: z.string().describe('Option name to retrieve'),
67
+ });
68
+ const wpSetOptionSchema = z.object({
69
+ option: z.string().describe('Option name to set'),
70
+ value: z.any().describe('Option value to set'),
71
+ });
72
+ const wpDeleteOptionSchema = z.object({
73
+ option: z.string().describe('Option name to delete'),
74
+ });
75
+ const wpListOptionsSchema = z.object({
76
+ search: z.string().optional().describe('Search term to filter options'),
77
+ limit: z.number().optional().describe('Number of options to return (default: 100)'),
78
+ });
79
+ const wpGetConstantsSchema = z.object({
80
+ search: z.string().optional().describe('Search term to filter constants'),
81
+ });
82
+ const wpGetEnvSchema = z.object({
83
+ key: z.string().optional().describe('Specific environment variable to get (default: all)'),
84
+ });
85
+ const wpSiteInfoSchema = z.object({
86
+ include_server: z.boolean().optional().describe('Include server information (default: false)'),
87
+ });
88
+ const wpGetPermalinksSchema = z.object({});
89
+ const wpSetPermalinksSchema = z.object({
90
+ structure: z.string().describe('Permalink structure (e.g., /%postname%/)'),
91
+ });
92
+ const wpGetTimezoneSchema = z.object({});
93
+ const wpSetTimezoneSchema = z.object({
94
+ timezone: z.string().describe('Timezone string (e.g., America/New_York)'),
95
+ });
96
+ const wpFlushCacheSchema = z.object({
97
+ type: z.enum(['all', 'object', 'transient']).optional().describe('Cache type to flush (default: all)'),
98
+ });
99
+ // Theme Management Schemas
100
+ const themeListSchema = z.object({});
101
+ const themeActivateSchema = z.object({
102
+ theme: z.string().describe('Theme slug to activate'),
103
+ });
104
+ const themeDeleteSchema = z.object({
105
+ theme: z.string().describe('Theme slug to delete'),
106
+ });
107
+ // System Utilities Schemas
108
+ const systemInfoSchema = z.object({});
109
+ const systemHealthSchema = z.object({});
110
+ const systemLogsSchema = z.object({
111
+ lines: z.number().optional().describe('Number of log lines to return (default: 100)'),
112
+ type: z.enum(['error', 'debug', 'all']).optional().describe('Log type to retrieve (default: error)'),
113
+ });
114
+ const systemCronSchema = z.object({});
115
+ const systemCronRunSchema = z.object({
116
+ hook: z.string().describe('Cron hook name to execute'),
117
+ });
118
+ // WooCommerce Schemas
119
+ const wcProductListSchema = z.object({
120
+ per_page: z.number().optional().describe('Products per page (default: 10)'),
121
+ page: z.number().optional().describe('Page number (default: 1)'),
122
+ search: z.string().optional().describe('Search term'),
123
+ status: z.enum(['publish', 'draft', 'pending']).optional().describe('Product status'),
124
+ });
125
+ const wcProductGetSchema = z.object({
126
+ id: z.number().describe('Product ID'),
127
+ });
128
+ const wcProductCreateSchema = z.object({
129
+ name: z.string().describe('Product name'),
130
+ type: z.enum(['simple', 'variable', 'grouped', 'external']).optional().describe('Product type (default: simple)'),
131
+ regular_price: z.string().optional().describe('Regular price'),
132
+ description: z.string().optional().describe('Product description'),
133
+ short_description: z.string().optional().describe('Short description'),
134
+ categories: z.array(z.object({ id: z.number() })).optional().describe('Product categories'),
135
+ images: z.array(z.object({ src: z.string() })).optional().describe('Product images'),
136
+ });
137
+ const wcProductUpdateSchema = z.object({
138
+ id: z.number().describe('Product ID'),
139
+ name: z.string().optional().describe('Product name'),
140
+ regular_price: z.string().optional().describe('Regular price'),
141
+ description: z.string().optional().describe('Product description'),
142
+ short_description: z.string().optional().describe('Short description'),
143
+ stock_quantity: z.number().optional().describe('Stock quantity'),
144
+ });
145
+ const wcProductDeleteSchema = z.object({
146
+ id: z.number().describe('Product ID'),
147
+ force: z.boolean().optional().describe('Force delete (default: false)'),
148
+ });
149
+ const wcOrderListSchema = z.object({
150
+ per_page: z.number().optional().describe('Orders per page (default: 10)'),
151
+ page: z.number().optional().describe('Page number (default: 1)'),
152
+ status: z.string().optional().describe('Order status'),
153
+ });
154
+ const wcOrderGetSchema = z.object({
155
+ id: z.number().describe('Order ID'),
156
+ });
157
+ const wcOrderUpdateSchema = z.object({
158
+ id: z.number().describe('Order ID'),
159
+ status: z.string().optional().describe('Order status'),
160
+ customer_note: z.string().optional().describe('Customer note'),
161
+ });
162
+ const wcCustomerListSchema = z.object({
163
+ per_page: z.number().optional().describe('Customers per page (default: 10)'),
164
+ page: z.number().optional().describe('Page number (default: 1)'),
165
+ search: z.string().optional().describe('Search term'),
166
+ });
167
+ const wcCustomerGetSchema = z.object({
168
+ id: z.number().describe('Customer ID'),
169
+ });
170
+ const wcReportsSchema = z.object({
171
+ period: z.enum(['week', 'month', 'year']).optional().describe('Report period (default: week)'),
172
+ });
173
+ const wcCouponListSchema = z.object({
174
+ per_page: z.number().optional().describe('Coupons per page (default: 10)'),
175
+ page: z.number().optional().describe('Page number (default: 1)'),
176
+ });
177
+ const wcCouponCreateSchema = z.object({
178
+ code: z.string().describe('Coupon code'),
179
+ discount_type: z.enum(['percent', 'fixed_cart', 'fixed_product']).describe('Discount type'),
180
+ amount: z.string().describe('Discount amount'),
181
+ description: z.string().optional().describe('Coupon description'),
182
+ expiry_date: z.string().optional().describe('Expiry date (YYYY-MM-DD)'),
183
+ });
184
+ // WP-CLI Schemas
185
+ const wpCliExecuteSchema = z.object({
186
+ command: z.string().describe('WP-CLI command to execute (without "wp" prefix)'),
187
+ args: z.array(z.string()).optional().describe('Command arguments'),
188
+ });
189
+ const wpCliAvailableSchema = z.object({});
190
+ // ============================================================================
191
+ // TOOL DEFINITIONS (Use .shape from schemas defined above)
8
192
  // ============================================================================
9
193
  export const fluentMcpProTools = [
10
- // File System - Read
194
+ // File System Tools
11
195
  {
12
196
  name: 'pro_fs_read',
13
197
  description: 'Read file contents from WordPress file system (restricted to WordPress root and uploads directory, 2MB limit)',
14
- inputSchema: z.object({
15
- path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
16
- encoding: z.enum(['utf8', 'base64']).optional().describe('File encoding (default: utf8)'),
17
- }),
198
+ inputSchema: { type: 'object', properties: fsReadSchema.shape }
18
199
  },
19
- // File System - Write
20
200
  {
21
201
  name: 'pro_fs_write',
22
202
  description: 'Write or create file in WordPress file system (restricted to WordPress root and uploads directory)',
23
- inputSchema: z.object({
24
- path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
25
- content: z.string().describe('File content to write'),
26
- encoding: z.enum(['utf8', 'base64']).optional().describe('File encoding (default: utf8)'),
27
- }),
203
+ inputSchema: { type: 'object', properties: fsWriteSchema.shape }
28
204
  },
29
- // File System - List
30
205
  {
31
206
  name: 'pro_fs_list',
32
207
  description: 'List directory contents in WordPress file system (restricted to WordPress root and uploads directory)',
33
- inputSchema: z.object({
34
- path: z.string().describe('Directory path relative to WordPress root or absolute path within allowed directories'),
35
- recursive: z.boolean().optional().describe('List subdirectories recursively (default: false)'),
36
- }),
208
+ inputSchema: { type: 'object', properties: fsListSchema.shape }
37
209
  },
38
- // File System - Delete
39
210
  {
40
211
  name: 'pro_fs_delete',
41
212
  description: 'Delete file from WordPress file system (restricted to WordPress root and uploads directory)',
42
- inputSchema: z.object({
43
- path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
44
- }),
213
+ inputSchema: { type: 'object', properties: fsDeleteSchema.shape }
45
214
  },
46
- // File System - Create Directory
47
215
  {
48
216
  name: 'pro_fs_mkdir',
49
217
  description: 'Create directory in WordPress file system (restricted to WordPress root and uploads directory)',
50
- inputSchema: z.object({
51
- path: z.string().describe('Directory path relative to WordPress root or absolute path within allowed directories'),
52
- recursive: z.boolean().optional().describe('Create parent directories if needed (default: true)'),
53
- }),
218
+ inputSchema: { type: 'object', properties: fsMkdirSchema.shape }
54
219
  },
55
- // File System - Move/Rename
56
220
  {
57
221
  name: 'pro_fs_move',
58
222
  description: 'Move or rename file in WordPress file system (restricted to WordPress root and uploads directory)',
59
- inputSchema: z.object({
60
- source: z.string().describe('Source file path'),
61
- destination: z.string().describe('Destination file path'),
62
- }),
223
+ inputSchema: { type: 'object', properties: fsMoveSchema.shape }
63
224
  },
64
- // File System - File Info
65
225
  {
66
226
  name: 'pro_fs_info',
67
227
  description: 'Get file information (size, modified date, permissions)',
68
- inputSchema: z.object({
69
- path: z.string().describe('File path relative to WordPress root or absolute path within allowed directories'),
70
- }),
71
- },
72
- // ============================================================================
73
- // DATABASE OPERATIONS (8 tools)
74
- // ============================================================================
75
- // Database - Query
228
+ inputSchema: { type: 'object', properties: fsInfoSchema.shape }
229
+ },
230
+ // Database Tools
76
231
  {
77
232
  name: 'pro_db_query',
78
233
  description: 'Execute direct SQL query on WordPress database (use with caution, requires manage_options capability)',
79
- inputSchema: z.object({
80
- query: z.string().describe('SQL query to execute'),
81
- type: z.enum(['SELECT', 'INSERT', 'UPDATE', 'DELETE']).optional().describe('Query type (default: SELECT)'),
82
- }),
234
+ inputSchema: { type: 'object', properties: dbQuerySchema.shape }
83
235
  },
84
- // Database - Backup
85
236
  {
86
237
  name: 'pro_db_backup',
87
238
  description: 'Create database backup (exports to SQL file in uploads directory)',
88
- inputSchema: z.object({
89
- tables: z.array(z.string()).optional().describe('Specific tables to backup (default: all tables)'),
90
- filename: z.string().optional().describe('Backup filename (default: auto-generated with timestamp)'),
91
- }),
239
+ inputSchema: { type: 'object', properties: dbBackupSchema.shape }
92
240
  },
93
- // Database - Restore
94
241
  {
95
242
  name: 'pro_db_restore',
96
- description: 'Restore database from backup SQL file',
97
- inputSchema: z.object({
98
- filename: z.string().describe('Backup filename in uploads directory'),
99
- }),
243
+ description: 'Restore database from backup file',
244
+ inputSchema: { type: 'object', properties: dbRestoreSchema.shape }
245
+ },
246
+ {
247
+ name: 'pro_db_table_list',
248
+ description: 'List all database tables',
249
+ inputSchema: { type: 'object', properties: dbTableListSchema.shape }
250
+ },
251
+ {
252
+ name: 'pro_db_table_info',
253
+ description: 'Get information about a specific database table',
254
+ inputSchema: { type: 'object', properties: dbTableInfoSchema.shape }
255
+ },
256
+ {
257
+ name: 'pro_db_optimize',
258
+ description: 'Optimize database tables',
259
+ inputSchema: { type: 'object', properties: dbOptimizeSchema.shape }
260
+ },
261
+ {
262
+ name: 'pro_db_repair',
263
+ description: 'Repair database tables',
264
+ inputSchema: { type: 'object', properties: dbRepairSchema.shape }
265
+ },
266
+ {
267
+ name: 'pro_db_export',
268
+ description: 'Export database table to CSV or JSON',
269
+ inputSchema: { type: 'object', properties: dbExportSchema.shape }
270
+ },
271
+ // WordPress Settings Tools
272
+ {
273
+ name: 'pro_wp_get_option',
274
+ description: 'Get WordPress option value',
275
+ inputSchema: { type: 'object', properties: wpGetOptionSchema.shape }
276
+ },
277
+ {
278
+ name: 'pro_wp_set_option',
279
+ description: 'Set WordPress option value',
280
+ inputSchema: { type: 'object', properties: wpSetOptionSchema.shape }
281
+ },
282
+ {
283
+ name: 'pro_wp_delete_option',
284
+ description: 'Delete WordPress option',
285
+ inputSchema: { type: 'object', properties: wpDeleteOptionSchema.shape }
286
+ },
287
+ {
288
+ name: 'pro_wp_list_options',
289
+ description: 'List WordPress options',
290
+ inputSchema: { type: 'object', properties: wpListOptionsSchema.shape }
291
+ },
292
+ {
293
+ name: 'pro_wp_get_constants',
294
+ description: 'Get WordPress constants',
295
+ inputSchema: { type: 'object', properties: wpGetConstantsSchema.shape }
296
+ },
297
+ {
298
+ name: 'pro_wp_get_env',
299
+ description: 'Get environment variables',
300
+ inputSchema: { type: 'object', properties: wpGetEnvSchema.shape }
301
+ },
302
+ {
303
+ name: 'pro_wp_site_info',
304
+ description: 'Get comprehensive WordPress site information',
305
+ inputSchema: { type: 'object', properties: wpSiteInfoSchema.shape }
306
+ },
307
+ {
308
+ name: 'pro_wp_get_permalinks',
309
+ description: 'Get permalink structure',
310
+ inputSchema: { type: 'object', properties: wpGetPermalinksSchema.shape }
311
+ },
312
+ {
313
+ name: 'pro_wp_set_permalinks',
314
+ description: 'Set permalink structure',
315
+ inputSchema: { type: 'object', properties: wpSetPermalinksSchema.shape }
316
+ },
317
+ {
318
+ name: 'pro_wp_get_timezone',
319
+ description: 'Get WordPress timezone',
320
+ inputSchema: { type: 'object', properties: wpGetTimezoneSchema.shape }
321
+ },
322
+ {
323
+ name: 'pro_wp_set_timezone',
324
+ description: 'Set WordPress timezone',
325
+ inputSchema: { type: 'object', properties: wpSetTimezoneSchema.shape }
326
+ },
327
+ {
328
+ name: 'pro_wp_flush_cache',
329
+ description: 'Flush WordPress cache',
330
+ inputSchema: { type: 'object', properties: wpFlushCacheSchema.shape }
331
+ },
332
+ // Theme Management Tools
333
+ {
334
+ name: 'pro_theme_list',
335
+ description: 'List all installed themes',
336
+ inputSchema: { type: 'object', properties: themeListSchema.shape }
337
+ },
338
+ {
339
+ name: 'pro_theme_activate',
340
+ description: 'Activate a theme',
341
+ inputSchema: { type: 'object', properties: themeActivateSchema.shape }
342
+ },
343
+ {
344
+ name: 'pro_theme_delete',
345
+ description: 'Delete a theme',
346
+ inputSchema: { type: 'object', properties: themeDeleteSchema.shape }
347
+ },
348
+ // System Utilities Tools
349
+ {
350
+ name: 'pro_system_info',
351
+ description: 'Get system information (PHP, MySQL, server details)',
352
+ inputSchema: { type: 'object', properties: systemInfoSchema.shape }
353
+ },
354
+ {
355
+ name: 'pro_system_health',
356
+ description: 'Get WordPress site health status',
357
+ inputSchema: { type: 'object', properties: systemHealthSchema.shape }
358
+ },
359
+ {
360
+ name: 'pro_system_logs',
361
+ description: 'Get WordPress error logs',
362
+ inputSchema: { type: 'object', properties: systemLogsSchema.shape }
363
+ },
364
+ {
365
+ name: 'pro_system_cron',
366
+ description: 'List scheduled cron jobs',
367
+ inputSchema: { type: 'object', properties: systemCronSchema.shape }
368
+ },
369
+ {
370
+ name: 'pro_system_cron_run',
371
+ description: 'Execute a cron job immediately',
372
+ inputSchema: { type: 'object', properties: systemCronRunSchema.shape }
373
+ },
374
+ // WooCommerce Tools
375
+ {
376
+ name: 'pro_wc_product_list',
377
+ description: 'List WooCommerce products',
378
+ inputSchema: { type: 'object', properties: wcProductListSchema.shape }
379
+ },
380
+ {
381
+ name: 'pro_wc_product_get',
382
+ description: 'Get WooCommerce product by ID',
383
+ inputSchema: { type: 'object', properties: wcProductGetSchema.shape }
384
+ },
385
+ {
386
+ name: 'pro_wc_product_create',
387
+ description: 'Create WooCommerce product',
388
+ inputSchema: { type: 'object', properties: wcProductCreateSchema.shape }
389
+ },
390
+ {
391
+ name: 'pro_wc_product_update',
392
+ description: 'Update WooCommerce product',
393
+ inputSchema: { type: 'object', properties: wcProductUpdateSchema.shape }
394
+ },
395
+ {
396
+ name: 'pro_wc_product_delete',
397
+ description: 'Delete WooCommerce product',
398
+ inputSchema: { type: 'object', properties: wcProductDeleteSchema.shape }
100
399
  },
101
- // Database - List Tables
102
400
  {
103
- name: 'pro_db_tables',
104
- description: 'List all database tables with row counts and sizes',
105
- inputSchema: {}
401
+ name: 'pro_wc_order_list',
402
+ description: 'List WooCommerce orders',
403
+ inputSchema: { type: 'object', properties: wcOrderListSchema.shape }
404
+ },
405
+ {
406
+ name: 'pro_wc_order_get',
407
+ description: 'Get WooCommerce order by ID',
408
+ inputSchema: { type: 'object', properties: wcOrderGetSchema.shape }
409
+ },
410
+ {
411
+ name: 'pro_wc_order_update',
412
+ description: 'Update WooCommerce order',
413
+ inputSchema: { type: 'object', properties: wcOrderUpdateSchema.shape }
414
+ },
415
+ {
416
+ name: 'pro_wc_customer_list',
417
+ description: 'List WooCommerce customers',
418
+ inputSchema: { type: 'object', properties: wcCustomerListSchema.shape }
419
+ },
420
+ {
421
+ name: 'pro_wc_customer_get',
422
+ description: 'Get WooCommerce customer by ID',
423
+ inputSchema: { type: 'object', properties: wcCustomerGetSchema.shape }
424
+ },
425
+ {
426
+ name: 'pro_wc_reports',
427
+ description: 'Get WooCommerce sales reports',
428
+ inputSchema: { type: 'object', properties: wcReportsSchema.shape }
429
+ },
430
+ {
431
+ name: 'pro_wc_coupon_list',
432
+ description: 'List WooCommerce coupons',
433
+ inputSchema: { type: 'object', properties: wcCouponListSchema.shape }
434
+ },
435
+ {
436
+ name: 'pro_wc_coupon_create',
437
+ description: 'Create WooCommerce coupon',
438
+ inputSchema: { type: 'object', properties: wcCouponCreateSchema.shape }
439
+ },
440
+ // WP-CLI Tools
441
+ {
442
+ name: 'pro_wp_cli_execute',
443
+ description: 'Execute WP-CLI command',
444
+ inputSchema: { type: 'object', properties: wpCliExecuteSchema.shape }
445
+ },
446
+ {
447
+ name: 'pro_wp_cli_available',
448
+ description: 'Check if WP-CLI is available',
449
+ inputSchema: { type: 'object', properties: wpCliAvailableSchema.shape }
106
450
  },
107
451
  ];
108
- // Database - Table Info
109
- {
110
- name: 'pro_db_table_info',
111
- description;
112
- 'Get detailed table structure (columns, types, indexes)',
113
- inputSchema;
114
- z.object({
115
- table: z.string().describe('Table name (with or without prefix)'),
116
- }),
117
- ;
118
- }
119
- // Database - Optimize
120
- {
121
- name: 'pro_db_optimize',
122
- description;
123
- 'Optimize database table to reclaim space and improve performance',
124
- inputSchema;
125
- z.object({
126
- table: z.string().describe('Table name (with or without prefix)'),
127
- }),
128
- ;
129
- }
130
- // Database - Repair
131
- {
132
- name: 'pro_db_repair',
133
- description;
134
- 'Repair corrupted database table',
135
- inputSchema;
136
- z.object({
137
- table: z.string().describe('Table name (with or without prefix)'),
138
- }),
139
- ;
140
- }
141
- // Database - Search/Replace
142
- {
143
- name: 'pro_db_search_replace',
144
- description;
145
- 'Search and replace text across entire database (useful for URL changes, migrations)',
146
- inputSchema;
147
- z.object({
148
- search: z.string().describe('Text to search for'),
149
- replace: z.string().describe('Text to replace with'),
150
- tables: z.array(z.string()).optional().describe('Specific tables to search (default: all tables)'),
151
- dry_run: z.boolean().optional().describe('Preview changes without applying (default: true)'),
152
- }),
153
- ;
154
- }
155
- // ============================================================================
156
- // WORDPRESS SETTINGS (12 tools)
157
- // ============================================================================
158
- // Settings - General (Get)
159
- {
160
- name: 'pro_settings_general_get',
161
- description;
162
- 'Get WordPress general settings (site title, tagline, URL, timezone, etc.)',
163
- inputSchema;
164
- { }
165
- }
166
- // Settings - General (Update)
167
- {
168
- name: 'pro_settings_general_update',
169
- description;
170
- 'Update WordPress general settings',
171
- inputSchema;
172
- z.object({
173
- blogname: z.string().optional().describe('Site title'),
174
- blogdescription: z.string().optional().describe('Site tagline'),
175
- siteurl: z.string().optional().describe('WordPress address (URL)'),
176
- home: z.string().optional().describe('Site address (URL)'),
177
- admin_email: z.string().optional().describe('Administration email'),
178
- timezone_string: z.string().optional().describe('Timezone (e.g., America/New_York)'),
179
- date_format: z.string().optional().describe('Date format'),
180
- time_format: z.string().optional().describe('Time format'),
181
- start_of_week: z.number().optional().describe('Week starts on (0=Sunday, 1=Monday)'),
182
- }),
183
- ;
184
- }
185
- // Settings - Reading (Get)
186
- {
187
- name: 'pro_settings_reading_get',
188
- description;
189
- 'Get WordPress reading settings (homepage, posts page, posts per page, RSS settings)',
190
- inputSchema;
191
- { }
192
- }
193
- // Settings - Reading (Update)
194
- {
195
- name: 'pro_settings_reading_update',
196
- description;
197
- 'Update WordPress reading settings',
198
- inputSchema;
199
- z.object({
200
- show_on_front: z.enum(['posts', 'page']).optional().describe('What to show on front page'),
201
- page_on_front: z.number().optional().describe('Page ID to show on front (if show_on_front=page)'),
202
- page_for_posts: z.number().optional().describe('Page ID for blog posts'),
203
- posts_per_page: z.number().optional().describe('Blog pages show at most'),
204
- posts_per_rss: z.number().optional().describe('Syndication feeds show most recent'),
205
- rss_use_excerpt: z.boolean().optional().describe('Show summary in feeds instead of full text'),
206
- blog_public: z.boolean().optional().describe('Discourage search engines from indexing'),
207
- }),
208
- ;
209
- }
210
- // Settings - Writing (Get)
211
- {
212
- name: 'pro_settings_writing_get',
213
- description;
214
- 'Get WordPress writing settings (default post category, default post format)',
215
- inputSchema;
216
- { }
217
- }
218
- // Settings - Writing (Update)
219
- {
220
- name: 'pro_settings_writing_update',
221
- description;
222
- 'Update WordPress writing settings',
223
- inputSchema;
224
- z.object({
225
- default_category: z.number().optional().describe('Default post category ID'),
226
- default_post_format: z.string().optional().describe('Default post format'),
227
- use_smilies: z.boolean().optional().describe('Convert emoticons to graphics'),
228
- use_balanceTags: z.boolean().optional().describe('Automatically correct invalidly nested XHTML'),
229
- }),
230
- ;
231
- }
232
- // Settings - Discussion (Get)
233
- {
234
- name: 'pro_settings_discussion_get',
235
- description;
236
- 'Get WordPress discussion settings (comments, pingbacks, moderation)',
237
- inputSchema;
238
- { }
239
- }
240
- // Settings - Discussion (Update)
241
- {
242
- name: 'pro_settings_discussion_update',
243
- description;
244
- 'Update WordPress discussion settings',
245
- inputSchema;
246
- z.object({
247
- default_comment_status: z.enum(['open', 'closed']).optional().describe('Allow comments on new posts'),
248
- default_ping_status: z.enum(['open', 'closed']).optional().describe('Allow pingbacks/trackbacks on new posts'),
249
- require_name_email: z.boolean().optional().describe('Comment author must fill out name and email'),
250
- comment_registration: z.boolean().optional().describe('Users must be registered to comment'),
251
- close_comments_for_old_posts: z.boolean().optional().describe('Automatically close comments on old posts'),
252
- close_comments_days_old: z.number().optional().describe('Close comments after X days'),
253
- thread_comments: z.boolean().optional().describe('Enable threaded comments'),
254
- thread_comments_depth: z.number().optional().describe('Thread depth (1-10)'),
255
- page_comments: z.boolean().optional().describe('Break comments into pages'),
256
- comments_per_page: z.number().optional().describe('Comments per page'),
257
- comment_moderation: z.boolean().optional().describe('Comment must be manually approved'),
258
- comment_whitelist: z.boolean().optional().describe('Comment author must have previously approved comment'),
259
- }),
260
- ;
261
- }
262
- // Settings - Media (Get)
263
- {
264
- name: 'pro_settings_media_get',
265
- description;
266
- 'Get WordPress media settings (image sizes, upload organization)',
267
- inputSchema;
268
- { }
269
- }
270
- // Settings - Media (Update)
271
- {
272
- name: 'pro_settings_media_update',
273
- description;
274
- 'Update WordPress media settings',
275
- inputSchema;
276
- z.object({
277
- thumbnail_size_w: z.number().optional().describe('Thumbnail width'),
278
- thumbnail_size_h: z.number().optional().describe('Thumbnail height'),
279
- thumbnail_crop: z.boolean().optional().describe('Crop thumbnail to exact dimensions'),
280
- medium_size_w: z.number().optional().describe('Medium width'),
281
- medium_size_h: z.number().optional().describe('Medium height'),
282
- large_size_w: z.number().optional().describe('Large width'),
283
- large_size_h: z.number().optional().describe('Large height'),
284
- uploads_use_yearmonth_folders: z.boolean().optional().describe('Organize uploads into month/year folders'),
285
- }),
286
- ;
287
- }
288
- // Settings - Permalink (Get)
289
- {
290
- name: 'pro_settings_permalink_get',
291
- description;
292
- 'Get WordPress permalink settings (URL structure)',
293
- inputSchema;
294
- { }
295
- }
296
- // Settings - Permalink (Update)
297
- {
298
- name: 'pro_settings_permalink_update',
299
- description;
300
- 'Update WordPress permalink settings (WARNING: may require .htaccess update)',
301
- inputSchema;
302
- z.object({
303
- permalink_structure: z.string().optional().describe('Permalink structure (e.g., /%postname%/)'),
304
- category_base: z.string().optional().describe('Category base prefix'),
305
- tag_base: z.string().optional().describe('Tag base prefix'),
306
- }),
307
- ;
308
- }
309
- // ============================================================================
310
- // THEME MANAGEMENT (3 tools)
311
- // ============================================================================
312
- // Themes - List
313
- {
314
- name: 'pro_themes_list',
315
- description;
316
- 'List all installed WordPress themes with details',
317
- inputSchema;
318
- { }
319
- }
320
- // Themes - Activate
321
- {
322
- name: 'pro_themes_activate',
323
- description;
324
- 'Activate a WordPress theme',
325
- inputSchema;
326
- z.object({
327
- stylesheet: z.string().describe('Theme stylesheet name (folder name)'),
328
- }),
329
- ;
330
- }
331
- // Themes - Get Active
332
- {
333
- name: 'pro_themes_active',
334
- description;
335
- 'Get currently active WordPress theme details',
336
- inputSchema;
337
- { }
338
- }
339
- // ============================================================================
340
- // SYSTEM UTILITIES (5 tools)
341
- // ============================================================================
342
- // System - PHP Info
343
- {
344
- name: 'pro_system_phpinfo',
345
- description;
346
- 'Get PHP configuration and environment information',
347
- inputSchema;
348
- z.object({
349
- format: z.enum(['array', 'html']).optional().describe('Output format (default: array)'),
350
- }),
351
- ;
352
- }
353
- // System - Server Info
354
- {
355
- name: 'pro_system_server_info',
356
- description;
357
- 'Get server information (OS, software, WordPress version, PHP version)',
358
- inputSchema;
359
- { }
360
- }
361
- // System - Disk Space
362
- {
363
- name: 'pro_system_disk_space',
364
- description;
365
- 'Check disk space usage for WordPress installation',
366
- inputSchema;
367
- { }
368
- }
369
- // System - Error Log
370
- {
371
- name: 'pro_system_error_log',
372
- description;
373
- 'Get WordPress error log (last N lines)',
374
- inputSchema;
375
- z.object({
376
- lines: z.number().optional().describe('Number of lines to retrieve (default: 100)'),
377
- }),
378
- ;
379
- }
380
- // System - Clear Cache
381
- {
382
- name: 'pro_system_clear_cache',
383
- description;
384
- 'Clear WordPress caches (object cache, transients, rewrite rules)',
385
- inputSchema;
386
- z.object({
387
- cache_type: z.enum(['all', 'object', 'transients', 'rewrite']).optional().describe('Cache type to clear (default: all)'),
388
- }),
389
- ;
390
- }
391
- // ============================================================================
392
- // CONFIG FILES (2 tools)
393
- // ============================================================================
394
- // Config - wp-config.php
395
- {
396
- name: 'pro_config_wp_config',
397
- description;
398
- 'Read wp-config.php file (sensitive information redacted)',
399
- inputSchema;
400
- { }
401
- }
402
- // Config - .htaccess
403
- {
404
- name: 'pro_config_htaccess',
405
- description;
406
- 'Read .htaccess file',
407
- inputSchema;
408
- { }
409
- }
410
- // ============================================================================
411
- // WOOCOMMERCE (13 tools)
412
- // ============================================================================
413
- // WooCommerce - List Products
414
- {
415
- name: 'pro_wc_products_list',
416
- description;
417
- 'List WooCommerce products with filtering and pagination',
418
- inputSchema;
419
- z.object({
420
- page: z.number().optional().describe('Page number (default: 1)'),
421
- per_page: z.number().optional().describe('Products per page (default: 10, max: 100)'),
422
- search: z.string().optional().describe('Search products by name or SKU'),
423
- status: z.enum(['any', 'draft', 'pending', 'private', 'publish']).optional().describe('Product status'),
424
- type: z.enum(['simple', 'grouped', 'external', 'variable']).optional().describe('Product type'),
425
- category: z.string().optional().describe('Category slug'),
426
- tag: z.string().optional().describe('Tag slug'),
427
- orderby: z.enum(['date', 'id', 'title', 'slug', 'price']).optional().describe('Sort by'),
428
- order: z.enum(['asc', 'desc']).optional().describe('Sort order'),
429
- }),
430
- ;
431
- }
432
- // WooCommerce - Create Product
433
- {
434
- name: 'pro_wc_products_create',
435
- description;
436
- 'Create new WooCommerce product',
437
- inputSchema;
438
- z.object({
439
- name: z.string().describe('Product name'),
440
- type: z.enum(['simple', 'grouped', 'external', 'variable']).optional().describe('Product type (default: simple)'),
441
- regular_price: z.string().optional().describe('Regular price'),
442
- sale_price: z.string().optional().describe('Sale price'),
443
- description: z.string().optional().describe('Product description (HTML)'),
444
- short_description: z.string().optional().describe('Short description (HTML)'),
445
- sku: z.string().optional().describe('Stock keeping unit'),
446
- manage_stock: z.boolean().optional().describe('Enable stock management'),
447
- stock_quantity: z.number().optional().describe('Stock quantity'),
448
- stock_status: z.enum(['instock', 'outofstock', 'onbackorder']).optional().describe('Stock status'),
449
- categories: z.array(z.object({ id: z.number() })).optional().describe('Product categories'),
450
- tags: z.array(z.object({ id: z.number() })).optional().describe('Product tags'),
451
- images: z.array(z.object({ src: z.string() })).optional().describe('Product images'),
452
- status: z.enum(['draft', 'pending', 'private', 'publish']).optional().describe('Product status'),
453
- }),
454
- ;
455
- }
456
- // WooCommerce - Update Product
457
- {
458
- name: 'pro_wc_products_update',
459
- description;
460
- 'Update existing WooCommerce product',
461
- inputSchema;
462
- z.object({
463
- id: z.number().describe('Product ID'),
464
- name: z.string().optional().describe('Product name'),
465
- regular_price: z.string().optional().describe('Regular price'),
466
- sale_price: z.string().optional().describe('Sale price'),
467
- description: z.string().optional().describe('Product description (HTML)'),
468
- short_description: z.string().optional().describe('Short description (HTML)'),
469
- sku: z.string().optional().describe('Stock keeping unit'),
470
- manage_stock: z.boolean().optional().describe('Enable stock management'),
471
- stock_quantity: z.number().optional().describe('Stock quantity'),
472
- stock_status: z.enum(['instock', 'outofstock', 'onbackorder']).optional().describe('Stock status'),
473
- status: z.enum(['draft', 'pending', 'private', 'publish']).optional().describe('Product status'),
474
- }),
475
- ;
476
- }
477
- // WooCommerce - Delete Product
478
- {
479
- name: 'pro_wc_products_delete',
480
- description;
481
- 'Delete WooCommerce product',
482
- inputSchema;
483
- z.object({
484
- id: z.number().describe('Product ID'),
485
- force: z.boolean().optional().describe('Force delete (bypass trash, default: false)'),
486
- }),
487
- ;
488
- }
489
- // WooCommerce - List Orders
490
- {
491
- name: 'pro_wc_orders_list',
492
- description;
493
- 'List WooCommerce orders with filtering and pagination',
494
- inputSchema;
495
- z.object({
496
- page: z.number().optional().describe('Page number (default: 1)'),
497
- per_page: z.number().optional().describe('Orders per page (default: 10, max: 100)'),
498
- status: z.enum(['any', 'pending', 'processing', 'on-hold', 'completed', 'cancelled', 'refunded', 'failed']).optional().describe('Order status'),
499
- customer: z.number().optional().describe('Customer user ID'),
500
- orderby: z.enum(['date', 'id', 'total']).optional().describe('Sort by'),
501
- order: z.enum(['asc', 'desc']).optional().describe('Sort order'),
502
- }),
503
- ;
504
- }
505
- // WooCommerce - Update Order
506
- {
507
- name: 'pro_wc_orders_update',
508
- description;
509
- 'Update WooCommerce order (status, notes, etc.)',
510
- inputSchema;
511
- z.object({
512
- id: z.number().describe('Order ID'),
513
- status: z.enum(['pending', 'processing', 'on-hold', 'completed', 'cancelled', 'refunded', 'failed']).optional().describe('Order status'),
514
- customer_note: z.string().optional().describe('Customer note'),
515
- }),
516
- ;
517
- }
518
- // WooCommerce - Delete Order
519
- {
520
- name: 'pro_wc_orders_delete',
521
- description;
522
- 'Delete WooCommerce order',
523
- inputSchema;
524
- z.object({
525
- id: z.number().describe('Order ID'),
526
- force: z.boolean().optional().describe('Force delete (bypass trash, default: false)'),
527
- }),
528
- ;
529
- }
530
- // WooCommerce - List Customers
531
- {
532
- name: 'pro_wc_customers_list',
533
- description;
534
- 'List WooCommerce customers with filtering and pagination',
535
- inputSchema;
536
- z.object({
537
- page: z.number().optional().describe('Page number (default: 1)'),
538
- per_page: z.number().optional().describe('Customers per page (default: 10, max: 100)'),
539
- search: z.string().optional().describe('Search customers by name or email'),
540
- orderby: z.enum(['id', 'name', 'registered_date']).optional().describe('Sort by'),
541
- order: z.enum(['asc', 'desc']).optional().describe('Sort order'),
542
- }),
543
- ;
544
- }
545
- // WooCommerce - Create Customer
546
- {
547
- name: 'pro_wc_customers_create',
548
- description;
549
- 'Create new WooCommerce customer',
550
- inputSchema;
551
- z.object({
552
- email: z.string().describe('Customer email (required)'),
553
- first_name: z.string().optional().describe('First name'),
554
- last_name: z.string().optional().describe('Last name'),
555
- username: z.string().optional().describe('Username (auto-generated if not provided)'),
556
- password: z.string().optional().describe('Password (auto-generated if not provided)'),
557
- billing: z.object({
558
- first_name: z.string().optional(),
559
- last_name: z.string().optional(),
560
- company: z.string().optional(),
561
- address_1: z.string().optional(),
562
- address_2: z.string().optional(),
563
- city: z.string().optional(),
564
- state: z.string().optional(),
565
- postcode: z.string().optional(),
566
- country: z.string().optional(),
567
- email: z.string().optional(),
568
- phone: z.string().optional(),
569
- }).optional().describe('Billing address'),
570
- shipping: z.object({
571
- first_name: z.string().optional(),
572
- last_name: z.string().optional(),
573
- company: z.string().optional(),
574
- address_1: z.string().optional(),
575
- address_2: z.string().optional(),
576
- city: z.string().optional(),
577
- state: z.string().optional(),
578
- postcode: z.string().optional(),
579
- country: z.string().optional(),
580
- }).optional().describe('Shipping address'),
581
- }),
582
- ;
583
- }
584
- // WooCommerce - Update Customer
585
- {
586
- name: 'pro_wc_customers_update',
587
- description;
588
- 'Update existing WooCommerce customer',
589
- inputSchema;
590
- z.object({
591
- id: z.number().describe('Customer ID'),
592
- email: z.string().optional().describe('Customer email'),
593
- first_name: z.string().optional().describe('First name'),
594
- last_name: z.string().optional().describe('Last name'),
595
- billing: z.object({
596
- first_name: z.string().optional(),
597
- last_name: z.string().optional(),
598
- company: z.string().optional(),
599
- address_1: z.string().optional(),
600
- address_2: z.string().optional(),
601
- city: z.string().optional(),
602
- state: z.string().optional(),
603
- postcode: z.string().optional(),
604
- country: z.string().optional(),
605
- email: z.string().optional(),
606
- phone: z.string().optional(),
607
- }).optional().describe('Billing address'),
608
- shipping: z.object({
609
- first_name: z.string().optional(),
610
- last_name: z.string().optional(),
611
- company: z.string().optional(),
612
- address_1: z.string().optional(),
613
- address_2: z.string().optional(),
614
- city: z.string().optional(),
615
- state: z.string().optional(),
616
- postcode: z.string().optional(),
617
- country: z.string().optional(),
618
- }).optional().describe('Shipping address'),
619
- }),
620
- ;
621
- }
622
- // WooCommerce - Delete Customer
623
- {
624
- name: 'pro_wc_customers_delete',
625
- description;
626
- 'Delete WooCommerce customer',
627
- inputSchema;
628
- z.object({
629
- id: z.number().describe('Customer ID'),
630
- force: z.boolean().optional().describe('Force delete (bypass trash, default: false)'),
631
- reassign: z.number().optional().describe('Reassign customer orders to this user ID'),
632
- }),
633
- ;
634
- }
635
- // WooCommerce - Get Settings
636
- {
637
- name: 'pro_wc_settings_get',
638
- description;
639
- 'Get WooCommerce settings (general, products, tax, shipping, etc.)',
640
- inputSchema;
641
- z.object({
642
- group: z.string().optional().describe('Settings group (e.g., general, products, tax, shipping)'),
643
- }),
644
- ;
645
- }
646
- // WooCommerce - Update Settings
647
- {
648
- name: 'pro_wc_settings_update',
649
- description;
650
- 'Update WooCommerce settings',
651
- inputSchema;
652
- z.object({
653
- group: z.string().describe('Settings group (e.g., general, products, tax, shipping)'),
654
- settings: z.record(z.any()).describe('Settings key-value pairs to update'),
655
- }),
656
- ;
657
- }
658
- // ============================================================================
659
- // WP-CLI INTEGRATION (2 tools)
660
- // ============================================================================
661
- // WP-CLI - Execute
662
- {
663
- name: 'pro_wp_cli_execute',
664
- description;
665
- 'Execute WP-CLI command (requires WP-CLI installed on server)',
666
- inputSchema;
667
- z.object({
668
- command: z.string().describe('WP-CLI command to execute (e.g., "plugin list", "cache flush")'),
669
- args: z.array(z.string()).optional().describe('Command arguments'),
670
- }),
671
- ;
672
- }
673
- // WP-CLI - Check Availability
674
- {
675
- name: 'pro_wp_cli_available',
676
- description;
677
- 'Check if WP-CLI is available on the server',
678
- inputSchema;
679
- { }
680
- }
681
- ;
682
452
  // ============================================================================
683
453
  // HANDLERS
684
454
  // ============================================================================
@@ -925,9 +695,9 @@ export const fluentMcpProHandlers = {
925
695
  };
926
696
  }
927
697
  },
928
- pro_db_tables: async (args) => {
698
+ pro_db_table_list: async (args) => {
929
699
  try {
930
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/db/tables');
700
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/db/tables', args);
931
701
  return {
932
702
  toolResult: {
933
703
  content: [{
@@ -951,7 +721,7 @@ export const fluentMcpProHandlers = {
951
721
  },
952
722
  pro_db_table_info: async (args) => {
953
723
  try {
954
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/db/table-info', args);
724
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/power/db/tables/${args.table}`, args);
955
725
  return {
956
726
  toolResult: {
957
727
  content: [{
@@ -991,7 +761,7 @@ export const fluentMcpProHandlers = {
991
761
  isError: true,
992
762
  content: [{
993
763
  type: 'text',
994
- text: `Error optimizing table: ${error.message}`
764
+ text: `Error optimizing tables: ${error.message}`
995
765
  }]
996
766
  }
997
767
  };
@@ -1015,15 +785,15 @@ export const fluentMcpProHandlers = {
1015
785
  isError: true,
1016
786
  content: [{
1017
787
  type: 'text',
1018
- text: `Error repairing table: ${error.message}`
788
+ text: `Error repairing tables: ${error.message}`
1019
789
  }]
1020
790
  }
1021
791
  };
1022
792
  }
1023
793
  },
1024
- pro_db_search_replace: async (args) => {
794
+ pro_db_export: async (args) => {
1025
795
  try {
1026
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/db/search-replace', args);
796
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/db/export', args);
1027
797
  return {
1028
798
  toolResult: {
1029
799
  content: [{
@@ -1039,16 +809,16 @@ export const fluentMcpProHandlers = {
1039
809
  isError: true,
1040
810
  content: [{
1041
811
  type: 'text',
1042
- text: `Error in search/replace: ${error.message}`
812
+ text: `Error exporting table: ${error.message}`
1043
813
  }]
1044
814
  }
1045
815
  };
1046
816
  }
1047
817
  },
1048
818
  // WordPress Settings Handlers
1049
- pro_settings_general_get: async (args) => {
819
+ pro_wp_get_option: async (args) => {
1050
820
  try {
1051
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/settings/general');
821
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/power/wp/options/${args.option}`);
1052
822
  return {
1053
823
  toolResult: {
1054
824
  content: [{
@@ -1064,15 +834,15 @@ export const fluentMcpProHandlers = {
1064
834
  isError: true,
1065
835
  content: [{
1066
836
  type: 'text',
1067
- text: `Error getting general settings: ${error.message}`
837
+ text: `Error getting option: ${error.message}`
1068
838
  }]
1069
839
  }
1070
840
  };
1071
841
  }
1072
842
  },
1073
- pro_settings_general_update: async (args) => {
843
+ pro_wp_set_option: async (args) => {
1074
844
  try {
1075
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/settings/general', args);
845
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wp/options', args);
1076
846
  return {
1077
847
  toolResult: {
1078
848
  content: [{
@@ -1088,15 +858,15 @@ export const fluentMcpProHandlers = {
1088
858
  isError: true,
1089
859
  content: [{
1090
860
  type: 'text',
1091
- text: `Error updating general settings: ${error.message}`
861
+ text: `Error setting option: ${error.message}`
1092
862
  }]
1093
863
  }
1094
864
  };
1095
865
  }
1096
866
  },
1097
- pro_settings_reading_get: async (args) => {
867
+ pro_wp_delete_option: async (args) => {
1098
868
  try {
1099
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/settings/reading');
869
+ const response = await makeWordPressRequest('DELETE', `fc-manager/v1/power/wp/options/${args.option}`);
1100
870
  return {
1101
871
  toolResult: {
1102
872
  content: [{
@@ -1112,15 +882,15 @@ export const fluentMcpProHandlers = {
1112
882
  isError: true,
1113
883
  content: [{
1114
884
  type: 'text',
1115
- text: `Error getting reading settings: ${error.message}`
885
+ text: `Error deleting option: ${error.message}`
1116
886
  }]
1117
887
  }
1118
888
  };
1119
889
  }
1120
890
  },
1121
- pro_settings_reading_update: async (args) => {
891
+ pro_wp_list_options: async (args) => {
1122
892
  try {
1123
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/settings/reading', args);
893
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wp/options', args);
1124
894
  return {
1125
895
  toolResult: {
1126
896
  content: [{
@@ -1136,15 +906,15 @@ export const fluentMcpProHandlers = {
1136
906
  isError: true,
1137
907
  content: [{
1138
908
  type: 'text',
1139
- text: `Error updating reading settings: ${error.message}`
909
+ text: `Error listing options: ${error.message}`
1140
910
  }]
1141
911
  }
1142
912
  };
1143
913
  }
1144
914
  },
1145
- pro_settings_writing_get: async (args) => {
915
+ pro_wp_get_constants: async (args) => {
1146
916
  try {
1147
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/settings/writing');
917
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wp/constants', args);
1148
918
  return {
1149
919
  toolResult: {
1150
920
  content: [{
@@ -1160,15 +930,15 @@ export const fluentMcpProHandlers = {
1160
930
  isError: true,
1161
931
  content: [{
1162
932
  type: 'text',
1163
- text: `Error getting writing settings: ${error.message}`
933
+ text: `Error getting constants: ${error.message}`
1164
934
  }]
1165
935
  }
1166
936
  };
1167
937
  }
1168
938
  },
1169
- pro_settings_writing_update: async (args) => {
939
+ pro_wp_get_env: async (args) => {
1170
940
  try {
1171
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/settings/writing', args);
941
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wp/env', args);
1172
942
  return {
1173
943
  toolResult: {
1174
944
  content: [{
@@ -1184,15 +954,15 @@ export const fluentMcpProHandlers = {
1184
954
  isError: true,
1185
955
  content: [{
1186
956
  type: 'text',
1187
- text: `Error updating writing settings: ${error.message}`
957
+ text: `Error getting environment: ${error.message}`
1188
958
  }]
1189
959
  }
1190
960
  };
1191
961
  }
1192
962
  },
1193
- pro_settings_discussion_get: async (args) => {
963
+ pro_wp_site_info: async (args) => {
1194
964
  try {
1195
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/settings/discussion');
965
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wp/site-info', args);
1196
966
  return {
1197
967
  toolResult: {
1198
968
  content: [{
@@ -1208,15 +978,15 @@ export const fluentMcpProHandlers = {
1208
978
  isError: true,
1209
979
  content: [{
1210
980
  type: 'text',
1211
- text: `Error getting discussion settings: ${error.message}`
981
+ text: `Error getting site info: ${error.message}`
1212
982
  }]
1213
983
  }
1214
984
  };
1215
985
  }
1216
986
  },
1217
- pro_settings_discussion_update: async (args) => {
987
+ pro_wp_get_permalinks: async (args) => {
1218
988
  try {
1219
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/settings/discussion', args);
989
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wp/permalinks');
1220
990
  return {
1221
991
  toolResult: {
1222
992
  content: [{
@@ -1232,15 +1002,15 @@ export const fluentMcpProHandlers = {
1232
1002
  isError: true,
1233
1003
  content: [{
1234
1004
  type: 'text',
1235
- text: `Error updating discussion settings: ${error.message}`
1005
+ text: `Error getting permalinks: ${error.message}`
1236
1006
  }]
1237
1007
  }
1238
1008
  };
1239
1009
  }
1240
1010
  },
1241
- pro_settings_media_get: async (args) => {
1011
+ pro_wp_set_permalinks: async (args) => {
1242
1012
  try {
1243
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/settings/media');
1013
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wp/permalinks', args);
1244
1014
  return {
1245
1015
  toolResult: {
1246
1016
  content: [{
@@ -1256,15 +1026,15 @@ export const fluentMcpProHandlers = {
1256
1026
  isError: true,
1257
1027
  content: [{
1258
1028
  type: 'text',
1259
- text: `Error getting media settings: ${error.message}`
1029
+ text: `Error setting permalinks: ${error.message}`
1260
1030
  }]
1261
1031
  }
1262
1032
  };
1263
1033
  }
1264
1034
  },
1265
- pro_settings_media_update: async (args) => {
1035
+ pro_wp_get_timezone: async (args) => {
1266
1036
  try {
1267
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/settings/media', args);
1037
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wp/timezone');
1268
1038
  return {
1269
1039
  toolResult: {
1270
1040
  content: [{
@@ -1280,15 +1050,15 @@ export const fluentMcpProHandlers = {
1280
1050
  isError: true,
1281
1051
  content: [{
1282
1052
  type: 'text',
1283
- text: `Error updating media settings: ${error.message}`
1053
+ text: `Error getting timezone: ${error.message}`
1284
1054
  }]
1285
1055
  }
1286
1056
  };
1287
1057
  }
1288
1058
  },
1289
- pro_settings_permalink_get: async (args) => {
1059
+ pro_wp_set_timezone: async (args) => {
1290
1060
  try {
1291
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/settings/permalink');
1061
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wp/timezone', args);
1292
1062
  return {
1293
1063
  toolResult: {
1294
1064
  content: [{
@@ -1304,15 +1074,15 @@ export const fluentMcpProHandlers = {
1304
1074
  isError: true,
1305
1075
  content: [{
1306
1076
  type: 'text',
1307
- text: `Error getting permalink settings: ${error.message}`
1077
+ text: `Error setting timezone: ${error.message}`
1308
1078
  }]
1309
1079
  }
1310
1080
  };
1311
1081
  }
1312
1082
  },
1313
- pro_settings_permalink_update: async (args) => {
1083
+ pro_wp_flush_cache: async (args) => {
1314
1084
  try {
1315
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/settings/permalink', args);
1085
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wp/flush-cache', args);
1316
1086
  return {
1317
1087
  toolResult: {
1318
1088
  content: [{
@@ -1328,14 +1098,14 @@ export const fluentMcpProHandlers = {
1328
1098
  isError: true,
1329
1099
  content: [{
1330
1100
  type: 'text',
1331
- text: `Error updating permalink settings: ${error.message}`
1101
+ text: `Error flushing cache: ${error.message}`
1332
1102
  }]
1333
1103
  }
1334
1104
  };
1335
1105
  }
1336
1106
  },
1337
- // Theme Handlers
1338
- pro_themes_list: async (args) => {
1107
+ // Theme Management Handlers
1108
+ pro_theme_list: async (args) => {
1339
1109
  try {
1340
1110
  const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/themes');
1341
1111
  return {
@@ -1359,7 +1129,7 @@ export const fluentMcpProHandlers = {
1359
1129
  };
1360
1130
  }
1361
1131
  },
1362
- pro_themes_activate: async (args) => {
1132
+ pro_theme_activate: async (args) => {
1363
1133
  try {
1364
1134
  const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/themes/activate', args);
1365
1135
  return {
@@ -1383,9 +1153,9 @@ export const fluentMcpProHandlers = {
1383
1153
  };
1384
1154
  }
1385
1155
  },
1386
- pro_themes_active: async (args) => {
1156
+ pro_theme_delete: async (args) => {
1387
1157
  try {
1388
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/themes/active');
1158
+ const response = await makeWordPressRequest('DELETE', `fc-manager/v1/power/themes/${args.theme}`);
1389
1159
  return {
1390
1160
  toolResult: {
1391
1161
  content: [{
@@ -1401,16 +1171,16 @@ export const fluentMcpProHandlers = {
1401
1171
  isError: true,
1402
1172
  content: [{
1403
1173
  type: 'text',
1404
- text: `Error getting active theme: ${error.message}`
1174
+ text: `Error deleting theme: ${error.message}`
1405
1175
  }]
1406
1176
  }
1407
1177
  };
1408
1178
  }
1409
1179
  },
1410
- // System Handlers
1411
- pro_system_phpinfo: async (args) => {
1180
+ // System Utilities Handlers
1181
+ pro_system_info: async (args) => {
1412
1182
  try {
1413
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/phpinfo', args);
1183
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/info');
1414
1184
  return {
1415
1185
  toolResult: {
1416
1186
  content: [{
@@ -1426,15 +1196,15 @@ export const fluentMcpProHandlers = {
1426
1196
  isError: true,
1427
1197
  content: [{
1428
1198
  type: 'text',
1429
- text: `Error getting PHP info: ${error.message}`
1199
+ text: `Error getting system info: ${error.message}`
1430
1200
  }]
1431
1201
  }
1432
1202
  };
1433
1203
  }
1434
1204
  },
1435
- pro_system_server_info: async (args) => {
1205
+ pro_system_health: async (args) => {
1436
1206
  try {
1437
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/server-info');
1207
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/health');
1438
1208
  return {
1439
1209
  toolResult: {
1440
1210
  content: [{
@@ -1450,15 +1220,15 @@ export const fluentMcpProHandlers = {
1450
1220
  isError: true,
1451
1221
  content: [{
1452
1222
  type: 'text',
1453
- text: `Error getting server info: ${error.message}`
1223
+ text: `Error getting system health: ${error.message}`
1454
1224
  }]
1455
1225
  }
1456
1226
  };
1457
1227
  }
1458
1228
  },
1459
- pro_system_disk_space: async (args) => {
1229
+ pro_system_logs: async (args) => {
1460
1230
  try {
1461
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/disk-space');
1231
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/logs', args);
1462
1232
  return {
1463
1233
  toolResult: {
1464
1234
  content: [{
@@ -1474,15 +1244,15 @@ export const fluentMcpProHandlers = {
1474
1244
  isError: true,
1475
1245
  content: [{
1476
1246
  type: 'text',
1477
- text: `Error checking disk space: ${error.message}`
1247
+ text: `Error getting logs: ${error.message}`
1478
1248
  }]
1479
1249
  }
1480
1250
  };
1481
1251
  }
1482
1252
  },
1483
- pro_system_error_log: async (args) => {
1253
+ pro_system_cron: async (args) => {
1484
1254
  try {
1485
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/error-log', args);
1255
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/system/cron');
1486
1256
  return {
1487
1257
  toolResult: {
1488
1258
  content: [{
@@ -1498,15 +1268,15 @@ export const fluentMcpProHandlers = {
1498
1268
  isError: true,
1499
1269
  content: [{
1500
1270
  type: 'text',
1501
- text: `Error getting error log: ${error.message}`
1271
+ text: `Error getting cron jobs: ${error.message}`
1502
1272
  }]
1503
1273
  }
1504
1274
  };
1505
1275
  }
1506
1276
  },
1507
- pro_system_clear_cache: async (args) => {
1277
+ pro_system_cron_run: async (args) => {
1508
1278
  try {
1509
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/system/clear-cache', args);
1279
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/system/cron/run', args);
1510
1280
  return {
1511
1281
  toolResult: {
1512
1282
  content: [{
@@ -1522,40 +1292,16 @@ export const fluentMcpProHandlers = {
1522
1292
  isError: true,
1523
1293
  content: [{
1524
1294
  type: 'text',
1525
- text: `Error clearing cache: ${error.message}`
1295
+ text: `Error running cron job: ${error.message}`
1526
1296
  }]
1527
1297
  }
1528
1298
  };
1529
1299
  }
1530
1300
  },
1531
- // Config Handlers
1532
- pro_config_wp_config: async (args) => {
1533
- try {
1534
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/config/wp-config');
1535
- return {
1536
- toolResult: {
1537
- content: [{
1538
- type: 'text',
1539
- text: JSON.stringify(response, null, 2)
1540
- }]
1541
- }
1542
- };
1543
- }
1544
- catch (error) {
1545
- return {
1546
- toolResult: {
1547
- isError: true,
1548
- content: [{
1549
- type: 'text',
1550
- text: `Error reading wp-config.php: ${error.message}`
1551
- }]
1552
- }
1553
- };
1554
- }
1555
- },
1556
- pro_config_htaccess: async (args) => {
1301
+ // WooCommerce Handlers
1302
+ pro_wc_product_list: async (args) => {
1557
1303
  try {
1558
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/config/htaccess');
1304
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wc/products', args);
1559
1305
  return {
1560
1306
  toolResult: {
1561
1307
  content: [{
@@ -1571,16 +1317,15 @@ export const fluentMcpProHandlers = {
1571
1317
  isError: true,
1572
1318
  content: [{
1573
1319
  type: 'text',
1574
- text: `Error reading .htaccess: ${error.message}`
1320
+ text: `Error listing products: ${error.message}`
1575
1321
  }]
1576
1322
  }
1577
1323
  };
1578
1324
  }
1579
1325
  },
1580
- // WooCommerce Handlers
1581
- pro_wc_products_list: async (args) => {
1326
+ pro_wc_product_get: async (args) => {
1582
1327
  try {
1583
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wc/products', args);
1328
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/power/wc/products/${args.id}`);
1584
1329
  return {
1585
1330
  toolResult: {
1586
1331
  content: [{
@@ -1596,13 +1341,13 @@ export const fluentMcpProHandlers = {
1596
1341
  isError: true,
1597
1342
  content: [{
1598
1343
  type: 'text',
1599
- text: `Error listing products: ${error.message}`
1344
+ text: `Error getting product: ${error.message}`
1600
1345
  }]
1601
1346
  }
1602
1347
  };
1603
1348
  }
1604
1349
  },
1605
- pro_wc_products_create: async (args) => {
1350
+ pro_wc_product_create: async (args) => {
1606
1351
  try {
1607
1352
  const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wc/products', args);
1608
1353
  return {
@@ -1626,10 +1371,9 @@ export const fluentMcpProHandlers = {
1626
1371
  };
1627
1372
  }
1628
1373
  },
1629
- pro_wc_products_update: async (args) => {
1374
+ pro_wc_product_update: async (args) => {
1630
1375
  try {
1631
- const { id, ...updateData } = args;
1632
- const response = await makeWordPressRequest('PUT', `fc-manager/v1/power/wc/products/${id}`, updateData);
1376
+ const response = await makeWordPressRequest('PUT', `fc-manager/v1/power/wc/products/${args.id}`, args);
1633
1377
  return {
1634
1378
  toolResult: {
1635
1379
  content: [{
@@ -1651,10 +1395,9 @@ export const fluentMcpProHandlers = {
1651
1395
  };
1652
1396
  }
1653
1397
  },
1654
- pro_wc_products_delete: async (args) => {
1398
+ pro_wc_product_delete: async (args) => {
1655
1399
  try {
1656
- const { id, ...params } = args;
1657
- const response = await makeWordPressRequest('DELETE', `fc-manager/v1/power/wc/products/${id}`, params);
1400
+ const response = await makeWordPressRequest('DELETE', `fc-manager/v1/power/wc/products/${args.id}`, args);
1658
1401
  return {
1659
1402
  toolResult: {
1660
1403
  content: [{
@@ -1676,7 +1419,7 @@ export const fluentMcpProHandlers = {
1676
1419
  };
1677
1420
  }
1678
1421
  },
1679
- pro_wc_orders_list: async (args) => {
1422
+ pro_wc_order_list: async (args) => {
1680
1423
  try {
1681
1424
  const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wc/orders', args);
1682
1425
  return {
@@ -1700,10 +1443,9 @@ export const fluentMcpProHandlers = {
1700
1443
  };
1701
1444
  }
1702
1445
  },
1703
- pro_wc_orders_update: async (args) => {
1446
+ pro_wc_order_get: async (args) => {
1704
1447
  try {
1705
- const { id, ...updateData } = args;
1706
- const response = await makeWordPressRequest('PUT', `fc-manager/v1/power/wc/orders/${id}`, updateData);
1448
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/power/wc/orders/${args.id}`);
1707
1449
  return {
1708
1450
  toolResult: {
1709
1451
  content: [{
@@ -1719,16 +1461,15 @@ export const fluentMcpProHandlers = {
1719
1461
  isError: true,
1720
1462
  content: [{
1721
1463
  type: 'text',
1722
- text: `Error updating order: ${error.message}`
1464
+ text: `Error getting order: ${error.message}`
1723
1465
  }]
1724
1466
  }
1725
1467
  };
1726
1468
  }
1727
1469
  },
1728
- pro_wc_orders_delete: async (args) => {
1470
+ pro_wc_order_update: async (args) => {
1729
1471
  try {
1730
- const { id, ...params } = args;
1731
- const response = await makeWordPressRequest('DELETE', `fc-manager/v1/power/wc/orders/${id}`, params);
1472
+ const response = await makeWordPressRequest('PUT', `fc-manager/v1/power/wc/orders/${args.id}`, args);
1732
1473
  return {
1733
1474
  toolResult: {
1734
1475
  content: [{
@@ -1744,13 +1485,13 @@ export const fluentMcpProHandlers = {
1744
1485
  isError: true,
1745
1486
  content: [{
1746
1487
  type: 'text',
1747
- text: `Error deleting order: ${error.message}`
1488
+ text: `Error updating order: ${error.message}`
1748
1489
  }]
1749
1490
  }
1750
1491
  };
1751
1492
  }
1752
1493
  },
1753
- pro_wc_customers_list: async (args) => {
1494
+ pro_wc_customer_list: async (args) => {
1754
1495
  try {
1755
1496
  const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wc/customers', args);
1756
1497
  return {
@@ -1774,34 +1515,9 @@ export const fluentMcpProHandlers = {
1774
1515
  };
1775
1516
  }
1776
1517
  },
1777
- pro_wc_customers_create: async (args) => {
1778
- try {
1779
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wc/customers', args);
1780
- return {
1781
- toolResult: {
1782
- content: [{
1783
- type: 'text',
1784
- text: JSON.stringify(response, null, 2)
1785
- }]
1786
- }
1787
- };
1788
- }
1789
- catch (error) {
1790
- return {
1791
- toolResult: {
1792
- isError: true,
1793
- content: [{
1794
- type: 'text',
1795
- text: `Error creating customer: ${error.message}`
1796
- }]
1797
- }
1798
- };
1799
- }
1800
- },
1801
- pro_wc_customers_update: async (args) => {
1518
+ pro_wc_customer_get: async (args) => {
1802
1519
  try {
1803
- const { id, ...updateData } = args;
1804
- const response = await makeWordPressRequest('PUT', `fc-manager/v1/power/wc/customers/${id}`, updateData);
1520
+ const response = await makeWordPressRequest('GET', `fc-manager/v1/power/wc/customers/${args.id}`);
1805
1521
  return {
1806
1522
  toolResult: {
1807
1523
  content: [{
@@ -1817,16 +1533,15 @@ export const fluentMcpProHandlers = {
1817
1533
  isError: true,
1818
1534
  content: [{
1819
1535
  type: 'text',
1820
- text: `Error updating customer: ${error.message}`
1536
+ text: `Error getting customer: ${error.message}`
1821
1537
  }]
1822
1538
  }
1823
1539
  };
1824
1540
  }
1825
1541
  },
1826
- pro_wc_customers_delete: async (args) => {
1542
+ pro_wc_reports: async (args) => {
1827
1543
  try {
1828
- const { id, ...params } = args;
1829
- const response = await makeWordPressRequest('DELETE', `fc-manager/v1/power/wc/customers/${id}`, params);
1544
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wc/reports', args);
1830
1545
  return {
1831
1546
  toolResult: {
1832
1547
  content: [{
@@ -1842,15 +1557,15 @@ export const fluentMcpProHandlers = {
1842
1557
  isError: true,
1843
1558
  content: [{
1844
1559
  type: 'text',
1845
- text: `Error deleting customer: ${error.message}`
1560
+ text: `Error getting reports: ${error.message}`
1846
1561
  }]
1847
1562
  }
1848
1563
  };
1849
1564
  }
1850
1565
  },
1851
- pro_wc_settings_get: async (args) => {
1566
+ pro_wc_coupon_list: async (args) => {
1852
1567
  try {
1853
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wc/settings', args);
1568
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/power/wc/coupons', args);
1854
1569
  return {
1855
1570
  toolResult: {
1856
1571
  content: [{
@@ -1866,15 +1581,15 @@ export const fluentMcpProHandlers = {
1866
1581
  isError: true,
1867
1582
  content: [{
1868
1583
  type: 'text',
1869
- text: `Error getting WooCommerce settings: ${error.message}`
1584
+ text: `Error listing coupons: ${error.message}`
1870
1585
  }]
1871
1586
  }
1872
1587
  };
1873
1588
  }
1874
1589
  },
1875
- pro_wc_settings_update: async (args) => {
1590
+ pro_wc_coupon_create: async (args) => {
1876
1591
  try {
1877
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wc/settings', args);
1592
+ const response = await makeWordPressRequest('POST', 'fc-manager/v1/power/wc/coupons', args);
1878
1593
  return {
1879
1594
  toolResult: {
1880
1595
  content: [{
@@ -1890,7 +1605,7 @@ export const fluentMcpProHandlers = {
1890
1605
  isError: true,
1891
1606
  content: [{
1892
1607
  type: 'text',
1893
- text: `Error updating WooCommerce settings: ${error.message}`
1608
+ text: `Error creating coupon: ${error.message}`
1894
1609
  }]
1895
1610
  }
1896
1611
  };