Class: Tools::FindFaqsTool
- Inherits:
-
ApplicationTool
- Object
- MCP::Tool
- ApplicationTool
- Tools::FindFaqsTool
- Defined in:
- app/mcp/tools/find_faqs_tool.rb
Overview
MCP Tool for finding FAQ articles.
FAQs are technical questions and answers about WarmlyYours products.
Constant Summary collapse
- MAX_FAQ_WORDS =
ArticleFaq::FAQ_MAX_WORDS
Class Method Summary collapse
Class Method Details
.call(query: nil, ids: nil, product_line: nil, limit: 5, server_context: nil) ⇒ Object
53 54 55 56 57 58 |
# File 'app/mcp/tools/find_faqs_tool.rb', line 53 def call(query: nil, ids: nil, product_line: nil, limit: 5, server_context: nil) return find_by_ids(ids) if ids.present? return json_response(error: 'Either query or ids is required') if query.blank? find_by_query(query, product_line: product_line, limit: limit) end |