get_all_faqs
Retrieve all frequently asked questions across all categories to provide comprehensive support information and chatbot assistance.
Instructions
Get all available FAQs across all categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/chatbot.tools.ts:230-275 (handler)The execute handler function for the 'get_all_faqs' tool. It retrieves all FAQs from the ChatbotService, formats them into a JSON response, and handles errors.execute: async () => { try { logger.info('Getting all FAQs'); const faqs = chatbotService.getAllFAQs(); return { content: [ { type: 'text', text: JSON.stringify( { success: true, count: faqs.length, faqs: faqs.map(faq => ({ question: faq.question, answer: faq.answer, category: faq.category })) }, null, 2 ) } ] }; } catch (error) { logger.error('Failed to get all FAQs', error); return { content: [ { type: 'text', text: JSON.stringify( { success: false, error: error instanceof Error ? error.message : 'Unknown error' }, null, 2 ) } ], isError: true }; } }
- src/tools/chatbot.tools.ts:229-229 (schema)Zod input schema for the tool: no parameters required.parameters: z.object({}),
- src/index.ts:60-68 (registration)Registration of chatbotTools (including get_all_faqs) into allTools object, which is used by the MCP server's ListTools and CallTool request handlers.const ticketTools = createTicketTools(apiService); const chatbotTools = createChatbotTools(chatbotService); const pdfTools = createPDFTools(pdfService); const allTools = { ...ticketTools, ...chatbotTools, ...pdfTools };
- Helper method in ChatbotService that returns all loaded FAQs.getAllFAQs(): SupportFAQ[] { return this.faqs; }