Skip to main content
Glama

rails_review_changes

Read-only

Review PRs or commits with per-file schema, model, and route context, and flag warnings like missing indexes, removed validations, changed associations, or untested routes.

Instructions

PR/commit review context: shows changed files with relevant schema/model/route context per file, detects warnings (missing indexes, removed validations, changed associations, new routes without tests). Use when: reviewing changes before merging, understanding what a commit changed and its impact. Key params: ref (default 'HEAD' for uncommitted, or 'main', 'HEAD~3', commit SHA).

Input Schema

NameRequiredDescriptionDefault
refNoGit ref to diff against. 'HEAD' = uncommitted changes (default). 'main' = diff from main. 'HEAD~3' = last 3 commits. 'abc123' = specific commit.
filesNoFilter to files or directories (relative to Rails root). Omit to review all changed files.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly=true, destructive=false, openWorld=true, and idempotent=false. The description adds real value beyond that by disclosing what the output contains (per-file schema/model/route context) and what classes of warnings are surfaced (missing indexes, removed validations, changed associations, untested routes). It says nothing about behavior with very large diffs or performance limits, which is the main remaining gap.

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 compact, front-loaded segments: what it shows, when to use it, key params. Efficient overall, though the 'ref' recap duplicates schema content rather than adding new information, which is a minor waste of the limited space.

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

Completeness4/5

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

There is no output schema, so the description must carry the return-value burden — it does so at a high level by naming per-file context and warning categories. For a two-optional-parameter read tool with full annotation coverage, that is nearly sufficient; a brief note on output shape (grouped by file? ranked warnings?) would close the gap.

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 description coverage is 100%, so the baseline is 3. The description restates the 'ref' semantics ('default HEAD for uncommitted, or main, HEAD~3, commit SHA') which is already fully documented in the schema, and never mentions the 'files' filter parameter at all.

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?

The description opens with a specific verb and resource — 'PR/commit review context: shows changed files with relevant schema/model/route context per file' — and adds a second concrete capability (warning detection with named categories). This is clearly distinguishable from sibling context tools like rails_get_edit_context or rails_get_context, which are not diff-scoped.

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?

It gives an explicit 'Use when:' clause with two concrete scenarios (reviewing before merge, understanding a commit's impact). It does not name a sibling alternative or state when not to use it, so it stops short of the top mark.

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