Class: Legion::MCP::Tools::MindGrowthHealth

Inherits:
MCP::Tool
  • Object
show all
Extended by:
Logging::Helper
Defined in:
lib/legion/mcp/tools/mind_growth_health.rb

Class Method Summary collapse

Class Method Details

.callObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/legion/mcp/tools/mind_growth_health.rb', line 15

def call
  log.info('Starting legion.mcp.tools.mind_growth_health.call')
  return error_response('lex-mind-growth is not available') unless mind_growth_available?

  result = mind_growth_client.validate_fitness(extensions: [])
  text_response(result)
rescue StandardError => e
  handle_exception(e, level: :warn, operation: 'legion.mcp.tools.mind_growth_health.call')
  log.warn("MindGrowthHealth#call failed: #{e.message}")
  error_response("Failed to get mind growth health: #{e.message}")
end