ruby-sdk icon indicating copy to clipboard operation
ruby-sdk copied to clipboard

Design differences between Tools/Prompts vs Resources

Open andyw8 opened this issue 5 months ago • 0 comments

Hi, I am trying to understand why tools and prompts use inheritance, but resources don't.

For example, couldn't resources look something like this:

class ExampleResource < MCP::Resource
  uri "https://example.com/my_resource"
  name "My Resource"
  description "Lorem ipsum dolor sit amet"
  mime_type "text/html"

  class << self
    def call(params:)
      # ...
    end
  end
end

andyw8 avatar Jul 28 '25 14:07 andyw8