JustAMCPResource
Inherits: RefCounted < Object
Inherited By: JustAMCPResourceProjectFile, JustAMCPResourceSystemLogs
Base class for resources exposed through the MCP resource API.
Description
JustAMCPResource defines the interface used by JustAMCPResourceExecutor. Subclasses describe either a fixed URI or URI template and return MCP-compatible content dictionaries when that URI is read.
var resource = JustAMCPResourceProjectFile.new()
print(resource.get_uri())
print(resource.is_template())
Tutorials
Methods
get_name() const |
|
get_schema() const |
|
get_uri() const |
|
is_template() const |
|
read_resource(uri: String) |
Method Descriptions
Returns the human-readable resource name displayed to MCP clients.
Dictionary get_schema() const 🔗
Returns this resource's MCP schema dictionary. Fixed resources use uri; templated resources use uriTemplate.
Returns the fixed URI or URI template handled by this resource.
Returns true when this resource handles a URI template rather than one fixed URI.
Dictionary read_resource(uri: String) 🔗
Reads uri and returns an MCP-compatible contents dictionary or an error dictionary.