Class: Phlex::Reactive::MCP::Tools::DoctorTool
- Defined in:
- lib/phlex/reactive/mcp/tools/doctor_tool.rb
Overview
phlex_reactive_doctor — the install validator's checks as structured
JSON (name/status/message/fix), the same data bin/rails phlex_reactive:doctor prints as text.
Class Method Summary collapse
-
.call(server_context: nil) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
Methods inherited from BaseTool
annotations_value, eager_load_app!, error_response, json_response
Class Method Details
.call(server_context: nil) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
24 25 26 27 28 29 30 31 |
# File 'lib/phlex/reactive/mcp/tools/doctor_tool.rb', line 24 def self.call(server_context: nil) # rubocop:disable Lint/UnusedMethodArgument eager_load_app! doctor = Phlex::Reactive::Doctor.new checks = doctor.checks.map do { name: it.name, status: it.status, message: it., fix: it.fix } end json_response(checks: checks, ok: !doctor.failures?) end |