add Resource
fun addResource(uri: String, name: String, description: String, mimeType: String = "text/html", readHandler: suspend (ReadResourceRequest) -> ReadResourceResult)(source)
Registers a single resource. The resource content can then be read by the client.
Parameters
uri
The URI of the resource.
name
A human-readable name for the resource.
description
A description of the resource's content.
mime Type
The MIME type of the resource content.
read Handler
A suspend function that returns the resource content when read by the client.
Throws
If the server does not support resources.