Class McpInputRequiredSignal
- All Implemented Interfaces:
Serializable
call/get/read body to signal that it needs more input
before it can complete (MCP 2026-07-28 SEP-2322 Multi-Round-Trip Requests).
Caught (and turned into an input_required result) only on the three MRTR-wired in-scope paths:
McpRevision's callTool/getPrompt/readResource-exact-resource branches. Any other
handler path is not MRTR-wired — the resource-template handler, a completion/complete
completer, and the list/discover/ping paths all run outside those try/catch blocks. A signal thrown from one of
them is not caught here; it propagates to McpRevision.dispatch(org.apache.juneau.rest.server.mcp.McpExchange, org.apache.juneau.rest.server.mcp.McpServerConfig, org.apache.juneau.commons.inject.BeanStore)'s generic error branch and surfaces as the
-32603 internal-error fail-safe (a misuse outcome, not an input_required result). This is the
spec's Open item #4: MRTR engages by construction only for the three scoped seams, so an out-of-scope pause is a
handler bug the fail-safe contains rather than a supported flow.
Deliberately not an McpException: it is not itself a JSON-RPC
error, it is an internal dispatch-control signal that gets turned into a successful input_required
result.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMcpInputRequiredSignal(Map<String, Object> inputRequests, Object continuation) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionThe handler-opaque continuation.The requested inputs.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
McpInputRequiredSignal
Constructor.- Parameters:
inputRequests- Server-assigned-id-keyed map of requested inputs. Must not benull or empty. Each value must be a sub-request object (Map, per the pinned schema); it is carried to the wire byte-for-byte (a non-map value is a handler bug the dispatcher's-32603fail-safe contains).continuation- Handler-opaque continuation value. Can benull if the handler needs no state carried between rounds beyond the original request itself.- Throws:
IllegalArgumentException- IfinputRequestsisnull or empty.
-
-
Method Details
-
getInputRequests
The requested inputs.- Returns:
- The map. Never
null or empty.
-
getContinuation
The handler-opaque continuation.- Returns:
- The continuation, or
null if the handler supplied none.
-