class Riffer::Mcp::SearchTool
Searches available MCP tools by name or description.
Constants
- IDENTIFIER
Public Instance Methods
Source
# File lib/riffer/mcp/search_tool.rb, line 31 def call(context:, query:) return error("Provide a search query to find MCP tools by name or description.") if query.strip.empty? tools = context&.mcp_progressive_tools || [] matches = filter(tools, query) return text("No tools found matching '#{query}'.") if matches.empty? names = matches.map(&:name).join(", ") Result.new( "Found #{matches.length} tool(s): #{names}. They are now available — call them directly.", matches ) end
Searches progressive MCP tools and returns a Result with discovered_tools.