Skip to main content
Glama

fc_list_posts

Retrieve and filter community posts by space, user, status, type, or search terms to manage content effectively.

Instructions

List all posts from FluentCommunity with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idNoFilter posts by space ID
user_idNoFilter posts by user ID
statusNoFilter by status (published, draft, etc.)
typeNoFilter by post type (text, video, etc.)
limitNoNumber of posts to return (default: 20)
offsetNoOffset for pagination (default: 0)
searchNoSearch term to filter posts

Implementation Reference

  • Handler function for fc_list_posts tool that makes a GET request to the WordPress API endpoint 'fc-manager/v1/posts' with filtering parameters and returns the response.
    fc_list_posts: async (args: any) => { try { const params: any = { per_page: args.limit || 20, offset: args.offset || 0, }; if (args.space_id) params.space_id = args.space_id; if (args.user_id) params.user_id = args.user_id; if (args.status) params.status = args.status; if (args.type) params.type = args.type; if (args.search) params.search = args.search; const response = await makeWordPressRequest('GET', 'fc-manager/v1/posts', 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 schema defining input parameters for the fc_list_posts tool, including optional filters like space_id, user_id, status, type, limit, offset, and search.
    const listPostsSchema = z.object({ space_id: z.number().optional().describe('Filter posts by space ID'), user_id: z.number().optional().describe('Filter posts by user ID'), status: z.enum(['published', 'draft', 'pending', 'archived']).optional().describe('Filter by status'), type: z.string().optional().describe('Filter by post type (text, video, etc.)'), limit: z.number().optional().default(20).describe('Number of posts to return'), offset: z.number().optional().default(0).describe('Offset for pagination'), search: z.string().optional().describe('Search term to filter posts') });
  • Tool registration object in fluentCommunityTools array, defining the name, description, and inputSchema for fc_list_posts.
    name: 'fc_list_posts', description: 'List all posts from FluentCommunity with optional filtering', inputSchema: { type: 'object', properties: listPostsSchema.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