get_callbacks
Callbacks in Rails execution order with source
How to use it
get_callbacks is exposed by the Rails Ai Context MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the get_callbacks tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
FULL RAILS AI CONTEXT LISTINGOther tools in Rails Ai Context (39)
Full-stack: models + controllers + routes + services + jobs + views + tests
Model/service dependency graph in Mermaid or text format
Test scaffolding matching your project's patterns
Concerns registry, deprecators, MessageVerifier usage, onload hooks, cache store
Zeitwerk mode, autoload/eager-load paths, collapsed dirs, custom inflections
ViewComponent/Phlex: props, slots, previews, sidecar assets
Concern methods + source + which models include it
Database, auth framework, assets, cache, queue, Action Cable
Composite: schema + model + controller + routes + views in one call
Actions + inherited filters + render map + strong params
Auth checks, flash messages, create action template, test patterns
Method-aware code extraction with class context
Mounted engines (with known-engine descriptions) + loaded engine classes
Environment variables + credentials keys (not values)
Per-environment config: notable toggles + every config key each env sets
React/Vue/Svelte/Angular, Hotwire, TypeScript, package manager
Notable gems with versions, categories, config file locations
App + framework helpers with view cross-references
Locales, translation files with key counts, per-locale coverage, fallbacks
Queue, retries, guard clauses, broadcasts, schedules
Mailer classes with delivery actions and delivery method
AST-parsed associations, validations, scopes, enums, macros - each result tagged [VERIFIED] or [INFERRED]
What locals to pass + what methods are called on them
Code-ready helpers (postpath(@record)) + required params
Columns with indexed/unique/encrypted/default hints
Interface, dependencies, side effects, callers
HTML data-attributes (dashes!) + targets + values + actions
Fixtures + relationships + test template matching your patterns
Broadcast → subscription wiring + mismatch warnings
Templates with ivars, Turbo wiring, Stimulus refs, partial locals
Migration code generation with reversibility + affected models
Narrative app walkthrough (quick/standard/full)
N+1 risks, missing indexes, countercache, eager load candidates
Safe read-only SQL with timeout, row limit, column redaction
Reverse file tail with level filtering and sensitive data redaction
Trace: definition + source + callers + tests. Also: definition, call, class filters
Bundled topic index with weighted keyword search
Brakeman static analysis - SQL injection, XSS, mass assignment
Syntax + semantic + Brakeman security in one call