Method: ActionMCP::Configuration#filtered_tools

Defined in:
lib/action_mcp/configuration.rb

#filtered_toolsObject

Filter tools based on active profile



181
182
183
184
185
186
187
188
# File 'lib/action_mcp/configuration.rb', line 181

def filtered_tools
  return ToolsRegistry.non_abstract if should_include_all?(:tools)

  tool_names = @profiles[active_profile][:tools] || []
  # Convert tool names to underscored format
  tool_names = tool_names.map { |name| name.to_s.underscore }
  ToolsRegistry.non_abstract.select { |tool| tool_names.include?(tool.name.underscore) }
end