Class: SearchTool

Inherits:
FastMcp::Tool
  • Object
show all
Defined in:
lib/yardmcp.rb

Overview

Tool: Perform fuzzy/full-text search

Instance Method Summary collapse

Instance Method Details

#call(query:) ⇒ Object



410
411
412
413
414
# File 'lib/yardmcp.rb', line 410

def call(query:)
  # Enhanced search: ranked, fuzzy, and full-text
  results = YardUtils.instance.search(query)
  { content: results.map { |result| { text: result[:path], score: result[:score], type: 'search_result' } } }
end