rails_diagnose
Diagnose Rails errors in one call: parse and classify the exception, gather controller/model/schema context, inspect recent git changes and logs, then suggest a fix.
Instructions
One-call error diagnosis: parses the error, classifies it, gathers controller/model/schema context, shows recent git changes, pulls relevant logs, and suggests a fix. Use when: you hit an error and need to understand why. Key params: error (required - paste the error message), file, line, action (controller#action).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"error": "<error>"
},
"name": "rails_diagnose"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File where error occurs, relative to Rails root (e.g. 'app/controllers/posts_controller.rb'). | |
| line | No | Line number where the error occurs. | |
| error | Yes | Error message or exception (e.g. 'NoMethodError: undefined method `foo` for nil:NilClass'). | |
| action | No | Controller#action format (e.g. 'posts#create'). Pulls full action context. |