class
MCProtocol::Resource
- MCProtocol::Resource
- Reference
- Object
Overview
A known resource that the server is capable of reading.
Included Modules
- JSON::Serializable
Defined in:
mcprotocol/resource.crConstructors
- .new(name : String, uri : URI, annotations : ResourceAnnotations | Nil = Nil, description : String | Nil = Nil, mimeType : String | Nil = Nil, size : Int64 | Nil = Nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
- #annotations : ResourceAnnotations | Nil
-
#description : String | Nil
A description of what this resource represents.
-
#mimeType : String | Nil
The MIME type of this resource, if known.
-
#name : String
A human-readable name for this resource.
-
#size : Int64 | Nil
The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
-
#uri : URI
The URI of this resource.
Constructor Detail
Instance Method Detail
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.
A human-readable name for this resource.
This can be used by clients to populate UI elements.
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.