MCProtocol::Resource
Inherits JSON::Serializable < Reference < Object
A known resource that the server is capable of reading.
Constructors
new(name : String, uri : URI, annotations : ResourceAnnotations | Nil = Nil, description : String | Nil = Nil, mimeType : String | Nil = Nil, size : Int64 | Nil = Nil)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
annotations
Sourcedescription
A description of what this resource represents.
This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
name
A human-readable name for this resource.
This can be used by clients to populate UI elements.
size
The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
This can be used by Hosts to display file sizes and estimate context window usage.