PromptMessage

data class PromptMessage(val role: Role, val content: ContentBlock)(source)

Describes a message returned as part of a prompt.

This is similar to SamplingMessage, but also supports the embedding of resources from the MCP server.

Constructors

Link copied to clipboard
constructor(role: Role, content: ContentBlock)

Properties

Link copied to clipboard

The content of the message. Can include text, images, resources, and other content types.

Link copied to clipboard
val role: Role

The role of the message sender (e.g., user, assistant, or system).