MCP server exposing Rails version diffs from railsdiff/rails-new-output
Rails Diff MCP has three well-structured tools with solid naming conventions, clear descriptions, and proper input schemas. All tools start with action verbs (list_, compare_, get_) following the pattern:tool convention. Descriptions are concise and actionable (ranging from ~80-180 chars, within the 10-1024 baseline). Input parameters are typed with Zod schemas and include descriptions. Tool annotations (readOnlyHint, openWorldHint) are correctly applied. However, output schemas are not explicitly documented in the tool definitions, and error handling, while present, could be more granular. The server demonstrates good fundamentals but lacks production-grade polish in schema documentation and error categorization.
Compare two Rails versions to see what changed in the `rails new` output. Returns a list of changed files with their diffs. Use `get_file_diff` to retrieve the patch for individual files.
Get the diff/patch for a specific file between two Rails versions. Use compare_rails_versions first to see which files changed.
List all available Rails versions that can be compared. Returns a sorted list of version strings.
Output schemas not documented in tool definitions. LLMs cannot plan downstream operations without knowing what fields to expect in responses. While responses are structured (text content, isError flag), the data model is not formally declared in the tool metadata.
Error responses lack actionable recovery guidance for LLMs. When a version is unknown (e.g., 'Unknown source version: 7.3.0'), the error tells the user to call list_rails_versions but does not provide a structured alternative list. Pattern recovery-guide recommends including available options to enable self-correction.
Parameters source, target, and filename lack constraints documentation. No minimum/maximum length, regex pattern, or allowed format guidance. LLMs cannot validate input before calling and may pass arbitrary strings that fail silently.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | A | 80 | <=2025-11-25 | v2 |
Example version numbers in descriptions ('7.1.0', '7.2.0') may be reused literally by LLMs in unrelated contexts. Guidelines recommend using constraints (enums) or patterns rather than examples in descriptions.