Skip to main content
Glama

rails_get_service_pattern

Read-onlyIdempotent

Analyze Rails service objects to reveal their patterns, interfaces, dependencies, and side effects, helping you understand structure, add new services, or trace behavior.

Instructions

Analyze service objects in app/services/, app/interactions/ and app/interactors/: patterns, interfaces, dependencies, and side effects. Use when: understanding how services are structured, adding a new service, or tracing what a service does. Specify service:"CreateOrder" for full detail, or omit to detect the common pattern and list all services.

Input Schema

NameRequiredDescriptionDefault
detailNoDetail level. summary: names only. standard: names + method signatures + line counts (default). full: everything including side effects, error handling, and callers.
serviceNoService class name or filename (e.g. 'CreateOrder', 'create_order'). Omit to list all services with pattern detection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, and the description still adds real behavioral context: omitting `service` silently switches the tool into pattern-detection + list-all mode, and supplying it switches to single-service detail. It does not clarify whether the detail levels apply to both modes, which is the remaining ambiguity.

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

Conciseness5/5

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

Three sentences: what it analyzes, when to use it, and how to call it. Scope is front-loaded and every sentence carries unique information with no restatement of the name or title.

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?

With only two optional parameters, full schema coverage, and safety annotations present, the description covers what an agent needs to invoke it correctly, and no output schema means return-format explanation is not required. The one gap is the interaction between `service` and `detail` in "full detail" phrasing.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description earns extra credit by explaining the consequence of omitting `service` (pattern detection + full listing) and giving a concrete invocation example ("CreateOrder"). It leaves a small tension between "Specify service for full detail" and the separate `detail` enum that determines detail level.

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?

Specific verb ("Analyze") plus specific resource (service objects in app/services/, app/interactions/, app/interactors/) and an enumeration of what is reported: patterns, interfaces, dependencies, side effects. The named directories separate it from siblings like rails_get_job_pattern and rails_get_concern without needing to open a schema.

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?

"Use when: understanding how services are structured, adding a new service, or tracing what a service does" gives concrete triggering contexts, and the final sentence gives the two invocation modes (with vs. without the service param). It stops short of naming sibling alternatives or exclusions, so it stops at 4 rather than 5.

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