Skip to main content
Glama

rails_get_model_details

Read-onlyIdempotent

Retrieve ActiveRecord model details—associations, validations, scopes, enums, callbacks, concerns—to understand relationships and check existing behavior before edits.

Instructions

Get ActiveRecord model details: associations, validations, scopes, enums, callbacks, concerns. Use when: understanding model relationships, adding validations, checking existing scopes/callbacks. Specify model:"User" for full detail, or omit for a list. detail:"full" shows association lists.

Input Schema

NameRequiredDescriptionDefault
limitNoMax models to return when listing. Default: 50.
modelNoModel class name (e.g. 'User', 'Post'). Omit to list all models.
detailNoDetail level for model listing. summary: names only. standard: names + association/validation counts (default). full: names + full association list. Ignored when specific model is given (always returns full).
offsetNoSkip this many models for pagination. Default: 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A3.6/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 closed-world scope, so the safety profile is fully covered. The description adds a genuine behavioral rule (omitting model returns a list; giving a model always returns full detail, so detail is moot), but says nothing about source of truth, performance, or truncation beyond what the schema states.

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 sentences/fragments with the purpose and the model-vs-list decision front-loaded, and no filler. Slightly clipped phrasing ('Use when: ... Specify model:...') reads as shorthand but wastes no 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?

Four optional params with no output schema, and the description covers the key invocation decision (single model vs listing) plus the detail-level semantics. Pagination and default limit behavior are delegated to the schema, which is acceptable given its 100% coverage.

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?

With schema coverage at 100%, every parameter including limit, offset and the detail enum is already documented in structured data. The description's 'Specify model:"User"' example and 'detail:"full" shows association lists' largely restate the schema's own text, so it adds only marginal meaning.

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

Purpose4/5

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

Opens with a specific verb+resource ('Get ActiveRecord model details') and enumerates the exact content returned: associations, validations, scopes, enums, callbacks, concerns. It is clearly distinct from siblings like rails_get_routes or rails_get_schema, though it does not disambiguate itself from rails_get_callbacks or rails_get_concern, which overlap with two of the listed categories.

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:' clause gives three concrete scenarios (understanding relationships, adding validations, checking existing scopes/callbacks), which is real guidance rather than an implied purpose. It stops short of naming alternatives or exclusions, e.g. it never says when to reach for rails_get_callbacks or rails_get_concern instead.

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