class Riffer::Mcp::SearchTool
rbs_inline: enabled
Constants
- IDENTIFIER
Public Instance Methods
Source
# File lib/riffer/mcp/search_tool.rb, line 27 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