fc_list_spaces
List and filter FluentCommunity spaces by status, type, privacy settings, or search terms to manage community content organization.
Instructions
List all spaces in FluentCommunity
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by status | |
| type | No | Filter by space type | |
| privacy | No | Filter by privacy setting | |
| limit | No | Number of spaces to return | |
| search | No | Search term |
Implementation Reference
- src/tools/fluent-community.ts:358-371 (handler)Handler function that executes the fc_list_spaces tool logic by constructing parameters and making a WordPress API request to fetch spaces.fc_list_spaces: async (args: any) => { try { const params: any = { per_page: args.limit || 20 }; if (args.status) params.status = args.status; if (args.privacy) params.privacy = args.privacy; if (args.search) params.search = args.search; const response = await makeWordPressRequest('GET', 'fc-manager/v1/spaces', 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:48-53 (schema)Zod input schema defining parameters for the fc_list_spaces tool: status, privacy, limit, search.const listSpacesSchema = z.object({ status: z.enum(['active', 'inactive', 'archived']).optional().describe('Filter by status'), privacy: z.enum(['public', 'private']).optional().describe('Filter by privacy setting'), limit: z.number().optional().default(20).describe('Number of spaces to return'), search: z.string().optional().describe('Search term') });
- src/tools/fluent-community.ts:194-198 (registration)Registration of the fc_list_spaces tool in the fluentCommunityTools array, specifying name, description, and input schema.{ name: 'fc_list_spaces', description: 'List all spaces in FluentCommunity', inputSchema: { type: 'object', properties: listSpacesSchema.shape } },