fc_list_comments
Retrieve and filter comments from FluentCommunity posts using criteria like post ID, user ID, or status to manage community discussions.
Instructions
List comments for a specific post or all comments
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_id | No | Filter comments by post ID | |
| user_id | No | Filter comments by user ID | |
| status | No | Filter by status | |
| limit | No | Number of comments to return |
Implementation Reference
- src/tools/fluent-community.ts:411-423 (handler)Handler function for fc_list_comments tool that fetches comments from WordPress API with optional filters for post_id and user_id.fc_list_comments: async (args: any) => { try { const params: any = { per_page: args.limit || 50 }; if (args.post_id) params.post_id = args.post_id; if (args.user_id) params.user_id = args.user_id; const response = await makeWordPressRequest('GET', 'fc-manager/v1/comments', params); return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } }; } catch (error: any) { return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } }; } },
- src/tools/fluent-community.ts:75-79 (schema)Zod input schema defining parameters for listing comments: post_id, user_id, limit.const listCommentsSchema = z.object({ post_id: z.number().optional().describe('Filter comments by post ID'), user_id: z.number().optional().describe('Filter comments by user ID'), limit: z.number().optional().default(50).describe('Number of comments to return') });
- src/tools/fluent-community.ts:216-220 (registration)Tool registration in the fluentCommunityTools array, defining name, description, and input schema.{ name: 'fc_list_comments', description: 'List FluentCommunity comments for a specific post or all comments', inputSchema: { type: 'object', properties: listCommentsSchema.shape } },