@wplaunchify/ml-mcp-server 2.7.3 → 2.7.4

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,69 +0,0 @@
1
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
- import { z } from 'zod';
3
- declare const listPostsSchema: z.ZodObject<{
4
- space_id: z.ZodOptional<z.ZodNumber>;
5
- limit: z.ZodOptional<z.ZodNumber>;
6
- }, "strip", z.ZodTypeAny, {
7
- space_id?: number | undefined;
8
- limit?: number | undefined;
9
- }, {
10
- space_id?: number | undefined;
11
- limit?: number | undefined;
12
- }>;
13
- declare const listSpacesSchema: z.ZodObject<{
14
- limit: z.ZodOptional<z.ZodNumber>;
15
- search: z.ZodOptional<z.ZodString>;
16
- }, "strip", z.ZodTypeAny, {
17
- search?: string | undefined;
18
- limit?: number | undefined;
19
- }, {
20
- search?: string | undefined;
21
- limit?: number | undefined;
22
- }>;
23
- declare const createPostSchema: z.ZodObject<{
24
- space_id: z.ZodNumber;
25
- user_id: z.ZodNumber;
26
- message: z.ZodString;
27
- }, "strip", z.ZodTypeAny, {
28
- message: string;
29
- space_id: number;
30
- user_id: number;
31
- }, {
32
- message: string;
33
- space_id: number;
34
- user_id: number;
35
- }>;
36
- type ListPostsParams = z.infer<typeof listPostsSchema>;
37
- type ListSpacesParams = z.infer<typeof listSpacesSchema>;
38
- type CreatePostParams = z.infer<typeof createPostSchema>;
39
- export declare const fluentCommunityTools: Tool[];
40
- export declare const fluentCommunityHandlers: {
41
- fc_list_posts: (params: ListPostsParams) => Promise<{
42
- toolResult: {
43
- content: {
44
- type: string;
45
- text: string;
46
- }[];
47
- isError: boolean;
48
- };
49
- }>;
50
- fc_list_spaces: (params: ListSpacesParams) => Promise<{
51
- toolResult: {
52
- content: {
53
- type: string;
54
- text: string;
55
- }[];
56
- isError: boolean;
57
- };
58
- }>;
59
- fc_create_post: (params: CreatePostParams) => Promise<{
60
- toolResult: {
61
- content: {
62
- type: string;
63
- text: string;
64
- }[];
65
- isError: boolean;
66
- };
67
- }>;
68
- };
69
- export {};
@@ -1,92 +0,0 @@
1
- import { makeWordPressRequest } from '../wordpress.js';
2
- import { z } from 'zod';
3
- // Zod Schema Definitions
4
- const listPostsSchema = z.object({
5
- space_id: z.number().optional().describe('Filter posts by space ID'),
6
- limit: z.number().optional().describe('Number of posts to return')
7
- });
8
- const listSpacesSchema = z.object({
9
- limit: z.number().optional().describe('Number of spaces to return'),
10
- search: z.string().optional().describe('Search term')
11
- });
12
- const createPostSchema = z.object({
13
- space_id: z.number().describe('The space ID where the post will be created'),
14
- user_id: z.number().describe('The user ID who creates the post'),
15
- message: z.string().describe('Post content/message')
16
- });
17
- export const fluentCommunityTools = [
18
- {
19
- name: 'fc_list_posts',
20
- description: 'List all posts from FluentCommunity with optional filtering',
21
- inputSchema: { type: 'object', properties: listPostsSchema.shape }
22
- },
23
- {
24
- name: 'fc_list_spaces',
25
- description: 'List all spaces in FluentCommunity',
26
- inputSchema: { type: 'object', properties: listSpacesSchema.shape }
27
- },
28
- {
29
- name: 'fc_create_post',
30
- description: 'Create a new post in FluentCommunity',
31
- inputSchema: { type: 'object', properties: createPostSchema.shape }
32
- }
33
- ];
34
- export const fluentCommunityHandlers = {
35
- fc_list_posts: async (params) => {
36
- try {
37
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/posts', params);
38
- return {
39
- toolResult: {
40
- content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
41
- isError: false
42
- }
43
- };
44
- }
45
- catch (error) {
46
- return {
47
- toolResult: {
48
- content: [{ type: 'text', text: `Error listing posts: ${error.message}` }],
49
- isError: true
50
- }
51
- };
52
- }
53
- },
54
- fc_list_spaces: async (params) => {
55
- try {
56
- const response = await makeWordPressRequest('GET', 'fc-manager/v1/spaces', params);
57
- return {
58
- toolResult: {
59
- content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
60
- isError: false
61
- }
62
- };
63
- }
64
- catch (error) {
65
- return {
66
- toolResult: {
67
- content: [{ type: 'text', text: `Error listing spaces: ${error.message}` }],
68
- isError: true
69
- }
70
- };
71
- }
72
- },
73
- fc_create_post: async (params) => {
74
- try {
75
- const response = await makeWordPressRequest('POST', 'fc-manager/v1/posts', params);
76
- return {
77
- toolResult: {
78
- content: [{ type: 'text', text: JSON.stringify(response, null, 2) }],
79
- isError: false
80
- }
81
- };
82
- }
83
- catch (error) {
84
- return {
85
- toolResult: {
86
- content: [{ type: 'text', text: `Error creating post: ${error.message}` }],
87
- isError: true
88
- }
89
- };
90
- }
91
- }
92
- };