Skip to main content
Glama

rails_validate

Read-onlyIdempotent

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).

Input Schema

NameRequiredDescriptionDefault
filesYesFile paths relative to Rails root (e.g. ['app/models/post.rb', 'app/views/posts/index.html.erb'])
levelNoValidation level. syntax: check syntax only (default, fast). rails: syntax + semantic checks (partial existence, route helpers, column refs in validates/permit/callbacks).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds that multiple files are handled in a single call and enumerates what the semantic layer catches (missing partials, route helpers, column refs), which is useful context, but says nothing about cost, output format, or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three front-loaded sentences with no filler, and the when-to-use guidance appears early. There is minor redundancy: the enumerated semantic checks in the final parenthetical repeat the level parameter's schema description almost verbatim.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a validator there is no output schema, and the description never indicates what a result looks like (per-file pass/fail, diagnostic list, error locations, how semantic errors are reported). Annotations do cover side effects, but the agent cannot predict the response shape before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and both parameters carry descriptions that already explain the rails-vs-syntax level distinction in nearly the same words. The description's concrete example call files:["app/models/user.rb"] with level:"rails" adds a little illustrative value, but the semantic content largely duplicates the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (validate) against specific resources (Ruby, ERB, JavaScript files) and adds the distinguishing scope detail of syntax vs. semantic checking in a single call. No sibling tool in the list offers validation, so the purpose is unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Use when: after editing files, before committing, to catch syntax errors and Rails-specific issues' clause gives concrete trigger points an agent can act on. It doesn't point at an alternative or say when not to call it, but the retrieval-plus-validate workflow is clearly implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.