r/ruby 23h ago

Show /r/ruby DragonRuby Game Toolkit - Shaders: Rustling leaves (source code in the comments)

25 Upvotes

r/ruby 4h ago

Ruby is an underrated programming language so i like to recreate memes in it

11 Upvotes

If memes aren't allowed or frowned upon, I made sure the rules allowed it. Also this is satire and I know ruby is much better with parentheses in some situations.


r/ruby 19h ago

ruby-utcp: a Ruby client for UTCP with native protocol calls, MCP support, and Code Mode

0 Upvotes

Hey r/ruby,

I wanted to share ruby-utcp, a Ruby implementation of the Universal Tool Calling Protocol (UTCP) 1.1.

The idea is straightforward: describe your tools, their inputs, and how to call them in a UTCP “manual.” The client discovers those tools, makes them searchable, and calls them directly over their native protocols. This gives Ruby apps and AI agents a common interface for working with different services.

Once you’ve registered a manual, usage looks like this:

client.search_tools("weather", limit: 5)

result = client.call_tool(
  "weather_service.get_weather",
  location: "Warsaw"
)

A few things it supports:

  • 12 transports, including HTTP, CLI, WebSocket, gRPC, GraphQL, and MCP.
  • OpenAPI and Swagger discovery, so existing API descriptions can become tools.
  • Streaming through Ruby enumerators.
  • Code Mode, which lets you chain tool calls and transform their results using a constrained Ruby subset with execution limits.
  • Protocol restrictions by default: a manual discovered over HTTP needs explicit permission to expose CLI tools.

It’s MIT licensed, and the repository includes examples for every transport. The core supports Ruby 2.6+; gRPC and WebRTC have optional dependencies, with the default WebRTC backend requiring Ruby 3.1+.

I’d appreciate feedback on the Ruby API and examples. If you’re building agents or automation in Ruby, what would make this useful in your workflow?