Skip to main content
Glama

rails_get_stimulus

Read-onlyIdempotent

Fetch Stimulus controller targets, values, actions, outlets, and classes to wire views, add behavior, or check existing setup. Filter by controller name or list all.

Instructions

Get Stimulus controllers: targets, values, actions, outlets, classes. Use when: wiring up data-controller attributes in views, adding targets/values, or checking existing Stimulus behavior. Filter with controller:"filter-form" for one controller's full API, or list all with detail:"summary".

Input Schema

NameRequiredDescriptionDefault
limitNoMax controllers to return when listing. Default: 50.
detailNoDetail level. summary: names + counts. standard: targets + values + actions (default). full: everything including outlets, classes, HTML usage.
offsetNoSkip this many controllers for pagination. Default: 0.
controllerNoSpecific Stimulus controller name (e.g. 'hello', 'filter-form'). Case-insensitive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A4/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 elsewhere. The description adds useful context about default detail level and the filter-vs-list modes, but says nothing about source of truth (static parse vs runtime), staleness, or error behavior when a controller name doesn't exist.

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 tight sentences, front-loaded with the resource and its payload, then usage, then parameter modes. Every clause carries information an agent needs; no filler.

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 no output schema, the description does the work of describing return content (targets, values, actions, outlets, classes) and how detail levels modulate it, which is sufficient to call correctly. Minor gap: no indication of what happens for unknown controller names or how large default listings behave at limit 50.

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%, so all four parameters are already documented, including the detail enum and defaults — baseline 3 applies. The description reinforces this with a concrete example ('controller:"filter-form"') and a usage pairing ('list all with detail:"summary"'), but adds no format or constraint detail beyond 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?

Names a specific verb and resource ('Get Stimulus controllers') and enumerates exactly what is extracted: targets, values, actions, outlets, classes. That enumeration distinguishes it clearly from the similarly named rails_get_controllers (Rails controllers) and from rails_get_view or rails_get_partial_interface.

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?

Provides an explicit 'Use when' list of concrete scenarios: wiring data-controller attributes, adding targets/values, checking existing Stimulus behavior. It also explains the two operating modes (filter by one controller vs list all at summary detail). It stops short of naming a when-not condition or an alternative sibling tool.

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