Skip to main content
Glama

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
NameRequiredDescriptionDefault
post_idNoFilter comments by post ID
user_idNoFilter comments by user ID
statusNoFilter by status
limitNoNumber of comments to return

Implementation Reference

  • 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}` }] } }; } },
  • 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') });
  • 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 } },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wplaunchify/fluent-community-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server