ResourceLink

data class ResourceLink(val name: String, val uri: String, val title: String? = null, val size: Long? = null, val mimeType: String? = null, val icons: List<Icon>? = null, val description: String? = null, val annotations: Annotations? = null, val meta: JsonObject? = null) : ContentBlock, ResourceLike(source)

A resource that the server is capable of reading, included in a prompt or tool call result.

Note: resource links returned by tools are not guaranteed to appear in the results of resources/list requests.

Constructors

Link copied to clipboard
constructor(name: String, uri: String, title: String? = null, size: Long? = null, mimeType: String? = null, icons: List<Icon>? = null, description: String? = null, annotations: Annotations? = null, meta: JsonObject? = null)

Properties

Link copied to clipboard
open val _meta: JsonObject
Link copied to clipboard

Optional annotations for the client.

Link copied to clipboard

A description of what this resource represents.

Link copied to clipboard
val icons: List<Icon>?

Optional set of sized icons that clients can display in their user interface. See Icon for supported formats and requirements.

Link copied to clipboard
@SerialName(value = "_meta")
open override val meta: JsonObject?

property/parameter is reserved by MCP to allow clients and servers to attach additional metadata to their interactions.

Link copied to clipboard

The MIME type of this resource, if known.

Link copied to clipboard

Intended for programmatic or logical use but used as a display name in past specs or fallback (if the title isn’t present).

Link copied to clipboard
val size: Long?

The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.

Link copied to clipboard

Intended for UI and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology.

Link copied to clipboard
open override val type: ContentTypes
Link copied to clipboard
val uri: String

The URI of this resource.