Class WireClientContext
java.lang.Object
dev.tachyonmcp.core.server.session.WireClientContext
- All Implemented Interfaces:
ClientContext,ElicitationService,SamplingService
@InternalApi
public final class WireClientContext
extends Object
implements ClientContext, ElicitationService, SamplingService
Adapts
InteractionContext.sendRequest(String, Object) into the typed ElicitationService/SamplingService surface, building wire-shaped params and parsing raw
JSON responses back into domain types.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(ElicitationRequest request) Sends an elicitation request to the client and returns a future completed with the user's response.createMessage(Args params) Sends asampling/createMessagerequest to the client and returns a future completed with the raw result.Returns the elicitation service for requesting additional information from the user.sampling()Returns the sampling service for requesting an LLM completion from the client.
-
Constructor Details
-
WireClientContext
-
-
Method Details
-
elicitation
Description copied from interface:ClientContextReturns the elicitation service for requesting additional information from the user.- Specified by:
elicitationin interfaceClientContext- Returns:
- the elicitation service
-
sampling
Description copied from interface:ClientContextReturns the sampling service for requesting an LLM completion from the client.- Specified by:
samplingin interfaceClientContext- Returns:
- the sampling service
-
create
Description copied from interface:ElicitationServiceSends an elicitation request to the client and returns a future completed with the user's response.- Specified by:
createin interfaceElicitationService- Parameters:
request- the elicitation request- Returns:
- a future that completes with the client's response
-
createMessage
Description copied from interface:SamplingServiceSends asampling/createMessagerequest to the client and returns a future completed with the raw result.- Specified by:
createMessagein interfaceSamplingService- Parameters:
params- the request parameters, matchingCreateMessageRequestParams- Returns:
- a future that completes with the client's result
-