@wplaunchify/ml-mcp-server 2.7.13 → 2.7.16
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.
|
@@ -73,7 +73,7 @@ export const fluentCartAnalyticsHandlers = {
|
|
|
73
73
|
params.date_from = args.date_from;
|
|
74
74
|
if (args.date_to)
|
|
75
75
|
params.date_to = args.date_to;
|
|
76
|
-
const response = await makeWordPressRequest('GET', 'fc-manager/v1/
|
|
76
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/reports/overview', params);
|
|
77
77
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
78
78
|
}
|
|
79
79
|
catch (error) {
|
|
@@ -82,7 +82,7 @@ export const fluentCartAnalyticsHandlers = {
|
|
|
82
82
|
},
|
|
83
83
|
fcart_get_quick_stats: async (args) => {
|
|
84
84
|
try {
|
|
85
|
-
const response = await makeWordPressRequest('GET', 'fc-manager/v1/
|
|
85
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/reports/quick-stats');
|
|
86
86
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
87
87
|
}
|
|
88
88
|
catch (error) {
|
|
@@ -91,7 +91,7 @@ export const fluentCartAnalyticsHandlers = {
|
|
|
91
91
|
},
|
|
92
92
|
fcart_get_dashboard_stats: async (args) => {
|
|
93
93
|
try {
|
|
94
|
-
const response = await makeWordPressRequest('GET', 'fc-manager/v1/
|
|
94
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/dashboard/stats');
|
|
95
95
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
96
96
|
}
|
|
97
97
|
catch (error) {
|
|
@@ -107,7 +107,7 @@ export const fluentCartAnalyticsHandlers = {
|
|
|
107
107
|
params.date_to = args.date_to;
|
|
108
108
|
if (args.type)
|
|
109
109
|
params.type = args.type;
|
|
110
|
-
const response = await makeWordPressRequest('GET', 'fc-manager/v1/
|
|
110
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/analytics', params);
|
|
111
111
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
112
112
|
}
|
|
113
113
|
catch (error) {
|
|
@@ -116,7 +116,7 @@ export const fluentCartAnalyticsHandlers = {
|
|
|
116
116
|
},
|
|
117
117
|
fcart_get_settings: async (args) => {
|
|
118
118
|
try {
|
|
119
|
-
const response = await makeWordPressRequest('GET', 'fc-manager/v1/
|
|
119
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/settings');
|
|
120
120
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
121
121
|
}
|
|
122
122
|
catch (error) {
|
|
@@ -130,7 +130,7 @@ export const fluentCartAnalyticsHandlers = {
|
|
|
130
130
|
params.per_page = args.per_page;
|
|
131
131
|
if (args.page)
|
|
132
132
|
params.page = args.page;
|
|
133
|
-
const response = await makeWordPressRequest('GET', 'fc-manager/v1/
|
|
133
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/tax/classes', params);
|
|
134
134
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
135
135
|
}
|
|
136
136
|
catch (error) {
|
|
@@ -139,7 +139,7 @@ export const fluentCartAnalyticsHandlers = {
|
|
|
139
139
|
},
|
|
140
140
|
fcart_list_shipping_zones: async (args) => {
|
|
141
141
|
try {
|
|
142
|
-
const response = await makeWordPressRequest('GET', 'fc-manager/v1/
|
|
142
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcart/shipping/zones');
|
|
143
143
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
144
144
|
}
|
|
145
145
|
catch (error) {
|
|
@@ -120,6 +120,76 @@ const deleteNoteSchema = z.object({
|
|
|
120
120
|
id: z.number(),
|
|
121
121
|
note_id: z.number(),
|
|
122
122
|
});
|
|
123
|
+
const dryRunSchema = z.object({ dry_run: z.boolean().optional() });
|
|
124
|
+
const upsertContactSchema = createContactSchema.extend({
|
|
125
|
+
id: z.number().optional(),
|
|
126
|
+
force_update: z.boolean().optional(),
|
|
127
|
+
detach_tags: z.array(z.union([z.number(), z.string()])).optional(),
|
|
128
|
+
detach_lists: z.array(z.union([z.number(), z.string()])).optional(),
|
|
129
|
+
});
|
|
130
|
+
const bulkUpsertContactsSchema = z.object({
|
|
131
|
+
contacts: z.array(z.record(z.any())),
|
|
132
|
+
force_update: z.boolean().optional(),
|
|
133
|
+
double_optin: z.boolean().optional(),
|
|
134
|
+
dry_run: z.boolean().optional(),
|
|
135
|
+
});
|
|
136
|
+
const applySegmentsSchema = z.object({
|
|
137
|
+
contact_ids: z.array(z.number()).optional(),
|
|
138
|
+
subscriber_ids: z.array(z.number()).optional(),
|
|
139
|
+
search: z.string().optional(),
|
|
140
|
+
status: fluentCrmContactStatusSchema.optional(),
|
|
141
|
+
attach_tags: z.array(z.union([z.number(), z.string()])).optional(),
|
|
142
|
+
detach_tags: z.array(z.union([z.number(), z.string()])).optional(),
|
|
143
|
+
tags: z.array(z.union([z.number(), z.string()])).optional(),
|
|
144
|
+
attach_lists: z.array(z.union([z.number(), z.string()])).optional(),
|
|
145
|
+
detach_lists: z.array(z.union([z.number(), z.string()])).optional(),
|
|
146
|
+
lists: z.array(z.union([z.number(), z.string()])).optional(),
|
|
147
|
+
dry_run: z.boolean().optional(),
|
|
148
|
+
});
|
|
149
|
+
const upsertCampaignSchema = createCampaignSchema.extend({
|
|
150
|
+
id: z.number().optional(),
|
|
151
|
+
});
|
|
152
|
+
const changeCampaignStatusSchema = z.object({
|
|
153
|
+
id: z.number(),
|
|
154
|
+
action: z.enum(['pause', 'resume', 'duplicate', 'schedule', 'send', 'delete']),
|
|
155
|
+
scheduled_at: z.string().optional(),
|
|
156
|
+
dry_run: z.boolean().optional(),
|
|
157
|
+
});
|
|
158
|
+
const sendTestEmailSchema = z.object({
|
|
159
|
+
id: z.number(),
|
|
160
|
+
email: z.string().email().optional(),
|
|
161
|
+
});
|
|
162
|
+
const sendEmailToContactSchema = z.object({
|
|
163
|
+
id: z.number(),
|
|
164
|
+
campaign: z.record(z.any()),
|
|
165
|
+
});
|
|
166
|
+
const listAutomationsSchema = z.object({
|
|
167
|
+
page: z.number().optional(),
|
|
168
|
+
per_page: z.number().optional(),
|
|
169
|
+
search: z.string().optional(),
|
|
170
|
+
});
|
|
171
|
+
const getSequenceSchema = z.object({
|
|
172
|
+
id: z.number(),
|
|
173
|
+
include_email_bodies: z.boolean().optional(),
|
|
174
|
+
});
|
|
175
|
+
const manageSequenceSubscribersSchema = z.object({
|
|
176
|
+
id: z.number(),
|
|
177
|
+
action: z.enum(['subscribe', 'unsubscribe']).optional(),
|
|
178
|
+
contact_ids: z.array(z.number()).optional(),
|
|
179
|
+
subscriber_ids: z.array(z.number()).optional(),
|
|
180
|
+
subscribers: z.record(z.any()).optional(),
|
|
181
|
+
dry_run: z.boolean().optional(),
|
|
182
|
+
});
|
|
183
|
+
const updateAutomationStatusSchema = z.object({
|
|
184
|
+
id: z.number(),
|
|
185
|
+
contact_id: z.number(),
|
|
186
|
+
status: z.string(),
|
|
187
|
+
});
|
|
188
|
+
const previewDeleteIdSchema = z.object({ id: z.number() });
|
|
189
|
+
const previewDeleteNoteSchema = z.object({
|
|
190
|
+
id: z.number(),
|
|
191
|
+
note_id: z.number(),
|
|
192
|
+
});
|
|
123
193
|
// ==================== TOOL DEFINITIONS ====================
|
|
124
194
|
export const fluentCRMTools = [
|
|
125
195
|
// Contact Management
|
|
@@ -354,6 +424,111 @@ export const fluentCRMTools = [
|
|
|
354
424
|
description: 'Count FluentCRM contacts matching filters without loading full list (same filters as fcrm_list_contacts).',
|
|
355
425
|
inputSchema: { type: 'object', properties: listContactsSchema.shape }
|
|
356
426
|
},
|
|
427
|
+
{
|
|
428
|
+
name: 'fcrm_upsert_contact',
|
|
429
|
+
description: 'Create or update a FluentCRM contact by id or email (single upsert).',
|
|
430
|
+
inputSchema: { type: 'object', properties: upsertContactSchema.shape }
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
name: 'fcrm_bulk_upsert_contacts',
|
|
434
|
+
description: 'Batch create/update up to 500 contacts. Set dry_run true to preview only.',
|
|
435
|
+
inputSchema: { type: 'object', properties: bulkUpsertContactsSchema.shape }
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: 'fcrm_apply_segments_to_contacts',
|
|
439
|
+
description: 'Bulk attach/detach tags and lists by contact IDs or search/status filters. dry_run previews ID lists.',
|
|
440
|
+
inputSchema: { type: 'object', properties: applySegmentsSchema.shape }
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
name: 'fcrm_upsert_campaign',
|
|
444
|
+
description: 'Create or update a FluentCRM campaign (pass id in body to update).',
|
|
445
|
+
inputSchema: { type: 'object', properties: upsertCampaignSchema.shape }
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: 'fcrm_change_campaign_status',
|
|
449
|
+
description: 'Change campaign state: pause, resume, duplicate, schedule, send, or delete.',
|
|
450
|
+
inputSchema: { type: 'object', properties: changeCampaignStatusSchema.shape }
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
name: 'fcrm_send_test_email',
|
|
454
|
+
description: 'Send a test copy of a campaign email.',
|
|
455
|
+
inputSchema: { type: 'object', properties: sendTestEmailSchema.shape }
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: 'fcrm_send_email_to_contact',
|
|
459
|
+
description: 'Send a one-off custom email to one contact (campaign object with subject and body).',
|
|
460
|
+
inputSchema: { type: 'object', properties: sendEmailToContactSchema.shape }
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
name: 'fcrm_preview_delete_contact',
|
|
464
|
+
description: 'Preview deleting a contact (dry run, no changes).',
|
|
465
|
+
inputSchema: { type: 'object', properties: previewDeleteIdSchema.shape }
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
name: 'fcrm_preview_delete_list',
|
|
469
|
+
description: 'Preview deleting a list (dry run).',
|
|
470
|
+
inputSchema: { type: 'object', properties: previewDeleteIdSchema.shape }
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
name: 'fcrm_preview_delete_tag',
|
|
474
|
+
description: 'Preview deleting a tag (dry run).',
|
|
475
|
+
inputSchema: { type: 'object', properties: previewDeleteIdSchema.shape }
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
name: 'fcrm_preview_delete_note',
|
|
479
|
+
description: 'Preview deleting a contact note (dry run).',
|
|
480
|
+
inputSchema: { type: 'object', properties: previewDeleteNoteSchema.shape }
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
name: 'fcrm_list_automations',
|
|
484
|
+
description: 'List FluentCRM automation funnels.',
|
|
485
|
+
inputSchema: { type: 'object', properties: listAutomationsSchema.shape }
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
name: 'fcrm_get_automation',
|
|
489
|
+
description: 'Get a FluentCRM automation funnel by ID.',
|
|
490
|
+
inputSchema: { type: 'object', properties: campaignIdSchema.shape }
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
name: 'fcrm_list_funnel_subscribers',
|
|
494
|
+
description: 'List contacts enrolled in an automation funnel.',
|
|
495
|
+
inputSchema: { type: 'object', properties: z.object({
|
|
496
|
+
id: z.number(),
|
|
497
|
+
page: z.number().optional(),
|
|
498
|
+
per_page: z.number().optional(),
|
|
499
|
+
search: z.string().optional(),
|
|
500
|
+
}).shape }
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
name: 'fcrm_update_contact_automation_status',
|
|
504
|
+
description: 'Update a contact status inside an automation funnel.',
|
|
505
|
+
inputSchema: { type: 'object', properties: updateAutomationStatusSchema.shape }
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: 'fcrm_list_sequences',
|
|
509
|
+
description: 'List email sequences (FluentCampaign Pro).',
|
|
510
|
+
inputSchema: { type: 'object', properties: listAutomationsSchema.shape }
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: 'fcrm_get_sequence',
|
|
514
|
+
description: 'Get an email sequence by ID. include_email_bodies loads sequence emails.',
|
|
515
|
+
inputSchema: { type: 'object', properties: getSequenceSchema.shape }
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
name: 'fcrm_manage_sequence_subscribers',
|
|
519
|
+
description: 'Subscribe or unsubscribe contacts on a sequence (max 5000 IDs; dry_run for ID preview).',
|
|
520
|
+
inputSchema: { type: 'object', properties: manageSequenceSubscribersSchema.shape }
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
name: 'fcrm_estimate_dynamic_segment',
|
|
524
|
+
description: 'Count contacts matching segment filters without returning rows (FluentCampaign Pro).',
|
|
525
|
+
inputSchema: { type: 'object', properties: z.object({
|
|
526
|
+
subscribers: z.record(z.any()).optional(),
|
|
527
|
+
sending_filter: z.string().optional(),
|
|
528
|
+
dynamic_segment: z.record(z.any()).optional(),
|
|
529
|
+
advanced_filters: z.array(z.any()).optional(),
|
|
530
|
+
}).shape }
|
|
531
|
+
},
|
|
357
532
|
];
|
|
358
533
|
// ==================== TOOL HANDLERS ====================
|
|
359
534
|
export const fluentCRMHandlers = {
|
|
@@ -617,6 +792,16 @@ export const fluentCRMHandlers = {
|
|
|
617
792
|
}
|
|
618
793
|
},
|
|
619
794
|
fcrm_send_campaign: async (args) => {
|
|
795
|
+
try {
|
|
796
|
+
const { id, ...data } = args;
|
|
797
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcrm/campaigns/${id}/send`, data);
|
|
798
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
799
|
+
}
|
|
800
|
+
catch (error) {
|
|
801
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
fcrm_update_campaign: async (args) => {
|
|
620
805
|
try {
|
|
621
806
|
const { id, ...data } = args;
|
|
622
807
|
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/campaigns/${id}`, data);
|
|
@@ -626,6 +811,15 @@ export const fluentCRMHandlers = {
|
|
|
626
811
|
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
627
812
|
}
|
|
628
813
|
},
|
|
814
|
+
fcrm_delete_campaign: async (args) => {
|
|
815
|
+
try {
|
|
816
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/campaigns/${args.id}`);
|
|
817
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
818
|
+
}
|
|
819
|
+
catch (error) {
|
|
820
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
821
|
+
}
|
|
822
|
+
},
|
|
629
823
|
fcrm_get_campaign_stats: async (args) => {
|
|
630
824
|
try {
|
|
631
825
|
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/campaigns/${args.id}/stats`);
|
|
@@ -791,4 +985,209 @@ export const fluentCRMHandlers = {
|
|
|
791
985
|
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
792
986
|
}
|
|
793
987
|
},
|
|
988
|
+
fcrm_upsert_contact: async (args) => {
|
|
989
|
+
try {
|
|
990
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/contacts/upsert', args);
|
|
991
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
992
|
+
}
|
|
993
|
+
catch (error) {
|
|
994
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
fcrm_bulk_upsert_contacts: async (args) => {
|
|
998
|
+
try {
|
|
999
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/contacts/bulk-upsert', args);
|
|
1000
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1001
|
+
}
|
|
1002
|
+
catch (error) {
|
|
1003
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
fcrm_apply_segments_to_contacts: async (args) => {
|
|
1007
|
+
try {
|
|
1008
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/contacts/apply-segments', args);
|
|
1009
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1010
|
+
}
|
|
1011
|
+
catch (error) {
|
|
1012
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
fcrm_upsert_campaign: async (args) => {
|
|
1016
|
+
try {
|
|
1017
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/campaigns/upsert', args);
|
|
1018
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1019
|
+
}
|
|
1020
|
+
catch (error) {
|
|
1021
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
fcrm_change_campaign_status: async (args) => {
|
|
1025
|
+
try {
|
|
1026
|
+
const { id, ...data } = args;
|
|
1027
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcrm/campaigns/${id}/status`, data);
|
|
1028
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1029
|
+
}
|
|
1030
|
+
catch (error) {
|
|
1031
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
fcrm_send_test_email: async (args) => {
|
|
1035
|
+
try {
|
|
1036
|
+
const { id, ...data } = args;
|
|
1037
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcrm/campaigns/${id}/send-test`, data);
|
|
1038
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1039
|
+
}
|
|
1040
|
+
catch (error) {
|
|
1041
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
fcrm_send_email_to_contact: async (args) => {
|
|
1045
|
+
try {
|
|
1046
|
+
const { id, campaign } = args;
|
|
1047
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcrm/contacts/${id}/send-email`, { campaign });
|
|
1048
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1049
|
+
}
|
|
1050
|
+
catch (error) {
|
|
1051
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
fcrm_preview_delete_contact: async (args) => {
|
|
1055
|
+
try {
|
|
1056
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/contacts/${args.id}/delete-preview`);
|
|
1057
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1058
|
+
}
|
|
1059
|
+
catch (error) {
|
|
1060
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
fcrm_preview_delete_list: async (args) => {
|
|
1064
|
+
try {
|
|
1065
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/lists/${args.id}/delete-preview`);
|
|
1066
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1067
|
+
}
|
|
1068
|
+
catch (error) {
|
|
1069
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
fcrm_preview_delete_tag: async (args) => {
|
|
1073
|
+
try {
|
|
1074
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/tags/${args.id}/delete-preview`);
|
|
1075
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1076
|
+
}
|
|
1077
|
+
catch (error) {
|
|
1078
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
fcrm_preview_delete_note: async (args) => {
|
|
1082
|
+
try {
|
|
1083
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/contacts/${args.id}/notes/${args.note_id}/delete-preview`);
|
|
1084
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1085
|
+
}
|
|
1086
|
+
catch (error) {
|
|
1087
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
fcrm_list_automations: async (args) => {
|
|
1091
|
+
try {
|
|
1092
|
+
const params = new URLSearchParams();
|
|
1093
|
+
if (args.page)
|
|
1094
|
+
params.append('page', String(args.page));
|
|
1095
|
+
if (args.per_page)
|
|
1096
|
+
params.append('per_page', String(args.per_page));
|
|
1097
|
+
if (args.search)
|
|
1098
|
+
params.append('search', args.search);
|
|
1099
|
+
const q = params.toString();
|
|
1100
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/automations${q ? `?${q}` : ''}`);
|
|
1101
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1102
|
+
}
|
|
1103
|
+
catch (error) {
|
|
1104
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
fcrm_get_automation: async (args) => {
|
|
1108
|
+
try {
|
|
1109
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/automations/${args.id}`);
|
|
1110
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1111
|
+
}
|
|
1112
|
+
catch (error) {
|
|
1113
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
fcrm_list_funnel_subscribers: async (args) => {
|
|
1117
|
+
try {
|
|
1118
|
+
const { id, ...rest } = args;
|
|
1119
|
+
const params = new URLSearchParams();
|
|
1120
|
+
if (rest.page)
|
|
1121
|
+
params.append('page', String(rest.page));
|
|
1122
|
+
if (rest.per_page)
|
|
1123
|
+
params.append('per_page', String(rest.per_page));
|
|
1124
|
+
if (rest.search)
|
|
1125
|
+
params.append('search', rest.search);
|
|
1126
|
+
const q = params.toString();
|
|
1127
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/automations/${id}/subscribers${q ? `?${q}` : ''}`);
|
|
1128
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1129
|
+
}
|
|
1130
|
+
catch (error) {
|
|
1131
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
fcrm_update_contact_automation_status: async (args) => {
|
|
1135
|
+
try {
|
|
1136
|
+
const { id, contact_id, status } = args;
|
|
1137
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/automations/${id}/contacts/${contact_id}/status`, { status });
|
|
1138
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1139
|
+
}
|
|
1140
|
+
catch (error) {
|
|
1141
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
fcrm_list_sequences: async (args) => {
|
|
1145
|
+
try {
|
|
1146
|
+
const params = new URLSearchParams();
|
|
1147
|
+
if (args.page)
|
|
1148
|
+
params.append('page', String(args.page));
|
|
1149
|
+
if (args.per_page)
|
|
1150
|
+
params.append('per_page', String(args.per_page));
|
|
1151
|
+
if (args.search)
|
|
1152
|
+
params.append('search', args.search);
|
|
1153
|
+
const q = params.toString();
|
|
1154
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/sequences${q ? `?${q}` : ''}`);
|
|
1155
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1156
|
+
}
|
|
1157
|
+
catch (error) {
|
|
1158
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1159
|
+
}
|
|
1160
|
+
},
|
|
1161
|
+
fcrm_get_sequence: async (args) => {
|
|
1162
|
+
try {
|
|
1163
|
+
const params = new URLSearchParams();
|
|
1164
|
+
if (args.include_email_bodies)
|
|
1165
|
+
params.append('include_email_bodies', 'true');
|
|
1166
|
+
const q = params.toString();
|
|
1167
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/sequences/${args.id}${q ? `?${q}` : ''}`);
|
|
1168
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1169
|
+
}
|
|
1170
|
+
catch (error) {
|
|
1171
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
fcrm_manage_sequence_subscribers: async (args) => {
|
|
1175
|
+
try {
|
|
1176
|
+
const { id, ...data } = args;
|
|
1177
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcrm/sequences/${id}/subscribers`, data);
|
|
1178
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1179
|
+
}
|
|
1180
|
+
catch (error) {
|
|
1181
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1182
|
+
}
|
|
1183
|
+
},
|
|
1184
|
+
fcrm_estimate_dynamic_segment: async (args) => {
|
|
1185
|
+
try {
|
|
1186
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/fcrm/segments/estimate', args);
|
|
1187
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1188
|
+
}
|
|
1189
|
+
catch (error) {
|
|
1190
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1191
|
+
}
|
|
1192
|
+
},
|
|
794
1193
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wplaunchify/ml-mcp-server",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.16",
|
|
4
4
|
"description": "Universal MCP Server for WordPress + Fluent Suite (Community, CRM, Cart) + FluentMCP Pro. Comprehensive tools for AI-powered WordPress management via Claude, Cursor, and other MCP clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/server.js",
|