Class: RailsAiBridge::Tools::GetConfig
- Defined in:
- lib/rails_ai_bridge/tools/get_config.rb
Overview
MCP tool exposing application configuration (cache, session, timezone, middleware, initializers).
Class Method Summary collapse
-
.call(_server_context: nil) ⇒ MCP::Tool::Response
Markdown configuration summary or an error message.
Methods inherited from BaseTool
cached_context, cached_section, config, rails_app, reset_cache!, text_response
Class Method Details
.call(_server_context: nil) ⇒ MCP::Tool::Response
Returns markdown configuration summary or an error message.
16 17 18 19 20 21 22 23 |
# File 'lib/rails_ai_bridge/tools/get_config.rb', line 16 def self.call(_server_context: nil) data = cached_section(:config) return text_response('Config introspection not available. Add :config to introspectors or use `config.preset = :full`.') unless data return text_response("Config introspection failed: #{data[:error]}") if data[:error] formatter = ResponseFormatter.new(data) text_response(formatter.format) end |