Class McpInputRequest
input_required result.
The declaration connects the emitted request to the capability and
registration metadata that permits it. Applications should reuse a
declaration registered through the operation's
inputRequestDeclarations
configuration. For a durable task, Soklet includes those declarations in
the task origin for the application to persist, then validates that
relationship before it emits the containing task snapshot.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic @NonNull McpInputRequestfromDeclaration(@NonNull McpInputRequestDeclaration declaration, @NonNull McpJsonObject params) Creates an input request from its registered declaration.Returns the declared client request method.inthashCode()matchesInputResponse(@NonNull McpJsonValue inputResponse) Reports whether a client response matches this request's declared MCP input-response union branch.toString()
-
Method Details
-
fromDeclaration
public static @NonNull McpInputRequest fromDeclaration(@NonNull McpInputRequestDeclaration declaration, @NonNull McpJsonObject params) Creates an input request from its registered declaration.- Parameters:
declaration- registered input-request declarationparams- method-specific request parameters- Returns:
- immutable input request
- Throws:
NullPointerException- if an argument is null
-
getDeclaration
- Returns:
- registered input-request declaration
-
getParams
- Returns:
- method-specific request parameters
-
getJsonRpcMethod
Returns the declared client request method.- Returns:
- client JSON-RPC request method
-
matchesInputResponse
Reports whether a client response matches this request's declared MCP input-response union branch.This validates the protocol-level response shape for the declaration. It does not validate accepted elicitation content against this request's requested schema or against application-specific policy. Content values may be strings, numbers (including decimals), booleans, or arrays of strings. Numbers retain their exact
BigDecimalvalues and must satisfy Soklet's production JSON number limits. Matching does not require a number to be integral, even when the requested schema declares an integer field; the application must validate that schema.- Parameters:
inputResponse- client response to inspect- Returns:
- whether the response matches the declared MCP union branch
- Throws:
NullPointerException- ifinputResponseis null
-
equals
-
hashCode
-
toString
-