Class: Assistant::AhrefsToolBuilder
- Inherits:
-
Object
- Object
- Assistant::AhrefsToolBuilder
- Defined in:
- app/services/assistant/ahrefs_tool_builder.rb
Overview
Builds RubyLLM::Tool subclasses that wrap the Ahrefs MCP client.
Provides ahrefs_overview, ahrefs_top_pages, and ahrefs_organic_keywords tools.
Usage (via ChatToolBuilder):
tools = Assistant::AhrefsToolBuilder.tools
Class Method Summary collapse
-
.tools ⇒ Array<RubyLLM::Tool>
Ahrefs SEO tools.
Class Method Details
.tools ⇒ Array<RubyLLM::Tool>
Returns Ahrefs SEO tools.
13 14 15 16 17 18 19 20 21 22 |
# File 'app/services/assistant/ahrefs_tool_builder.rb', line 13 def tools @tools ||= [ build_ahrefs_overview_tool, build_ahrefs_top_pages_tool, build_ahrefs_organic_keywords_tool ] rescue StandardError => e Rails.logger.warn("[AhrefsToolBuilder] Failed to build Ahrefs tools: #{e.}") [] end |