ask_support
Get answers to support questions with related FAQs and suggested actions for FitSlot services and bioimpedance analysis.
Instructions
Ask a support question and get helpful responses with related FAQs and suggested actions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- src/tools/chatbot.tools.ts:17-67 (handler)The execute function implementing the core logic of the 'ask_support' tool. It processes the user query, fetches response from ChatbotService, and returns structured JSON output or error.execute: async (args: { query: string }) => { try { logger.info('Processing support query', args); validateNotEmpty(args.query, 'Query'); const response = await chatbotService.getChatbotResponse(args.query); return { content: [ { type: 'text', text: JSON.stringify( { success: true, response: { message: response.message, relatedFAQs: response.relatedFAQs?.map(faq => ({ question: faq.question, answer: faq.answer, category: faq.category })), suggestedActions: response.suggestedActions } }, null, 2 ) } ] }; } catch (error) { logger.error('Failed to process support query', 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:13-16 (schema)Zod schema definition for the 'ask_support' tool input parameters, specifying the required 'query' string.description: 'Ask a support question and get helpful responses with related FAQs and suggested actions', parameters: z.object({ query: z.string().describe('The user\'s question or support query') }),
- src/index.ts:60-68 (registration)Registration of the chatbot tools (including 'ask_support') by creating the tools object and merging into the central 'allTools' used by MCP server's ListTools and CallTool handlers.const ticketTools = createTicketTools(apiService); const chatbotTools = createChatbotTools(chatbotService); const pdfTools = createPDFTools(pdfService); const allTools = { ...ticketTools, ...chatbotTools, ...pdfTools };