addResourceTemplate
Registers a resource template. Clients can discover it via resources/templates/list and read matching URIs via resources/read.
Parameters
The ResourceTemplate describing the URI template pattern.
A suspend function invoked when a client reads a URI that matches the template. The second parameter contains the URI variables extracted from the match.
Throws
If the server does not support resources.
Registers a resource template by constructing a ResourceTemplate from given parameters.
Parameters
The RFC 6570 URI template string (e.g. "file:///{path}").
A human-readable name for the template.
A human-readable description of the resource template.
The MIME type of resource content served by this template.
A suspend function invoked when a client reads a URI that matches the template. The second parameter contains the URI variables extracted from the match.
Throws
If the server does not support resources.