Class PromptMessage
- Namespace
- ModelContextProtocol.Protocol.Types
- Assembly
- ModelContextProtocol.dll
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.
See the schema for details
public class PromptMessage
- Inheritance
-
PromptMessage
- Inherited Members
- Extension Methods
Properties
Content
The content of the message. Any of TextContent, ImageContent, EmbeddedResource.
[JsonPropertyName("content")]
public Content Content { get; set; }
Property Value
Role
The role of the message ("user" or "assistant").
[JsonPropertyName("role")]
public Role Role { get; set; }