Class McpCompleteResult.Builder
java.lang.Object
com.soklet.McpCompleteResult.Builder
- Enclosing class:
McpCompleteResult
Mutable builder for an immutable complete result.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionbuild()metadata(@NonNull McpJsonObject metadata) Replaces application-owned result metadata.payload(@NonNull McpCompletePayload payload) Replaces the operation-specific payload.
-
Method Details
-
payload
Replaces the operation-specific payload.- Parameters:
payload- complete tool, prompt, or resource output- Returns:
- this builder
-
metadata
Replaces application-owned result metadata. Metadata is out-of-band data, not a confidential channel: hosts may log or forward it. Application authorization and redaction remain necessary.- Parameters:
metadata- immutable metadata without reserved MCP keys- Returns:
- this builder
- Throws:
NullPointerException- ifmetadatais nullIllegalArgumentException- if metadata uses a reserved MCP key
-
build
- Returns:
- immutable snapshot of the current payload and metadata
-