Class: RosettAi::Mcp::Tools::AdoptTool
- Inherits:
-
Object
- Object
- RosettAi::Mcp::Tools::AdoptTool
- Defined in:
- lib/rosett_ai/mcp/tools/adopt_tool.rb
Overview
MCP tool: run rai adopt analysis.
Performs local-only structural analysis of rai configuration. Read-only operation — does not modify any files.
Constant Summary collapse
- TOOL_NAME =
'rai_adopt'- DESCRIPTION =
'Run rai adopt analysis (local structural checks)'- ANNOTATIONS =
{ 'readOnlyHint' => true, 'destructiveHint' => false, 'idempotentHint' => true, 'openWorldHint' => false }.freeze
- INPUT_SCHEMA =
{ type: 'object', properties: { elaborate: { type: 'boolean', description: 'Show detailed findings (default: false)' }, verbose: { type: 'boolean', description: 'Show processing details (default: false)' } } }.freeze
Instance Method Summary collapse
-
#call(elaborate: false, verbose: false) ⇒ Hash
Executes the adopt analysis.
Instance Method Details
#call(elaborate: false, verbose: false) ⇒ Hash
Executes the adopt analysis.
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rosett_ai/mcp/tools/adopt_tool.rb', line 46 def call(elaborate: false, verbose: false) adopter = RosettAi::Adopter::LocalAnalyzer.new results = adopter.analyze(elaborate: elaborate) { status: results[:issues].empty? ? 'clean' : 'findings', issues: results[:issues], summary: results[:summary], verbose: verbose, elaborate: elaborate } rescue StandardError => e ResponseHelper.error("Adopt analysis failed: #{e.}") end |