Class CreateMessageResult
java.lang.Object
org.apache.juneau.bean.mcp.v20260728.CreateMessageResult
Result payload for "sampling/createMessage" (MCP sampling). Never
dispatched through
McpRevision; see CreateMessageRequest's class Javadoc for the same
plain-POJO/duplex-payload rationale.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe generated content — a single block (text/image/audio/resource).getModel()The model that generated the content.getRole()The generated message's role (real schema restricts this touser/assistant).Why sampling stopped (commonlyendTurn/stopSequence/maxTokens, but the schema also permits arbitrary server-defined strings, so this stays a plainString).setContent(Content value) Sets the content.Sets the model name.Sets the role.setStopReason(String value) Sets the stop reason.
-
Constructor Details
-
CreateMessageResult
public CreateMessageResult()
-
-
Method Details
-
getRole
The generated message's role (real schema restricts this touser/assistant).- Returns:
- The role, or
nullif not set.
-
setRole
Sets the role.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getContent
The generated content — a single block (text/image/audio/resource).- Returns:
- The content, or
nullif not set.
-
setContent
Sets the content.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getModel
The model that generated the content.- Returns:
- The model name, or
nullif not set.
-
setModel
Sets the model name.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getStopReason
Why sampling stopped (commonlyendTurn/stopSequence/maxTokens, but the schema also permits arbitrary server-defined strings, so this stays a plainString).- Returns:
- The stop reason, or
nullif not set.
-
setStopReason
Sets the stop reason.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-