Class: RailsMcpInsight::Tools::AuditGems

Inherits:
MCP::Tool
  • Object
show all
Defined in:
lib/rails_mcp_insight/tools/audit_gems.rb

Class Method Summary collapse

Class Method Details

.call(server_context:) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/rails_mcp_insight/tools/audit_gems.rb', line 15

def self.call(server_context:)
  config = Configuration.new(project_path: server_context&.dig(:project_path) || Dir.pwd)
  analyzer = Analyzers::GemAnalyzer.new(config)
  result = analyzer.analyze

  MCP::Tool::Response.new([{ type: "text", text: JSON.pretty_generate(result) }])
end