@wplaunchify/ml-mcp-server 2.7.12 → 2.7.15

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.
@@ -1,6 +1,23 @@
1
1
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
2
  export declare const debugTools: Tool[];
3
3
  export declare const debugHandlers: {
4
+ fmcp_get_site_context: () => Promise<{
5
+ toolResult: {
6
+ content: {
7
+ type: string;
8
+ text: string;
9
+ }[];
10
+ isError?: undefined;
11
+ };
12
+ } | {
13
+ toolResult: {
14
+ isError: boolean;
15
+ content: {
16
+ type: string;
17
+ text: string;
18
+ }[];
19
+ };
20
+ }>;
4
21
  debug_options: (args: any) => Promise<{
5
22
  toolResult: {
6
23
  content: {
@@ -7,8 +7,14 @@ import { z } from 'zod';
7
7
  // Zod Schema Definitions
8
8
  const debugOptionsSchema = z.object({});
9
9
  const debugFluentCRMSchema = z.object({});
10
+ const siteContextSchema = z.object({});
10
11
  // Tool Definitions
11
12
  export const debugTools = [
13
+ {
14
+ name: 'fmcp_get_site_context',
15
+ description: 'Site-wide FluentMCP context: installed products, versions, counts, ENABLED_TOOLS categories, discovery URLs. Call first on a new site.',
16
+ inputSchema: { type: 'object', properties: siteContextSchema.shape }
17
+ },
12
18
  {
13
19
  name: 'debug_options',
14
20
  description: 'Debug endpoint to find FluentCommunity option names and values',
@@ -22,6 +28,15 @@ export const debugTools = [
22
28
  ];
23
29
  // Tool Handlers
24
30
  export const debugHandlers = {
31
+ fmcp_get_site_context: async () => {
32
+ try {
33
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/mcp/site-context');
34
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
35
+ }
36
+ catch (error) {
37
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
38
+ }
39
+ },
25
40
  debug_options: async (args) => {
26
41
  try {
27
42
  const response = await makeWordPressRequest('GET', 'fc-manager/v1/debug/options');
@@ -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
@@ -344,6 +414,121 @@ export const fluentCRMTools = [
344
414
  description: 'Delete a note or activity from a FluentCRM contact.',
345
415
  inputSchema: { type: 'object', properties: deleteNoteSchema.shape }
346
416
  },
417
+ {
418
+ name: 'fcrm_get_crm_context',
419
+ description: 'FluentCRM context: versions, counts, contact statuses, note types, custom fields schema, canonical /fcrm endpoints.',
420
+ inputSchema: { type: 'object', properties: z.object({}).shape }
421
+ },
422
+ {
423
+ name: 'fcrm_estimate_contacts',
424
+ description: 'Count FluentCRM contacts matching filters without loading full list (same filters as fcrm_list_contacts).',
425
+ inputSchema: { type: 'object', properties: listContactsSchema.shape }
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
+ },
347
532
  ];
348
533
  // ==================== TOOL HANDLERS ====================
349
534
  export const fluentCRMHandlers = {
@@ -607,6 +792,16 @@ export const fluentCRMHandlers = {
607
792
  }
608
793
  },
609
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) => {
610
805
  try {
611
806
  const { id, ...data } = args;
612
807
  const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/campaigns/${id}`, data);
@@ -616,6 +811,15 @@ export const fluentCRMHandlers = {
616
811
  return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
617
812
  }
618
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
+ },
619
823
  fcrm_get_campaign_stats: async (args) => {
620
824
  try {
621
825
  const response = await makeWordPressRequest('GET', `fc-manager/v1/fcrm/campaigns/${args.id}/stats`);
@@ -748,8 +952,238 @@ export const fluentCRMHandlers = {
748
952
  },
749
953
  fcrm_delete_note: async (args) => {
750
954
  try {
751
- const { id, note_id } = args;
752
- const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`);
955
+ const { id, note_id, ...rest } = args;
956
+ const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`, rest);
957
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
958
+ }
959
+ catch (error) {
960
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
961
+ }
962
+ },
963
+ fcrm_get_crm_context: async () => {
964
+ try {
965
+ const response = await makeWordPressRequest('GET', 'fc-manager/v1/fcrm/context');
966
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
967
+ }
968
+ catch (error) {
969
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
970
+ }
971
+ },
972
+ fcrm_estimate_contacts: async (args) => {
973
+ try {
974
+ const params = new URLSearchParams();
975
+ if (args.search)
976
+ params.append('search', args.search);
977
+ if (args.status)
978
+ params.append('status', args.status);
979
+ const q = params.toString();
980
+ const path = 'fc-manager/v1/fcrm/contacts/estimate' + (q ? `?${q}` : '');
981
+ const response = await makeWordPressRequest('GET', path);
982
+ return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
983
+ }
984
+ catch (error) {
985
+ return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
986
+ }
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);
753
1187
  return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
754
1188
  }
755
1189
  catch (error) {
@@ -40,6 +40,7 @@ const toolCategories = {
40
40
  ...mlImageEditorTools, // AI image generation via ML Image Editor
41
41
  ...mlMediaHubTools, // Image search & icon import via ML Media Hub P2P
42
42
  ...mlSocialTools, // Social media publishing via ML Social
43
+ ...debugTools, // fmcp_get_site_context (v2.7.0)
43
44
  ...fluentMcpProTools // FluentMCP Pro (WooCommerce, file system, database, etc.)
44
45
  ],
45
46
  // Full FluentCommunity (91 tools) - legacy support
@@ -97,6 +98,7 @@ const handlerCategories = {
97
98
  ...mlImageEditorHandlers, // AI image generation
98
99
  ...mlMediaHubHandlers, // Image search & icon import
99
100
  ...mlSocialHandlers, // Social media publishing
101
+ ...debugHandlers, // fmcp_get_site_context
100
102
  ...fluentMcpProHandlers // FluentMCP Pro (WooCommerce, file system, database, etc.)
101
103
  },
102
104
  fluentcommunity: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wplaunchify/ml-mcp-server",
3
- "version": "2.7.12",
3
+ "version": "2.7.15",
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",