Class: SearchTool
Overview
Tool: Perform fuzzy/full-text search
Instance Method Summary collapse
Methods inherited from YardTool
Instance Method Details
#call(query:, gem_name: nil, limit: 25, offset: 0) ⇒ Object
756 757 758 759 760 761 |
# File 'lib/yardmcp.rb', line 756 def call(query:, gem_name: nil, limit: 25, offset: 0) with_yard_errors do results = YardUtils.instance.search(query, gem_name, limit:, offset:) ok({ query:, gem_name:, limit:, offset:, results: }, text: results.map { |result| "#{result[:score]}\t#{result[:path]}" }.join("\n")) end end |