Class: RailsAiBridge::Tools::GetConventions
- Defined in:
- lib/rails_ai_bridge/tools/get_conventions.rb
Overview
MCP tool exposing detected architecture, patterns, directory layout, and config files.
Class Method Summary collapse
-
.call(_server_context: nil) ⇒ MCP::Tool::Response
Markdown convention 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 convention summary or an error message.
17 18 19 20 21 22 23 24 |
# File 'lib/rails_ai_bridge/tools/get_conventions.rb', line 17 def self.call(_server_context: nil) conventions = cached_section(:conventions) return text_response('Convention detection not available. Add :conventions to introspectors.') unless conventions return text_response("Convention detection failed: #{conventions[:error]}") if conventions[:error] formatter = ResponseFormatter.new(conventions) text_response(formatter.format) end |