class RubyLLM::MCP::Resource

A resource on an MCP server: a file, a record, or any data the server names with a URI. Pass one to a chat like any attachment, or save it.

readme = files.resource("file:///project/README.md")
readme.content                 # => "# My Project..."
readme.save("README.md")
chat.ask "Summarize this", with: readme

Resources from MCP#resources are read from the server the first time their content is needed.