class RubyLLM::MCP::ResourceTemplate
A family of resources on an MCP server, named by a URI template.
template = files.resource_templates.first template.uri # => "file:///{path}" template.suggest(path: "app/mo") # => ["app/models/"] files.resource(template.uri, path: "Gemfile")
Attributes
What the resources are, or nil.
The MIME type of the resources, or nil.
The template’s name.
A human-readable title, or nil.
The URI template, such as "file:///{path}".
Public Instance Methods
Source
# File lib/ruby_llm/mcp/resource_template.rb, line 88 def suggest(**variables) @mcp.suggest({ type: 'ref/resource', uri: }, variables) end
Asks the server to complete a variable’s partial value. Pass one variable to complete and any others that are already filled in. Returns an Array of suggested values.
template.suggest(path: "app/mo") # => ["app/models/"]