Class McpToolRegistration.OperationHandlerStage<A>
java.lang.Object
com.soklet.McpToolRegistration.OperationHandlerStage<A>
- Type Parameters:
A- argument type
- Enclosing class:
McpToolRegistration<A>
@NotThreadSafe
public static final class McpToolRegistration.OperationHandlerStage<A>
extends Object
Handler-selection stage for the advanced operation-result path.
This path does not statically require Tasks because a handler may choose
an inline result. A handler that conditionally creates a task must first
check McpInvocationFeatures.getTaskCreationContext(). To declare that every
invocation requires Tasks while retaining a typed eventual output schema,
use McpToolRegistration.CompleteHandlerStage.operationHandler(McpToolHandler).
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionhandler(@NonNull McpToolHandler<@NonNull A> handler) Supplies the required advanced handler.
-
Method Details
-
handler
public @NonNull McpToolRegistration.OperationBuilder<@NonNull A> handler(@NonNull McpToolHandler<@NonNull A> handler) Supplies the required advanced handler.This dynamic path is not preflighted as task-required. Before creating durable work, a handler that may return
McpTaskCreatedResultmust require or inspectMcpInvocationFeatures.getTaskCreationContext().- Parameters:
handler- advanced handler- Returns:
- optional-metadata builder
-