get_faq_categories
Retrieve all available FAQ categories from the FitSlot support system to help users find relevant help topics and solutions.
Instructions
Get all available FAQ categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/chatbot.tools.ts:126-170 (handler)Handler for get_faq_categories tool: no input params, calls service to get categories, returns JSON success/error response.get_faq_categories: { description: 'Get all available FAQ categories', parameters: z.object({}), execute: async () => { try { logger.info('Getting FAQ categories'); const categories = chatbotService.getCategories(); return { content: [ { type: 'text', text: JSON.stringify( { success: true, categories }, null, 2 ) } ] }; } catch (error) { logger.error('Failed to get FAQ categories', error); return { content: [ { type: 'text', text: JSON.stringify( { success: false, error: error instanceof Error ? error.message : 'Unknown error' }, null, 2 ) } ], isError: true }; } } },
- src/index.ts:60-68 (registration)Tool registration: creates chatbotTools via createChatbotTools(chatbotService) and merges into allTools used by MCP server for tool listing and execution.const ticketTools = createTicketTools(apiService); const chatbotTools = createChatbotTools(chatbotService); const pdfTools = createPDFTools(pdfService); const allTools = { ...ticketTools, ...chatbotTools, ...pdfTools };
- Helper method getCategories() extracts unique categories from the faqs array populated in initializeFAQs().getCategories(): string[] { return [...new Set(this.faqs.map(faq => faq.category))]; }
- src/tools/chatbot.tools.ts:128-128 (schema)Input schema: empty object (no parameters required).parameters: z.object({}),