@wplaunchify/ml-mcp-server 1.0.11 → 2.0.0
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.
|
@@ -24,7 +24,9 @@ const createPostSchema = z.object({
|
|
|
24
24
|
message: z.string().describe('Post content/message'),
|
|
25
25
|
type: z.string().optional().default('text').describe('Post type (text, video, etc.)'),
|
|
26
26
|
status: z.enum(['published', 'draft', 'pending']).optional().default('published').describe('Post status'),
|
|
27
|
-
privacy: z.enum(['public', 'private', 'friends']).optional().default('public').describe('Post privacy setting')
|
|
27
|
+
privacy: z.enum(['public', 'private', 'friends']).optional().default('public').describe('Post privacy setting'),
|
|
28
|
+
use_html5_bypass: z.boolean().optional().describe('Enable HTML5 bypass mode for full HTML/CSS/iframe support (bypasses markdown processing)'),
|
|
29
|
+
bypass_sanitization: z.boolean().optional().describe('Alias for use_html5_bypass - bypasses sanitization for full HTML5 support')
|
|
28
30
|
});
|
|
29
31
|
const updatePostSchema = z.object({
|
|
30
32
|
post_id: z.number().describe('The ID of the post to update'),
|
|
@@ -140,6 +142,293 @@ const bulkUpdatePostsSchema = z.object({
|
|
|
140
142
|
const bulkDeletePostsSchema = z.object({
|
|
141
143
|
post_ids: z.array(z.number()).describe('Array of post IDs to delete')
|
|
142
144
|
});
|
|
145
|
+
// Course Management Schemas
|
|
146
|
+
const listCoursesSchema = z.object({
|
|
147
|
+
space_id: z.number().optional().describe('Filter courses by space ID'),
|
|
148
|
+
status: z.enum(['published', 'draft', 'archived']).optional().describe('Filter by status'),
|
|
149
|
+
limit: z.number().optional().default(20).describe('Number of courses to return'),
|
|
150
|
+
search: z.string().optional().describe('Search term')
|
|
151
|
+
});
|
|
152
|
+
const getCourseSchema = z.object({
|
|
153
|
+
id: z.number().describe('The ID of the course to retrieve')
|
|
154
|
+
});
|
|
155
|
+
const createCourseSchema = z.object({
|
|
156
|
+
title: z.string().describe('Course title'),
|
|
157
|
+
space_id: z.number().describe('The space ID where the course will be created'),
|
|
158
|
+
description: z.string().optional().describe('Course description'),
|
|
159
|
+
featured_image: z.string().optional().describe('Featured image URL'),
|
|
160
|
+
status: z.enum(['published', 'draft']).optional().default('draft').describe('Course status'),
|
|
161
|
+
settings: z.object({
|
|
162
|
+
enrollment_type: z.enum(['open', 'approval', 'closed']).optional(),
|
|
163
|
+
certificate_enabled: z.boolean().optional(),
|
|
164
|
+
drip_enabled: z.boolean().optional()
|
|
165
|
+
}).optional().describe('Course settings')
|
|
166
|
+
});
|
|
167
|
+
const updateCourseSchema = z.object({
|
|
168
|
+
id: z.number().describe('The ID of the course to update'),
|
|
169
|
+
title: z.string().optional().describe('Course title'),
|
|
170
|
+
description: z.string().optional().describe('Course description'),
|
|
171
|
+
featured_image: z.string().optional().describe('Featured image URL'),
|
|
172
|
+
status: z.enum(['published', 'draft', 'archived']).optional().describe('Course status'),
|
|
173
|
+
settings: z.object({
|
|
174
|
+
enrollment_type: z.enum(['open', 'approval', 'closed']).optional(),
|
|
175
|
+
certificate_enabled: z.boolean().optional(),
|
|
176
|
+
drip_enabled: z.boolean().optional()
|
|
177
|
+
}).optional().describe('Course settings')
|
|
178
|
+
});
|
|
179
|
+
const deleteCourseSchema = z.object({
|
|
180
|
+
id: z.number().describe('The ID of the course to delete')
|
|
181
|
+
});
|
|
182
|
+
// Lesson Management Schemas
|
|
183
|
+
const listLessonsSchema = z.object({
|
|
184
|
+
course_id: z.number().describe('The course ID to list lessons from'),
|
|
185
|
+
limit: z.number().optional().default(50).describe('Number of lessons to return')
|
|
186
|
+
});
|
|
187
|
+
const getLessonSchema = z.object({
|
|
188
|
+
course_id: z.number().describe('The course ID'),
|
|
189
|
+
id: z.number().describe('The ID of the lesson to retrieve')
|
|
190
|
+
});
|
|
191
|
+
const createLessonSchema = z.object({
|
|
192
|
+
course_id: z.number().describe('The course ID where the lesson will be created'),
|
|
193
|
+
title: z.string().describe('Lesson title'),
|
|
194
|
+
content: z.string().describe('Lesson content (HTML supported)'),
|
|
195
|
+
order: z.number().optional().describe('Lesson order/position'),
|
|
196
|
+
type: z.enum(['lesson', 'quiz', 'assignment']).optional().default('lesson').describe('Lesson type'),
|
|
197
|
+
settings: z.object({
|
|
198
|
+
video_url: z.string().optional(),
|
|
199
|
+
duration: z.number().optional(),
|
|
200
|
+
downloadable: z.boolean().optional()
|
|
201
|
+
}).optional().describe('Lesson settings')
|
|
202
|
+
});
|
|
203
|
+
const updateLessonSchema = z.object({
|
|
204
|
+
course_id: z.number().describe('The course ID'),
|
|
205
|
+
id: z.number().describe('The ID of the lesson to update'),
|
|
206
|
+
title: z.string().optional().describe('Lesson title'),
|
|
207
|
+
content: z.string().optional().describe('Lesson content (HTML supported)'),
|
|
208
|
+
order: z.number().optional().describe('Lesson order/position'),
|
|
209
|
+
type: z.enum(['lesson', 'quiz', 'assignment']).optional().describe('Lesson type'),
|
|
210
|
+
settings: z.object({
|
|
211
|
+
video_url: z.string().optional(),
|
|
212
|
+
duration: z.number().optional(),
|
|
213
|
+
downloadable: z.boolean().optional()
|
|
214
|
+
}).optional().describe('Lesson settings')
|
|
215
|
+
});
|
|
216
|
+
const deleteLessonSchema = z.object({
|
|
217
|
+
course_id: z.number().describe('The course ID'),
|
|
218
|
+
id: z.number().describe('The ID of the lesson to delete')
|
|
219
|
+
});
|
|
220
|
+
// Course Progress Schemas
|
|
221
|
+
const getCourseProgressSchema = z.object({
|
|
222
|
+
course_id: z.number().describe('The course ID to get progress for'),
|
|
223
|
+
user_id: z.number().optional().describe('User ID (defaults to current user)')
|
|
224
|
+
});
|
|
225
|
+
const updateCourseProgressSchema = z.object({
|
|
226
|
+
course_id: z.number().describe('The course ID'),
|
|
227
|
+
lesson_id: z.number().describe('The lesson ID to mark progress for'),
|
|
228
|
+
status: z.enum(['completed', 'in_progress']).describe('Progress status'),
|
|
229
|
+
user_id: z.number().optional().describe('User ID (defaults to current user)')
|
|
230
|
+
});
|
|
231
|
+
const getMyCoursesSchema = z.object({
|
|
232
|
+
status: z.enum(['enrolled', 'completed', 'in_progress']).optional().describe('Filter by enrollment status'),
|
|
233
|
+
limit: z.number().optional().default(20).describe('Number of courses to return')
|
|
234
|
+
});
|
|
235
|
+
// Quiz Schemas
|
|
236
|
+
const listQuizzesSchema = z.object({
|
|
237
|
+
course_id: z.number().describe('The course ID'),
|
|
238
|
+
limit: z.number().optional().default(50).describe('Number of quizzes to return')
|
|
239
|
+
});
|
|
240
|
+
const getQuizSchema = z.object({
|
|
241
|
+
course_id: z.number().describe('The course ID'),
|
|
242
|
+
id: z.number().describe('The quiz ID')
|
|
243
|
+
});
|
|
244
|
+
const createQuizSchema = z.object({
|
|
245
|
+
course_id: z.number().describe('The course ID'),
|
|
246
|
+
title: z.string().describe('Quiz title'),
|
|
247
|
+
questions: z.array(z.object({
|
|
248
|
+
question: z.string(),
|
|
249
|
+
answers: z.array(z.string()),
|
|
250
|
+
correct_answer: z.number()
|
|
251
|
+
})).describe('Quiz questions'),
|
|
252
|
+
passing_score: z.number().optional().describe('Passing score percentage')
|
|
253
|
+
});
|
|
254
|
+
const updateQuizSchema = z.object({
|
|
255
|
+
course_id: z.number().describe('The course ID'),
|
|
256
|
+
id: z.number().describe('The quiz ID'),
|
|
257
|
+
title: z.string().optional().describe('Quiz title'),
|
|
258
|
+
questions: z.array(z.object({
|
|
259
|
+
question: z.string(),
|
|
260
|
+
answers: z.array(z.string()),
|
|
261
|
+
correct_answer: z.number()
|
|
262
|
+
})).optional().describe('Quiz questions'),
|
|
263
|
+
passing_score: z.number().optional().describe('Passing score percentage')
|
|
264
|
+
});
|
|
265
|
+
const deleteQuizSchema = z.object({
|
|
266
|
+
course_id: z.number().describe('The course ID'),
|
|
267
|
+
id: z.number().describe('The quiz ID')
|
|
268
|
+
});
|
|
269
|
+
// Profile Schemas
|
|
270
|
+
const listProfilesSchema = z.object({
|
|
271
|
+
search: z.string().optional().describe('Search term'),
|
|
272
|
+
limit: z.number().optional().default(20).describe('Number of profiles to return')
|
|
273
|
+
});
|
|
274
|
+
const getProfileSchema = z.object({
|
|
275
|
+
id: z.number().describe('User/Profile ID')
|
|
276
|
+
});
|
|
277
|
+
const updateProfileSchema = z.object({
|
|
278
|
+
id: z.number().describe('User/Profile ID'),
|
|
279
|
+
display_name: z.string().optional().describe('Display name'),
|
|
280
|
+
bio: z.string().optional().describe('Bio/description'),
|
|
281
|
+
avatar: z.string().optional().describe('Avatar URL'),
|
|
282
|
+
cover_photo: z.string().optional().describe('Cover photo URL'),
|
|
283
|
+
social_links: z.record(z.string()).optional().describe('Social media links')
|
|
284
|
+
});
|
|
285
|
+
// Space Group Schemas
|
|
286
|
+
const listSpaceGroupsSchema = z.object({
|
|
287
|
+
limit: z.number().optional().default(20).describe('Number of groups to return')
|
|
288
|
+
});
|
|
289
|
+
const getSpaceGroupSchema = z.object({
|
|
290
|
+
id: z.number().describe('Space group ID')
|
|
291
|
+
});
|
|
292
|
+
const createSpaceGroupSchema = z.object({
|
|
293
|
+
title: z.string().describe('Group title'),
|
|
294
|
+
description: z.string().optional().describe('Group description'),
|
|
295
|
+
spaces: z.array(z.number()).optional().describe('Array of space IDs to include')
|
|
296
|
+
});
|
|
297
|
+
const updateSpaceGroupSchema = z.object({
|
|
298
|
+
id: z.number().describe('Space group ID'),
|
|
299
|
+
title: z.string().optional().describe('Group title'),
|
|
300
|
+
description: z.string().optional().describe('Group description'),
|
|
301
|
+
spaces: z.array(z.number()).optional().describe('Array of space IDs')
|
|
302
|
+
});
|
|
303
|
+
const deleteSpaceGroupSchema = z.object({
|
|
304
|
+
id: z.number().describe('Space group ID')
|
|
305
|
+
});
|
|
306
|
+
// Activities Schema
|
|
307
|
+
const listActivitiesSchema = z.object({
|
|
308
|
+
user_id: z.number().optional().describe('Filter by user ID'),
|
|
309
|
+
limit: z.number().optional().default(50).describe('Number of activities to return')
|
|
310
|
+
});
|
|
311
|
+
// Reactions Schemas
|
|
312
|
+
const listReactionsSchema = z.object({
|
|
313
|
+
post_id: z.number().optional().describe('Filter by post ID'),
|
|
314
|
+
limit: z.number().optional().default(50).describe('Number of reactions to return')
|
|
315
|
+
});
|
|
316
|
+
const addReactionSchema = z.object({
|
|
317
|
+
post_id: z.number().describe('Post ID to react to'),
|
|
318
|
+
reaction_type: z.string().describe('Reaction type (like, love, etc.)')
|
|
319
|
+
});
|
|
320
|
+
const removeReactionSchema = z.object({
|
|
321
|
+
id: z.number().describe('Reaction ID to remove')
|
|
322
|
+
});
|
|
323
|
+
// Bookmarks Schemas
|
|
324
|
+
const listBookmarksSchema = z.object({
|
|
325
|
+
limit: z.number().optional().default(50).describe('Number of bookmarks to return')
|
|
326
|
+
});
|
|
327
|
+
const addBookmarkSchema = z.object({
|
|
328
|
+
post_id: z.number().describe('Post ID to bookmark')
|
|
329
|
+
});
|
|
330
|
+
const removeBookmarkSchema = z.object({
|
|
331
|
+
id: z.number().describe('Bookmark ID to remove')
|
|
332
|
+
});
|
|
333
|
+
// Notifications Schemas
|
|
334
|
+
const listNotificationsSchema = z.object({
|
|
335
|
+
unread_only: z.boolean().optional().describe('Show only unread notifications'),
|
|
336
|
+
limit: z.number().optional().default(50).describe('Number of notifications to return')
|
|
337
|
+
});
|
|
338
|
+
// Media Schemas
|
|
339
|
+
const listMediaSchema = z.object({
|
|
340
|
+
limit: z.number().optional().default(50).describe('Number of media items to return')
|
|
341
|
+
});
|
|
342
|
+
const uploadMediaSchema = z.object({
|
|
343
|
+
file_url: z.string().describe('URL of file to upload'),
|
|
344
|
+
file_name: z.string().optional().describe('File name')
|
|
345
|
+
});
|
|
346
|
+
// Giphy Schema
|
|
347
|
+
const searchGiphySchema = z.object({
|
|
348
|
+
query: z.string().describe('Search query for GIFs'),
|
|
349
|
+
limit: z.number().optional().default(20).describe('Number of GIFs to return')
|
|
350
|
+
});
|
|
351
|
+
// Followers Schemas (Pro)
|
|
352
|
+
const listFollowersSchema = z.object({
|
|
353
|
+
user_id: z.number().optional().describe('User ID to get followers for'),
|
|
354
|
+
limit: z.number().optional().default(50).describe('Number of followers to return')
|
|
355
|
+
});
|
|
356
|
+
const followUserSchema = z.object({
|
|
357
|
+
user_id: z.number().describe('User ID to follow')
|
|
358
|
+
});
|
|
359
|
+
const unfollowUserSchema = z.object({
|
|
360
|
+
id: z.number().describe('User ID to unfollow')
|
|
361
|
+
});
|
|
362
|
+
// Moderation Schemas (Pro)
|
|
363
|
+
const listReportsSchema = z.object({
|
|
364
|
+
status: z.enum(['pending', 'resolved', 'dismissed']).optional().describe('Filter by status'),
|
|
365
|
+
limit: z.number().optional().default(50).describe('Number of reports to return')
|
|
366
|
+
});
|
|
367
|
+
const createReportSchema = z.object({
|
|
368
|
+
content_id: z.number().describe('Content ID being reported'),
|
|
369
|
+
content_type: z.enum(['post', 'comment', 'user']).describe('Type of content'),
|
|
370
|
+
reason: z.string().describe('Reason for report')
|
|
371
|
+
});
|
|
372
|
+
// Topics Schemas (Pro)
|
|
373
|
+
const listTopicsSchema = z.object({
|
|
374
|
+
limit: z.number().optional().default(50).describe('Number of topics to return')
|
|
375
|
+
});
|
|
376
|
+
const getTopicSchema = z.object({
|
|
377
|
+
id: z.number().describe('Topic ID')
|
|
378
|
+
});
|
|
379
|
+
const createTopicSchema = z.object({
|
|
380
|
+
title: z.string().describe('Topic title'),
|
|
381
|
+
description: z.string().optional().describe('Topic description'),
|
|
382
|
+
icon: z.string().optional().describe('Topic icon')
|
|
383
|
+
});
|
|
384
|
+
const updateTopicSchema = z.object({
|
|
385
|
+
id: z.number().describe('Topic ID'),
|
|
386
|
+
title: z.string().optional().describe('Topic title'),
|
|
387
|
+
description: z.string().optional().describe('Topic description'),
|
|
388
|
+
icon: z.string().optional().describe('Topic icon')
|
|
389
|
+
});
|
|
390
|
+
const deleteTopicSchema = z.object({
|
|
391
|
+
id: z.number().describe('Topic ID')
|
|
392
|
+
});
|
|
393
|
+
// Webhooks Schemas (Pro)
|
|
394
|
+
const listWebhooksSchema = z.object({
|
|
395
|
+
limit: z.number().optional().default(50).describe('Number of webhooks to return')
|
|
396
|
+
});
|
|
397
|
+
const createWebhookSchema = z.object({
|
|
398
|
+
url: z.string().describe('Webhook URL'),
|
|
399
|
+
events: z.array(z.string()).describe('Events to trigger webhook'),
|
|
400
|
+
secret: z.string().optional().describe('Webhook secret for verification')
|
|
401
|
+
});
|
|
402
|
+
const deleteWebhookSchema = z.object({
|
|
403
|
+
id: z.number().describe('Webhook ID')
|
|
404
|
+
});
|
|
405
|
+
// Scheduled Posts Schema (Pro)
|
|
406
|
+
const listScheduledPostsSchema = z.object({
|
|
407
|
+
limit: z.number().optional().default(50).describe('Number of scheduled posts to return')
|
|
408
|
+
});
|
|
409
|
+
// Managers Schemas (Pro)
|
|
410
|
+
const listManagersSchema = z.object({
|
|
411
|
+
space_id: z.number().optional().describe('Filter by space ID'),
|
|
412
|
+
limit: z.number().optional().default(50).describe('Number of managers to return')
|
|
413
|
+
});
|
|
414
|
+
const addManagerSchema = z.object({
|
|
415
|
+
user_id: z.number().describe('User ID to make manager'),
|
|
416
|
+
space_id: z.number().optional().describe('Space ID (for space-specific manager)'),
|
|
417
|
+
permissions: z.array(z.string()).optional().describe('Manager permissions')
|
|
418
|
+
});
|
|
419
|
+
const removeManagerSchema = z.object({
|
|
420
|
+
id: z.number().describe('Manager ID to remove')
|
|
421
|
+
});
|
|
422
|
+
// Leaderboard Schemas (Pro)
|
|
423
|
+
const getLeaderboardSchema = z.object({
|
|
424
|
+
period: z.enum(['daily', 'weekly', 'monthly', 'all_time']).optional().default('all_time').describe('Leaderboard period'),
|
|
425
|
+
limit: z.number().optional().default(50).describe('Number of users to return')
|
|
426
|
+
});
|
|
427
|
+
const addPointsSchema = z.object({
|
|
428
|
+
user_id: z.number().describe('User ID'),
|
|
429
|
+
points: z.number().describe('Points to add'),
|
|
430
|
+
reason: z.string().optional().describe('Reason for points')
|
|
431
|
+
});
|
|
143
432
|
export const fluentCommunityTools = [
|
|
144
433
|
// ==================== POSTS TOOLS ====================
|
|
145
434
|
{
|
|
@@ -257,6 +546,310 @@ export const fluentCommunityTools = [
|
|
|
257
546
|
description: 'Delete multiple FluentCommunity posts at once',
|
|
258
547
|
inputSchema: { type: 'object', properties: bulkDeletePostsSchema.shape }
|
|
259
548
|
},
|
|
549
|
+
// ==================== COURSE MANAGEMENT ====================
|
|
550
|
+
{
|
|
551
|
+
name: 'fc_list_courses',
|
|
552
|
+
description: 'List all courses in FluentCommunity (supports filtering by space, status, search)',
|
|
553
|
+
inputSchema: { type: 'object', properties: listCoursesSchema.shape }
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
name: 'fc_get_course',
|
|
557
|
+
description: 'Get a specific course by ID with full details',
|
|
558
|
+
inputSchema: { type: 'object', properties: getCourseSchema.shape }
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: 'fc_create_course',
|
|
562
|
+
description: 'Create a new course in FluentCommunity (requires title and space_id)',
|
|
563
|
+
inputSchema: { type: 'object', properties: createCourseSchema.shape }
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
name: 'fc_update_course',
|
|
567
|
+
description: 'Update an existing course (title, description, status, settings)',
|
|
568
|
+
inputSchema: { type: 'object', properties: updateCourseSchema.shape }
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
name: 'fc_delete_course',
|
|
572
|
+
description: 'Delete a course from FluentCommunity',
|
|
573
|
+
inputSchema: { type: 'object', properties: deleteCourseSchema.shape }
|
|
574
|
+
},
|
|
575
|
+
// ==================== LESSON MANAGEMENT ====================
|
|
576
|
+
{
|
|
577
|
+
name: 'fc_list_lessons',
|
|
578
|
+
description: 'List all lessons in a specific course',
|
|
579
|
+
inputSchema: { type: 'object', properties: listLessonsSchema.shape }
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
name: 'fc_get_lesson',
|
|
583
|
+
description: 'Get a specific lesson by ID with full content',
|
|
584
|
+
inputSchema: { type: 'object', properties: getLessonSchema.shape }
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
name: 'fc_create_lesson',
|
|
588
|
+
description: 'Create a new lesson in a course (supports HTML content, video embeds)',
|
|
589
|
+
inputSchema: { type: 'object', properties: createLessonSchema.shape }
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
name: 'fc_update_lesson',
|
|
593
|
+
description: 'Update an existing lesson (content, title, order, settings)',
|
|
594
|
+
inputSchema: { type: 'object', properties: updateLessonSchema.shape }
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
name: 'fc_delete_lesson',
|
|
598
|
+
description: 'Delete a lesson from a course',
|
|
599
|
+
inputSchema: { type: 'object', properties: deleteLessonSchema.shape }
|
|
600
|
+
},
|
|
601
|
+
// ==================== COURSE PROGRESS ====================
|
|
602
|
+
{
|
|
603
|
+
name: 'fc_get_course_progress',
|
|
604
|
+
description: 'Get course progress for a user (completed lessons, scores, etc.)',
|
|
605
|
+
inputSchema: { type: 'object', properties: getCourseProgressSchema.shape }
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
name: 'fc_update_course_progress',
|
|
609
|
+
description: 'Update course progress (mark lesson as completed or in progress)',
|
|
610
|
+
inputSchema: { type: 'object', properties: updateCourseProgressSchema.shape }
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
name: 'fc_get_my_courses',
|
|
614
|
+
description: 'Get all courses the current user is enrolled in',
|
|
615
|
+
inputSchema: { type: 'object', properties: getMyCoursesSchema.shape }
|
|
616
|
+
},
|
|
617
|
+
// ==================== QUIZZES ====================
|
|
618
|
+
{
|
|
619
|
+
name: 'fc_list_quizzes',
|
|
620
|
+
description: 'List quizzes for a specific course',
|
|
621
|
+
inputSchema: { type: 'object', properties: listQuizzesSchema.shape }
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
name: 'fc_get_quiz',
|
|
625
|
+
description: 'Get a specific quiz by ID',
|
|
626
|
+
inputSchema: { type: 'object', properties: getQuizSchema.shape }
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
name: 'fc_create_quiz',
|
|
630
|
+
description: 'Create a new quiz in a course',
|
|
631
|
+
inputSchema: { type: 'object', properties: createQuizSchema.shape }
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
name: 'fc_update_quiz',
|
|
635
|
+
description: 'Update an existing quiz',
|
|
636
|
+
inputSchema: { type: 'object', properties: updateQuizSchema.shape }
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
name: 'fc_delete_quiz',
|
|
640
|
+
description: 'Delete a quiz',
|
|
641
|
+
inputSchema: { type: 'object', properties: deleteQuizSchema.shape }
|
|
642
|
+
},
|
|
643
|
+
// ==================== PROFILES ====================
|
|
644
|
+
{
|
|
645
|
+
name: 'fc_list_profiles',
|
|
646
|
+
description: 'List user profiles',
|
|
647
|
+
inputSchema: { type: 'object', properties: listProfilesSchema.shape }
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
name: 'fc_get_profile',
|
|
651
|
+
description: 'Get a specific user profile',
|
|
652
|
+
inputSchema: { type: 'object', properties: getProfileSchema.shape }
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
name: 'fc_update_profile',
|
|
656
|
+
description: 'Update a user profile',
|
|
657
|
+
inputSchema: { type: 'object', properties: updateProfileSchema.shape }
|
|
658
|
+
},
|
|
659
|
+
// ==================== SPACE GROUPS ====================
|
|
660
|
+
{
|
|
661
|
+
name: 'fc_list_space_groups',
|
|
662
|
+
description: 'List all space groups',
|
|
663
|
+
inputSchema: { type: 'object', properties: listSpaceGroupsSchema.shape }
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
name: 'fc_get_space_group',
|
|
667
|
+
description: 'Get a specific space group',
|
|
668
|
+
inputSchema: { type: 'object', properties: getSpaceGroupSchema.shape }
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
name: 'fc_create_space_group',
|
|
672
|
+
description: 'Create a new space group',
|
|
673
|
+
inputSchema: { type: 'object', properties: createSpaceGroupSchema.shape }
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
name: 'fc_update_space_group',
|
|
677
|
+
description: 'Update a space group',
|
|
678
|
+
inputSchema: { type: 'object', properties: updateSpaceGroupSchema.shape }
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: 'fc_delete_space_group',
|
|
682
|
+
description: 'Delete a space group',
|
|
683
|
+
inputSchema: { type: 'object', properties: deleteSpaceGroupSchema.shape }
|
|
684
|
+
},
|
|
685
|
+
// ==================== ACTIVITIES ====================
|
|
686
|
+
{
|
|
687
|
+
name: 'fc_list_activities',
|
|
688
|
+
description: 'List user activities',
|
|
689
|
+
inputSchema: { type: 'object', properties: listActivitiesSchema.shape }
|
|
690
|
+
},
|
|
691
|
+
// ==================== REACTIONS ====================
|
|
692
|
+
{
|
|
693
|
+
name: 'fc_list_reactions',
|
|
694
|
+
description: 'List reactions on posts',
|
|
695
|
+
inputSchema: { type: 'object', properties: listReactionsSchema.shape }
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
name: 'fc_add_reaction',
|
|
699
|
+
description: 'Add a reaction to a post',
|
|
700
|
+
inputSchema: { type: 'object', properties: addReactionSchema.shape }
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
name: 'fc_remove_reaction',
|
|
704
|
+
description: 'Remove a reaction',
|
|
705
|
+
inputSchema: { type: 'object', properties: removeReactionSchema.shape }
|
|
706
|
+
},
|
|
707
|
+
// ==================== BOOKMARKS ====================
|
|
708
|
+
{
|
|
709
|
+
name: 'fc_list_bookmarks',
|
|
710
|
+
description: 'List user bookmarks',
|
|
711
|
+
inputSchema: { type: 'object', properties: listBookmarksSchema.shape }
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
name: 'fc_add_bookmark',
|
|
715
|
+
description: 'Add a bookmark',
|
|
716
|
+
inputSchema: { type: 'object', properties: addBookmarkSchema.shape }
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
name: 'fc_remove_bookmark',
|
|
720
|
+
description: 'Remove a bookmark',
|
|
721
|
+
inputSchema: { type: 'object', properties: removeBookmarkSchema.shape }
|
|
722
|
+
},
|
|
723
|
+
// ==================== NOTIFICATIONS ====================
|
|
724
|
+
{
|
|
725
|
+
name: 'fc_list_notifications',
|
|
726
|
+
description: 'List user notifications',
|
|
727
|
+
inputSchema: { type: 'object', properties: listNotificationsSchema.shape }
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: 'fc_mark_notifications_read',
|
|
731
|
+
description: 'Mark notifications as read',
|
|
732
|
+
inputSchema: { type: 'object', properties: z.object({}).shape }
|
|
733
|
+
},
|
|
734
|
+
// ==================== MEDIA ====================
|
|
735
|
+
{
|
|
736
|
+
name: 'fc_list_media',
|
|
737
|
+
description: 'List media items',
|
|
738
|
+
inputSchema: { type: 'object', properties: listMediaSchema.shape }
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
name: 'fc_upload_media',
|
|
742
|
+
description: 'Upload media file',
|
|
743
|
+
inputSchema: { type: 'object', properties: uploadMediaSchema.shape }
|
|
744
|
+
},
|
|
745
|
+
// ==================== GIPHY ====================
|
|
746
|
+
{
|
|
747
|
+
name: 'fc_search_giphy',
|
|
748
|
+
description: 'Search Giphy for GIFs',
|
|
749
|
+
inputSchema: { type: 'object', properties: searchGiphySchema.shape }
|
|
750
|
+
},
|
|
751
|
+
// ==================== FOLLOWERS (PRO) ====================
|
|
752
|
+
{
|
|
753
|
+
name: 'fc_list_followers',
|
|
754
|
+
description: 'List followers for a user',
|
|
755
|
+
inputSchema: { type: 'object', properties: listFollowersSchema.shape }
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
name: 'fc_follow_user',
|
|
759
|
+
description: 'Follow a user',
|
|
760
|
+
inputSchema: { type: 'object', properties: followUserSchema.shape }
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
name: 'fc_unfollow_user',
|
|
764
|
+
description: 'Unfollow a user',
|
|
765
|
+
inputSchema: { type: 'object', properties: unfollowUserSchema.shape }
|
|
766
|
+
},
|
|
767
|
+
// ==================== MODERATION (PRO) ====================
|
|
768
|
+
{
|
|
769
|
+
name: 'fc_list_reports',
|
|
770
|
+
description: 'List moderation reports',
|
|
771
|
+
inputSchema: { type: 'object', properties: listReportsSchema.shape }
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
name: 'fc_create_report',
|
|
775
|
+
description: 'Create a moderation report',
|
|
776
|
+
inputSchema: { type: 'object', properties: createReportSchema.shape }
|
|
777
|
+
},
|
|
778
|
+
// ==================== TOPICS (PRO) ====================
|
|
779
|
+
{
|
|
780
|
+
name: 'fc_list_topics',
|
|
781
|
+
description: 'List all topics',
|
|
782
|
+
inputSchema: { type: 'object', properties: listTopicsSchema.shape }
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: 'fc_get_topic',
|
|
786
|
+
description: 'Get a specific topic',
|
|
787
|
+
inputSchema: { type: 'object', properties: getTopicSchema.shape }
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
name: 'fc_create_topic',
|
|
791
|
+
description: 'Create a new topic',
|
|
792
|
+
inputSchema: { type: 'object', properties: createTopicSchema.shape }
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
name: 'fc_update_topic',
|
|
796
|
+
description: 'Update a topic',
|
|
797
|
+
inputSchema: { type: 'object', properties: updateTopicSchema.shape }
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
name: 'fc_delete_topic',
|
|
801
|
+
description: 'Delete a topic',
|
|
802
|
+
inputSchema: { type: 'object', properties: deleteTopicSchema.shape }
|
|
803
|
+
},
|
|
804
|
+
// ==================== WEBHOOKS (PRO) ====================
|
|
805
|
+
{
|
|
806
|
+
name: 'fc_list_webhooks',
|
|
807
|
+
description: 'List all webhooks',
|
|
808
|
+
inputSchema: { type: 'object', properties: listWebhooksSchema.shape }
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
name: 'fc_create_webhook',
|
|
812
|
+
description: 'Create a new webhook',
|
|
813
|
+
inputSchema: { type: 'object', properties: createWebhookSchema.shape }
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
name: 'fc_delete_webhook',
|
|
817
|
+
description: 'Delete a webhook',
|
|
818
|
+
inputSchema: { type: 'object', properties: deleteWebhookSchema.shape }
|
|
819
|
+
},
|
|
820
|
+
// ==================== SCHEDULED POSTS (PRO) ====================
|
|
821
|
+
{
|
|
822
|
+
name: 'fc_list_scheduled_posts',
|
|
823
|
+
description: 'List scheduled posts',
|
|
824
|
+
inputSchema: { type: 'object', properties: listScheduledPostsSchema.shape }
|
|
825
|
+
},
|
|
826
|
+
// ==================== MANAGERS (PRO) ====================
|
|
827
|
+
{
|
|
828
|
+
name: 'fc_list_managers',
|
|
829
|
+
description: 'List community managers',
|
|
830
|
+
inputSchema: { type: 'object', properties: listManagersSchema.shape }
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
name: 'fc_add_manager',
|
|
834
|
+
description: 'Add a community manager',
|
|
835
|
+
inputSchema: { type: 'object', properties: addManagerSchema.shape }
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
name: 'fc_remove_manager',
|
|
839
|
+
description: 'Remove a community manager',
|
|
840
|
+
inputSchema: { type: 'object', properties: removeManagerSchema.shape }
|
|
841
|
+
},
|
|
842
|
+
// ==================== LEADERBOARD (PRO) ====================
|
|
843
|
+
{
|
|
844
|
+
name: 'fc_get_leaderboard',
|
|
845
|
+
description: 'Get the community leaderboard',
|
|
846
|
+
inputSchema: { type: 'object', properties: getLeaderboardSchema.shape }
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
name: 'fc_add_points',
|
|
850
|
+
description: 'Add points to a user',
|
|
851
|
+
inputSchema: { type: 'object', properties: addPointsSchema.shape }
|
|
852
|
+
},
|
|
260
853
|
];
|
|
261
854
|
/**
|
|
262
855
|
* FluentCommunity Tool Handlers
|
|
@@ -307,6 +900,10 @@ export const fluentCommunityHandlers = {
|
|
|
307
900
|
};
|
|
308
901
|
if (args.title)
|
|
309
902
|
postData.title = args.title;
|
|
903
|
+
if (args.use_html5_bypass)
|
|
904
|
+
postData.use_html5_bypass = args.use_html5_bypass;
|
|
905
|
+
if (args.bypass_sanitization)
|
|
906
|
+
postData.bypass_sanitization = args.bypass_sanitization;
|
|
310
907
|
const response = await makeWordPressRequest('POST', 'fc-manager/v1/posts', postData);
|
|
311
908
|
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
312
909
|
}
|
|
@@ -554,4 +1151,614 @@ export const fluentCommunityHandlers = {
|
|
|
554
1151
|
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
555
1152
|
}
|
|
556
1153
|
},
|
|
1154
|
+
// ==================== COURSE MANAGEMENT HANDLERS ====================
|
|
1155
|
+
fc_list_courses: async (args) => {
|
|
1156
|
+
try {
|
|
1157
|
+
const params = {
|
|
1158
|
+
per_page: args.limit || 20
|
|
1159
|
+
};
|
|
1160
|
+
if (args.space_id)
|
|
1161
|
+
params.space_id = args.space_id;
|
|
1162
|
+
if (args.status)
|
|
1163
|
+
params.status = args.status;
|
|
1164
|
+
if (args.search)
|
|
1165
|
+
params.search = args.search;
|
|
1166
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/courses', params);
|
|
1167
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1168
|
+
}
|
|
1169
|
+
catch (error) {
|
|
1170
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1171
|
+
}
|
|
1172
|
+
},
|
|
1173
|
+
fc_get_course: async (args) => {
|
|
1174
|
+
try {
|
|
1175
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/courses/${args.id}`);
|
|
1176
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1177
|
+
}
|
|
1178
|
+
catch (error) {
|
|
1179
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1180
|
+
}
|
|
1181
|
+
},
|
|
1182
|
+
fc_create_course: async (args) => {
|
|
1183
|
+
try {
|
|
1184
|
+
const courseData = {
|
|
1185
|
+
title: args.title,
|
|
1186
|
+
space_id: args.space_id,
|
|
1187
|
+
status: args.status || 'draft'
|
|
1188
|
+
};
|
|
1189
|
+
if (args.description)
|
|
1190
|
+
courseData.description = args.description;
|
|
1191
|
+
if (args.featured_image)
|
|
1192
|
+
courseData.featured_image = args.featured_image;
|
|
1193
|
+
if (args.settings)
|
|
1194
|
+
courseData.settings = args.settings;
|
|
1195
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/courses', courseData);
|
|
1196
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1197
|
+
}
|
|
1198
|
+
catch (error) {
|
|
1199
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
fc_update_course: async (args) => {
|
|
1203
|
+
try {
|
|
1204
|
+
const { id, ...updateData } = args;
|
|
1205
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/courses/${id}`, updateData);
|
|
1206
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1207
|
+
}
|
|
1208
|
+
catch (error) {
|
|
1209
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1210
|
+
}
|
|
1211
|
+
},
|
|
1212
|
+
fc_delete_course: async (args) => {
|
|
1213
|
+
try {
|
|
1214
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/courses/${args.id}`);
|
|
1215
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1216
|
+
}
|
|
1217
|
+
catch (error) {
|
|
1218
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
// ==================== LESSON MANAGEMENT HANDLERS ====================
|
|
1222
|
+
fc_list_lessons: async (args) => {
|
|
1223
|
+
try {
|
|
1224
|
+
const params = {
|
|
1225
|
+
per_page: args.limit || 50
|
|
1226
|
+
};
|
|
1227
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/courses/${args.course_id}/lessons`, params);
|
|
1228
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1229
|
+
}
|
|
1230
|
+
catch (error) {
|
|
1231
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
fc_get_lesson: async (args) => {
|
|
1235
|
+
try {
|
|
1236
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/courses/${args.course_id}/lessons/${args.id}`);
|
|
1237
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1238
|
+
}
|
|
1239
|
+
catch (error) {
|
|
1240
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
fc_create_lesson: async (args) => {
|
|
1244
|
+
try {
|
|
1245
|
+
const lessonData = {
|
|
1246
|
+
title: args.title,
|
|
1247
|
+
content: args.content,
|
|
1248
|
+
type: args.type || 'lesson'
|
|
1249
|
+
};
|
|
1250
|
+
if (args.order)
|
|
1251
|
+
lessonData.order = args.order;
|
|
1252
|
+
if (args.settings)
|
|
1253
|
+
lessonData.settings = args.settings;
|
|
1254
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/courses/${args.course_id}/lessons`, lessonData);
|
|
1255
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1256
|
+
}
|
|
1257
|
+
catch (error) {
|
|
1258
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1259
|
+
}
|
|
1260
|
+
},
|
|
1261
|
+
fc_update_lesson: async (args) => {
|
|
1262
|
+
try {
|
|
1263
|
+
const { course_id, id, ...updateData } = args;
|
|
1264
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/courses/${course_id}/lessons/${id}`, updateData);
|
|
1265
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1266
|
+
}
|
|
1267
|
+
catch (error) {
|
|
1268
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
fc_delete_lesson: async (args) => {
|
|
1272
|
+
try {
|
|
1273
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/courses/${args.course_id}/lessons/${args.id}`);
|
|
1274
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1275
|
+
}
|
|
1276
|
+
catch (error) {
|
|
1277
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
// ==================== COURSE PROGRESS HANDLERS ====================
|
|
1281
|
+
fc_get_course_progress: async (args) => {
|
|
1282
|
+
try {
|
|
1283
|
+
const params = {};
|
|
1284
|
+
if (args.user_id)
|
|
1285
|
+
params.user_id = args.user_id;
|
|
1286
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/courses/${args.course_id}/progress`, params);
|
|
1287
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1288
|
+
}
|
|
1289
|
+
catch (error) {
|
|
1290
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1291
|
+
}
|
|
1292
|
+
},
|
|
1293
|
+
fc_update_course_progress: async (args) => {
|
|
1294
|
+
try {
|
|
1295
|
+
const progressData = {
|
|
1296
|
+
lesson_id: args.lesson_id,
|
|
1297
|
+
status: args.status
|
|
1298
|
+
};
|
|
1299
|
+
if (args.user_id)
|
|
1300
|
+
progressData.user_id = args.user_id;
|
|
1301
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/courses/${args.course_id}/progress`, progressData);
|
|
1302
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1303
|
+
}
|
|
1304
|
+
catch (error) {
|
|
1305
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
fc_get_my_courses: async (args) => {
|
|
1309
|
+
try {
|
|
1310
|
+
const params = {
|
|
1311
|
+
per_page: args.limit || 20
|
|
1312
|
+
};
|
|
1313
|
+
if (args.status)
|
|
1314
|
+
params.status = args.status;
|
|
1315
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/courses/my-courses', params);
|
|
1316
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1317
|
+
}
|
|
1318
|
+
catch (error) {
|
|
1319
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
// ==================== QUIZ HANDLERS ====================
|
|
1323
|
+
fc_list_quizzes: async (args) => {
|
|
1324
|
+
try {
|
|
1325
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/courses/${args.course_id}/quizzes`, { per_page: args.limit || 50 });
|
|
1326
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1327
|
+
}
|
|
1328
|
+
catch (error) {
|
|
1329
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
fc_get_quiz: async (args) => {
|
|
1333
|
+
try {
|
|
1334
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/courses/${args.course_id}/quizzes/${args.id}`);
|
|
1335
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1336
|
+
}
|
|
1337
|
+
catch (error) {
|
|
1338
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
fc_create_quiz: async (args) => {
|
|
1342
|
+
try {
|
|
1343
|
+
const { course_id, ...quizData } = args;
|
|
1344
|
+
const response = await makeWordPressRequest('POST', `fc-manager/v1/courses/${course_id}/quizzes`, quizData);
|
|
1345
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1346
|
+
}
|
|
1347
|
+
catch (error) {
|
|
1348
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
fc_update_quiz: async (args) => {
|
|
1352
|
+
try {
|
|
1353
|
+
const { course_id, id, ...updateData } = args;
|
|
1354
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/courses/${course_id}/quizzes/${id}`, updateData);
|
|
1355
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1356
|
+
}
|
|
1357
|
+
catch (error) {
|
|
1358
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
fc_delete_quiz: async (args) => {
|
|
1362
|
+
try {
|
|
1363
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/courses/${args.course_id}/quizzes/${args.id}`);
|
|
1364
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1365
|
+
}
|
|
1366
|
+
catch (error) {
|
|
1367
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
// ==================== PROFILE HANDLERS ====================
|
|
1371
|
+
fc_list_profiles: async (args) => {
|
|
1372
|
+
try {
|
|
1373
|
+
const params = { per_page: args.limit || 20 };
|
|
1374
|
+
if (args.search)
|
|
1375
|
+
params.search = args.search;
|
|
1376
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/profiles', params);
|
|
1377
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1378
|
+
}
|
|
1379
|
+
catch (error) {
|
|
1380
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
fc_get_profile: async (args) => {
|
|
1384
|
+
try {
|
|
1385
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/profiles/${args.id}`);
|
|
1386
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1387
|
+
}
|
|
1388
|
+
catch (error) {
|
|
1389
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
fc_update_profile: async (args) => {
|
|
1393
|
+
try {
|
|
1394
|
+
const { id, ...updateData } = args;
|
|
1395
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/profiles/${id}`, updateData);
|
|
1396
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1397
|
+
}
|
|
1398
|
+
catch (error) {
|
|
1399
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
// ==================== SPACE GROUP HANDLERS ====================
|
|
1403
|
+
fc_list_space_groups: async (args) => {
|
|
1404
|
+
try {
|
|
1405
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/space-groups', { per_page: args.limit || 20 });
|
|
1406
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1407
|
+
}
|
|
1408
|
+
catch (error) {
|
|
1409
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1410
|
+
}
|
|
1411
|
+
},
|
|
1412
|
+
fc_get_space_group: async (args) => {
|
|
1413
|
+
try {
|
|
1414
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/space-groups/${args.id}`);
|
|
1415
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1416
|
+
}
|
|
1417
|
+
catch (error) {
|
|
1418
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
fc_create_space_group: async (args) => {
|
|
1422
|
+
try {
|
|
1423
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/space-groups', args);
|
|
1424
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1425
|
+
}
|
|
1426
|
+
catch (error) {
|
|
1427
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
fc_update_space_group: async (args) => {
|
|
1431
|
+
try {
|
|
1432
|
+
const { id, ...updateData } = args;
|
|
1433
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/space-groups/${id}`, updateData);
|
|
1434
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1435
|
+
}
|
|
1436
|
+
catch (error) {
|
|
1437
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1438
|
+
}
|
|
1439
|
+
},
|
|
1440
|
+
fc_delete_space_group: async (args) => {
|
|
1441
|
+
try {
|
|
1442
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/space-groups/${args.id}`);
|
|
1443
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1444
|
+
}
|
|
1445
|
+
catch (error) {
|
|
1446
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
// ==================== ACTIVITY HANDLERS ====================
|
|
1450
|
+
fc_list_activities: async (args) => {
|
|
1451
|
+
try {
|
|
1452
|
+
const params = { per_page: args.limit || 50 };
|
|
1453
|
+
if (args.user_id)
|
|
1454
|
+
params.user_id = args.user_id;
|
|
1455
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/activities', params);
|
|
1456
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1457
|
+
}
|
|
1458
|
+
catch (error) {
|
|
1459
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
// ==================== REACTION HANDLERS ====================
|
|
1463
|
+
fc_list_reactions: async (args) => {
|
|
1464
|
+
try {
|
|
1465
|
+
const params = { per_page: args.limit || 50 };
|
|
1466
|
+
if (args.post_id)
|
|
1467
|
+
params.post_id = args.post_id;
|
|
1468
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/reactions', params);
|
|
1469
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1470
|
+
}
|
|
1471
|
+
catch (error) {
|
|
1472
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1473
|
+
}
|
|
1474
|
+
},
|
|
1475
|
+
fc_add_reaction: async (args) => {
|
|
1476
|
+
try {
|
|
1477
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/reactions', args);
|
|
1478
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1479
|
+
}
|
|
1480
|
+
catch (error) {
|
|
1481
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
fc_remove_reaction: async (args) => {
|
|
1485
|
+
try {
|
|
1486
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/reactions/${args.id}`);
|
|
1487
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1488
|
+
}
|
|
1489
|
+
catch (error) {
|
|
1490
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
// ==================== BOOKMARK HANDLERS ====================
|
|
1494
|
+
fc_list_bookmarks: async (args) => {
|
|
1495
|
+
try {
|
|
1496
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/bookmarks', { per_page: args.limit || 50 });
|
|
1497
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1498
|
+
}
|
|
1499
|
+
catch (error) {
|
|
1500
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
fc_add_bookmark: async (args) => {
|
|
1504
|
+
try {
|
|
1505
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/bookmarks', args);
|
|
1506
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1507
|
+
}
|
|
1508
|
+
catch (error) {
|
|
1509
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
fc_remove_bookmark: async (args) => {
|
|
1513
|
+
try {
|
|
1514
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/bookmarks/${args.id}`);
|
|
1515
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1516
|
+
}
|
|
1517
|
+
catch (error) {
|
|
1518
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
// ==================== NOTIFICATION HANDLERS ====================
|
|
1522
|
+
fc_list_notifications: async (args) => {
|
|
1523
|
+
try {
|
|
1524
|
+
const params = { per_page: args.limit || 50 };
|
|
1525
|
+
if (args.unread_only)
|
|
1526
|
+
params.unread_only = args.unread_only;
|
|
1527
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/notifications', params);
|
|
1528
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1529
|
+
}
|
|
1530
|
+
catch (error) {
|
|
1531
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
fc_mark_notifications_read: async (args) => {
|
|
1535
|
+
try {
|
|
1536
|
+
const response = await makeWordPressRequest('PUT', 'fc-manager/v1/notifications', args);
|
|
1537
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1538
|
+
}
|
|
1539
|
+
catch (error) {
|
|
1540
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1541
|
+
}
|
|
1542
|
+
},
|
|
1543
|
+
// ==================== MEDIA HANDLERS ====================
|
|
1544
|
+
fc_list_media: async (args) => {
|
|
1545
|
+
try {
|
|
1546
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/media', { per_page: args.limit || 50 });
|
|
1547
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1548
|
+
}
|
|
1549
|
+
catch (error) {
|
|
1550
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1551
|
+
}
|
|
1552
|
+
},
|
|
1553
|
+
fc_upload_media: async (args) => {
|
|
1554
|
+
try {
|
|
1555
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/media', args);
|
|
1556
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1557
|
+
}
|
|
1558
|
+
catch (error) {
|
|
1559
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1560
|
+
}
|
|
1561
|
+
},
|
|
1562
|
+
// ==================== GIPHY HANDLERS ====================
|
|
1563
|
+
fc_search_giphy: async (args) => {
|
|
1564
|
+
try {
|
|
1565
|
+
const params = { query: args.query, limit: args.limit || 20 };
|
|
1566
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/giphy/search', params);
|
|
1567
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1568
|
+
}
|
|
1569
|
+
catch (error) {
|
|
1570
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
// ==================== FOLLOWER HANDLERS (PRO) ====================
|
|
1574
|
+
fc_list_followers: async (args) => {
|
|
1575
|
+
try {
|
|
1576
|
+
const params = { per_page: args.limit || 50 };
|
|
1577
|
+
if (args.user_id)
|
|
1578
|
+
params.user_id = args.user_id;
|
|
1579
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/followers', params);
|
|
1580
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1581
|
+
}
|
|
1582
|
+
catch (error) {
|
|
1583
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1584
|
+
}
|
|
1585
|
+
},
|
|
1586
|
+
fc_follow_user: async (args) => {
|
|
1587
|
+
try {
|
|
1588
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/followers', args);
|
|
1589
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1590
|
+
}
|
|
1591
|
+
catch (error) {
|
|
1592
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
fc_unfollow_user: async (args) => {
|
|
1596
|
+
try {
|
|
1597
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/followers/${args.id}`);
|
|
1598
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1599
|
+
}
|
|
1600
|
+
catch (error) {
|
|
1601
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
// ==================== MODERATION HANDLERS (PRO) ====================
|
|
1605
|
+
fc_list_reports: async (args) => {
|
|
1606
|
+
try {
|
|
1607
|
+
const params = { per_page: args.limit || 50 };
|
|
1608
|
+
if (args.status)
|
|
1609
|
+
params.status = args.status;
|
|
1610
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/moderation/reports', params);
|
|
1611
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1612
|
+
}
|
|
1613
|
+
catch (error) {
|
|
1614
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
fc_create_report: async (args) => {
|
|
1618
|
+
try {
|
|
1619
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/moderation/reports', args);
|
|
1620
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1621
|
+
}
|
|
1622
|
+
catch (error) {
|
|
1623
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1624
|
+
}
|
|
1625
|
+
},
|
|
1626
|
+
// ==================== TOPIC HANDLERS (PRO) ====================
|
|
1627
|
+
fc_list_topics: async (args) => {
|
|
1628
|
+
try {
|
|
1629
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/topics', { per_page: args.limit || 50 });
|
|
1630
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1631
|
+
}
|
|
1632
|
+
catch (error) {
|
|
1633
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
fc_get_topic: async (args) => {
|
|
1637
|
+
try {
|
|
1638
|
+
const response = await makeWordPressRequest('GET', `fc-manager/v1/topics/${args.id}`);
|
|
1639
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1640
|
+
}
|
|
1641
|
+
catch (error) {
|
|
1642
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
fc_create_topic: async (args) => {
|
|
1646
|
+
try {
|
|
1647
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/topics', args);
|
|
1648
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1649
|
+
}
|
|
1650
|
+
catch (error) {
|
|
1651
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
fc_update_topic: async (args) => {
|
|
1655
|
+
try {
|
|
1656
|
+
const { id, ...updateData } = args;
|
|
1657
|
+
const response = await makeWordPressRequest('PUT', `fc-manager/v1/topics/${id}`, updateData);
|
|
1658
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1659
|
+
}
|
|
1660
|
+
catch (error) {
|
|
1661
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1664
|
+
fc_delete_topic: async (args) => {
|
|
1665
|
+
try {
|
|
1666
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/topics/${args.id}`);
|
|
1667
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1668
|
+
}
|
|
1669
|
+
catch (error) {
|
|
1670
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
// ==================== WEBHOOK HANDLERS (PRO) ====================
|
|
1674
|
+
fc_list_webhooks: async (args) => {
|
|
1675
|
+
try {
|
|
1676
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/webhooks', { per_page: args.limit || 50 });
|
|
1677
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1678
|
+
}
|
|
1679
|
+
catch (error) {
|
|
1680
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1681
|
+
}
|
|
1682
|
+
},
|
|
1683
|
+
fc_create_webhook: async (args) => {
|
|
1684
|
+
try {
|
|
1685
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/webhooks', args);
|
|
1686
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1687
|
+
}
|
|
1688
|
+
catch (error) {
|
|
1689
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
fc_delete_webhook: async (args) => {
|
|
1693
|
+
try {
|
|
1694
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/webhooks/${args.id}`);
|
|
1695
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1696
|
+
}
|
|
1697
|
+
catch (error) {
|
|
1698
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1699
|
+
}
|
|
1700
|
+
},
|
|
1701
|
+
// ==================== SCHEDULED POST HANDLERS (PRO) ====================
|
|
1702
|
+
fc_list_scheduled_posts: async (args) => {
|
|
1703
|
+
try {
|
|
1704
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/scheduled-posts', { per_page: args.limit || 50 });
|
|
1705
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1706
|
+
}
|
|
1707
|
+
catch (error) {
|
|
1708
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
// ==================== MANAGER HANDLERS (PRO) ====================
|
|
1712
|
+
fc_list_managers: async (args) => {
|
|
1713
|
+
try {
|
|
1714
|
+
const params = { per_page: args.limit || 50 };
|
|
1715
|
+
if (args.space_id)
|
|
1716
|
+
params.space_id = args.space_id;
|
|
1717
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/managers', params);
|
|
1718
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1719
|
+
}
|
|
1720
|
+
catch (error) {
|
|
1721
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
fc_add_manager: async (args) => {
|
|
1725
|
+
try {
|
|
1726
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/managers', args);
|
|
1727
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1728
|
+
}
|
|
1729
|
+
catch (error) {
|
|
1730
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
fc_remove_manager: async (args) => {
|
|
1734
|
+
try {
|
|
1735
|
+
const response = await makeWordPressRequest('DELETE', `fc-manager/v1/managers/${args.id}`);
|
|
1736
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1737
|
+
}
|
|
1738
|
+
catch (error) {
|
|
1739
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
// ==================== LEADERBOARD HANDLERS (PRO) ====================
|
|
1743
|
+
fc_get_leaderboard: async (args) => {
|
|
1744
|
+
try {
|
|
1745
|
+
const params = { per_page: args.limit || 50 };
|
|
1746
|
+
if (args.period)
|
|
1747
|
+
params.period = args.period;
|
|
1748
|
+
const response = await makeWordPressRequest('GET', 'fc-manager/v1/leaderboard', params);
|
|
1749
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1750
|
+
}
|
|
1751
|
+
catch (error) {
|
|
1752
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1753
|
+
}
|
|
1754
|
+
},
|
|
1755
|
+
fc_add_points: async (args) => {
|
|
1756
|
+
try {
|
|
1757
|
+
const response = await makeWordPressRequest('POST', 'fc-manager/v1/leaderboard/points', args);
|
|
1758
|
+
return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
|
|
1759
|
+
}
|
|
1760
|
+
catch (error) {
|
|
1761
|
+
return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
557
1764
|
};
|