rails_validate
Validate Ruby, ERB, and JavaScript files for syntax and Rails-specific semantic errors before committing, catching missing partials, route helpers, and column references.
Instructions
Validate syntax and semantics of Ruby, ERB, and JavaScript files in a single call. Use when: after editing files, before committing, to catch syntax errors and Rails-specific issues. Pass files:["app/models/user.rb"], use level:"rails" for semantic checks (missing partials, route helpers, column refs in validates/permit/callbacks).
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": {
"files": "<files>"
},
"name": "rails_validate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | File paths relative to Rails root (e.g. ['app/models/post.rb', 'app/views/posts/index.html.erb']) | |
| level | No | Validation level. syntax: check syntax only (default, fast). rails: syntax + semantic checks (partial existence, route helpers, column refs in validates/permit/callbacks). |