Post

I spent a lot of time and effort building custom generators for RubyEvents event data only to have AI ignore them in favor of MCP tools and direct editing. I started to think about turning my generators into MCP tools. Carefully wrapping each one and invoking it.

therubyonrails.bsky.social@therubyonrails.bsky.social

I saw that happen earlier this year at RubyConf. Joining me today on The Ruby on Rails Podcast are guests Rachael Wright-Munn and Andy Andrea to talk about how it all came together. Listen here: www.therubyonrailspodcast.com/548

That's when I saw @andycandrea.bsky.social's talk about abusing schemas using metaprogramming. He built RubyLLM tools out of OpenAPI schemas and asked the question - should we? And I said, "Yes, please and thank you, but with generators." www.rubyevents.org/talks/the-li...

rubyevents.orgThe little schema that could (...but should it?)Even in a duck-typed language like Ruby, we often work with structured data that adheres to particular schemas. For anyone that's worked in a Rails app, a schema.rb or structure.sql file is an inheren...

0 reposts0 likes

After an intense pairing session over lunch and dinner (and a great deal of excitement on my part) we had a working PR to build RubyLLM tools out of custom Rails generators!!! ✨ github.com/rubyevents/r... We did a few revisions after, but these are live on RubyEvents, and they work great! ✨

github.comGenerate RubyLLM tools from Rails generators by andycandrea · Pull Request #1955 · rubyevents/rubyeventsDescription Generates RubyLLM tools based on each of the generators that exists in lib/generators/ to enable LLMs to make easy and deterministic data updates that will hopefully also cost fewer tok...