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 =
Maximum 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
55 56 57 58 59 60 |
# File 'app/mcp/tools/find_faqs_tool.rb', line 55 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 |