@wplaunchify/ml-mcp-server 2.7.10 → 2.7.12
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.
|
@@ -95,6 +95,31 @@ const createTemplateSchema = z.object({
|
|
|
95
95
|
email_subject: z.string().optional(),
|
|
96
96
|
design_template: z.enum(['simple', 'plain', 'classic', 'raw_classic', 'raw_html']).optional(),
|
|
97
97
|
});
|
|
98
|
+
// Note / Activity schemas
|
|
99
|
+
const noteTypeSchema = z.enum(['note', 'call', 'email', 'meeting', 'activity']);
|
|
100
|
+
const listNotesSchema = z.object({
|
|
101
|
+
id: z.number(),
|
|
102
|
+
per_page: z.number().optional(),
|
|
103
|
+
page: z.number().optional(),
|
|
104
|
+
type: noteTypeSchema.optional(),
|
|
105
|
+
});
|
|
106
|
+
const createNoteSchema = z.object({
|
|
107
|
+
id: z.number(),
|
|
108
|
+
title: z.string().optional(),
|
|
109
|
+
description: z.string().optional(),
|
|
110
|
+
type: noteTypeSchema.optional(),
|
|
111
|
+
});
|
|
112
|
+
const updateNoteSchema = z.object({
|
|
113
|
+
id: z.number(),
|
|
114
|
+
note_id: z.number(),
|
|
115
|
+
title: z.string().optional(),
|
|
116
|
+
description: z.string().optional(),
|
|
117
|
+
type: noteTypeSchema.optional(),
|
|
118
|
+
});
|
|
119
|
+
const deleteNoteSchema = z.object({
|
|
120
|
+
id: z.number(),
|
|
121
|
+
note_id: z.number(),
|
|
122
|
+
});
|
|
98
123
|
// ==================== TOOL DEFINITIONS ====================
|
|
99
124
|
export const fluentCRMTools = [
|
|
100
125
|
// Contact Management
|
|
@@ -298,6 +323,27 @@ export const fluentCRMTools = [
|
|
|
298
323
|
description: 'Delete a FluentCRM email template',
|
|
299
324
|
inputSchema: { type: 'object', properties: z.object({ id: z.number() }).shape }
|
|
300
325
|
},
|
|
326
|
+
// Contact Notes / Activities
|
|
327
|
+
{
|
|
328
|
+
name: 'fcrm_list_notes',
|
|
329
|
+
description: 'List notes and activities for a FluentCRM contact. Filter by type: note, call, email, meeting, activity.',
|
|
330
|
+
inputSchema: { type: 'object', properties: listNotesSchema.shape }
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: 'fcrm_create_note',
|
|
334
|
+
description: 'Create a note or activity on a FluentCRM contact. Supports HTML in description.',
|
|
335
|
+
inputSchema: { type: 'object', properties: createNoteSchema.shape }
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: 'fcrm_update_note',
|
|
339
|
+
description: 'Update a note or activity on a FluentCRM contact.',
|
|
340
|
+
inputSchema: { type: 'object', properties: updateNoteSchema.shape }
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: 'fcrm_delete_note',
|
|
344
|
+
description: 'Delete a note or activity from a FluentCRM contact.',
|
|
345
|
+
inputSchema: { type: 'object', properties: deleteNoteSchema.shape }
|
|
346
|
+
},
|
|
301
347
|
];
|
|
302
348
|
// ==================== TOOL HANDLERS ====================
|
|
303
349
|
export const fluentCRMHandlers = {
|
|
@@ -661,4 +707,53 @@ export const fluentCRMHandlers = {
|
|
|
661
707
|
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
662
708
|
}
|
|
663
709
|
},
|
|
710
|
+
// Contact Notes / Activities handlers
|
|
711
|
+
fcrm_list_notes: async (args) => {
|
|
712
|
+
try {
|
|
713
|
+
const params = new URLSearchParams();
|
|
714
|
+
if (args.per_page)
|
|
715
|
+
params.append('per_page', args.per_page);
|
|
716
|
+
if (args.page)
|
|
717
|
+
params.append('page', args.page);
|
|
718
|
+
if (args.type)
|
|
719
|
+
params.append('type', args.type);
|
|
720
|
+
const q = params.toString();
|
|
721
|
+
const path = `fc-manager/v1/fcrm/contacts/${args.id}/notes` + (q ? `?${q}` : '');
|
|
722
|
+
const response = await makeWordPressRequest('GET', path);
|
|
723
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
724
|
+
}
|
|
725
|
+
catch (error) {
|
|
726
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
727
|
+
}
|
|
728
|
+
},
|
|
729
|
+
fcrm_create_note: async (args) => {
|
|
730
|
+
try {
|
|
731
|
+
const { id, ...data } = args;
|
|
732
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/fcrm/contacts/${id}/notes`, data);
|
|
733
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
734
|
+
}
|
|
735
|
+
catch (error) {
|
|
736
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
fcrm_update_note: async (args) => {
|
|
740
|
+
try {
|
|
741
|
+
const { id, note_id, ...data } = args;
|
|
742
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`, data);
|
|
743
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
744
|
+
}
|
|
745
|
+
catch (error) {
|
|
746
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
fcrm_delete_note: async (args) => {
|
|
750
|
+
try {
|
|
751
|
+
const { id, note_id } = args;
|
|
752
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/fcrm/contacts/${id}/notes/${note_id}`);
|
|
753
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
754
|
+
}
|
|
755
|
+
catch (error) {
|
|
756
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
757
|
+
}
|
|
758
|
+
},
|
|
664
759
|
};
|
|
@@ -8,10 +8,12 @@ export declare const mlCanvasTools: ({
|
|
|
8
8
|
title: z.ZodString;
|
|
9
9
|
html: z.ZodOptional<z.ZodString>;
|
|
10
10
|
css: z.ZodOptional<z.ZodString>;
|
|
11
|
+
post_type: z.ZodOptional<z.ZodEnum<["page", "post"]>>;
|
|
11
12
|
hideHeader: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
hideFooter: z.ZodOptional<z.ZodBoolean>;
|
|
13
14
|
canvasMode: z.ZodOptional<z.ZodBoolean>;
|
|
14
15
|
hideTitle: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
dequeueKadenceGlobal: z.ZodOptional<z.ZodBoolean>;
|
|
15
17
|
status: z.ZodOptional<z.ZodEnum<["draft", "publish"]>>;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
@@ -26,6 +28,7 @@ export declare const mlCanvasTools: ({
|
|
|
26
28
|
replace_html: z.ZodOptional<z.ZodString>;
|
|
27
29
|
find_css: z.ZodOptional<z.ZodString>;
|
|
28
30
|
replace_css: z.ZodOptional<z.ZodString>;
|
|
31
|
+
dequeueKadenceGlobal: z.ZodOptional<z.ZodBoolean>;
|
|
29
32
|
};
|
|
30
33
|
};
|
|
31
34
|
} | {
|
package/build/tools/ml-canvas.js
CHANGED
|
@@ -4,27 +4,30 @@ import { makeWordPressRequest } from '../wordpress.js';
|
|
|
4
4
|
export const mlCanvasTools = [
|
|
5
5
|
{
|
|
6
6
|
name: 'mlcanvas_create_page',
|
|
7
|
-
description: 'Create a custom HTML/CSS page using ML Canvas Block.
|
|
7
|
+
description: 'Create a custom HTML/CSS page using ML Canvas Block. IMPORTANT CSS RULES: (1) Do NOT generate <html> or <body> tags - start at your wrapper div. (2) Set backgrounds on .container (or your own class), NEVER on body. (3) Use class-based selectors (.hero h1) not bare elements (h1). For full custom pages, set hideHeader, hideFooter, hideTitle, canvasMode, and dequeueKadenceGlobal all to true.',
|
|
8
8
|
inputSchema: { type: 'object', properties: z.object({
|
|
9
9
|
title: z.string().describe('Page title (required)'),
|
|
10
|
-
html: z.string().optional().describe('Custom HTML content'),
|
|
11
|
-
css: z.string().optional().describe('Custom CSS styles'),
|
|
10
|
+
html: z.string().optional().describe('Custom HTML content. Start with a wrapper div like <div class="container">. Do NOT include <html> or <body> tags.'),
|
|
11
|
+
css: z.string().optional().describe('Custom CSS styles. Target .container for page backgrounds, NOT body. Use class-based selectors for headings.'),
|
|
12
|
+
post_type: z.enum(['page', 'post']).optional().describe('Content type: page (default) or post'),
|
|
12
13
|
hideHeader: z.boolean().optional().describe('Hide site header'),
|
|
13
14
|
hideFooter: z.boolean().optional().describe('Hide site footer'),
|
|
14
15
|
canvasMode: z.boolean().optional().describe('Full-width canvas mode (100% width, zero padding)'),
|
|
15
16
|
hideTitle: z.boolean().optional().describe('Hide page title/hero section'),
|
|
17
|
+
dequeueKadenceGlobal: z.boolean().optional().describe('Remove Kadence theme global CSS to prevent heading/color overrides. Recommended true for custom designs.'),
|
|
16
18
|
status: z.enum(['draft', 'publish']).optional().describe('Page status (default: draft)'),
|
|
17
19
|
}).shape },
|
|
18
20
|
},
|
|
19
21
|
{
|
|
20
22
|
name: 'mlcanvas_edit_page',
|
|
21
|
-
description: 'Surgical editing for ML Canvas pages - find/replace specific HTML/CSS snippets without rewriting entire page. Works on ANY post type with ML Canvas block.',
|
|
23
|
+
description: 'Surgical editing for ML Canvas pages - find/replace specific HTML/CSS snippets without rewriting entire page. Works on ANY post type with ML Canvas block. Can also toggle page settings like dequeueKadenceGlobal.',
|
|
22
24
|
inputSchema: { type: 'object', properties: z.object({
|
|
23
25
|
page_id: z.number().describe('Page/Post ID to edit (required)'),
|
|
24
26
|
find_html: z.string().optional().describe('HTML string to find and replace'),
|
|
25
27
|
replace_html: z.string().optional().describe('New HTML to replace with'),
|
|
26
28
|
find_css: z.string().optional().describe('CSS string to find and replace'),
|
|
27
29
|
replace_css: z.string().optional().describe('New CSS to replace with'),
|
|
30
|
+
dequeueKadenceGlobal: z.boolean().optional().describe('Remove Kadence theme global CSS on this page'),
|
|
28
31
|
}).shape },
|
|
29
32
|
},
|
|
30
33
|
{
|
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.12",
|
|
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",
|