fc_search_content
Search across FluentCommunity posts, comments, spaces, and users to find specific content using targeted queries and filters.
Instructions
Search across all FluentCommunity content (posts, comments, spaces)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| content_type | No | Type of content to search | all |
| space_id | No | Limit search to specific space | |
| limit | No | Number of results to return |
Implementation Reference
- src/tools/fluent-community.ts:502-517 (handler)Handler function for fc_search_content tool that performs a search query on FluentCommunity content via WordPress API.fc_search_content: async (args: any) => { try { const params: any = { query: args.query, content_type: args.content_type || 'all', per_page: args.limit || 20, }; if (args.space_id) params.space_id = args.space_id; const response = await makeWordPressRequest('GET', 'fc-manager/v1/search', 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_search_content tool.const searchContentSchema = z.object({ query: z.string().describe('Search query'), content_type: z.enum(['all', 'posts', 'comments', 'spaces']).optional().default('all').describe('Type of content to search'), space_id: z.number().optional().describe('Limit search to specific space'), limit: z.number().optional().default(20).describe('Number of results to return') });
- src/tools/fluent-community.ts:255-259 (registration)Registration of the fc_search_content tool in the fluentCommunityTools array.{ name: 'fc_search_content', description: 'Search across all FluentCommunity content (posts, comments, spaces)', inputSchema: { type: 'object', properties: searchContentSchema.shape } },