Record Class McpSchema.CreateMessageResult

java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.CreateMessageResult
Record Components:
role - The role of the message sender (typically assistant)
content - The content of the sampled message
model - The name of the model that generated the message
stopReason - The reason why sampling stopped, if known
meta - See specification for notes on _meta usage
All Implemented Interfaces:
McpSchema.Meta, McpSchema.Result
Enclosing class:
McpSchema

public static record McpSchema.CreateMessageResult(McpSchema.Role role, McpSchema.Content content, String model, McpSchema.CreateMessageResult.StopReason stopReason, Map<String,Object> meta) extends Record implements McpSchema.Result
The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.