Record Class SyncModernElicitationSpecification
java.lang.Object
java.lang.Record
org.springframework.ai.mcp.annotation.method.elicitation.SyncModernElicitationSpecification
- Record Components:
clients- the names of the connections the handler answers forform- whether the handler answers form elicitation requestsurl- whether the handler answers URL elicitation requestselicitationHandler- the handler, which takes and returns the modern schema types. Its second argument is the tool context of the tool call that the request belongs to, ornullif there is none
public record SyncModernElicitationSpecification(String[] clients, boolean form, boolean url, BiFunction<io.modelcontextprotocol.modern.McpSchema.ElicitRequest,@Nullable ToolContext,io.modelcontextprotocol.modern.McpSchema.ElicitResult> elicitationHandler)
extends Record
An elicitation handler for the connections that speak the 2026-07-28 ("modern") MCP
revision, the counterpart of
SyncElicitationSpecification.- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionSyncModernElicitationSpecification(String[] clients, boolean form, boolean url, BiFunction<io.modelcontextprotocol.modern.McpSchema.ElicitRequest, @Nullable ToolContext, io.modelcontextprotocol.modern.McpSchema.ElicitResult> elicitationHandler) Creates an instance of aSyncModernElicitationSpecificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionString[]clients()Returns the value of theclientsrecord component.BiFunction<io.modelcontextprotocol.modern.McpSchema.ElicitRequest,@Nullable ToolContext, io.modelcontextprotocol.modern.McpSchema.ElicitResult> Returns the value of theelicitationHandlerrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanform()Returns the value of theformrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.booleanurl()Returns the value of theurlrecord component.
-
Constructor Details
-
SyncModernElicitationSpecification
public SyncModernElicitationSpecification(String[] clients, boolean form, boolean url, BiFunction<io.modelcontextprotocol.modern.McpSchema.ElicitRequest, @Nullable ToolContext, io.modelcontextprotocol.modern.McpSchema.ElicitResult> elicitationHandler) Creates an instance of aSyncModernElicitationSpecificationrecord class.- Parameters:
clients- the value for theclientsrecord componentform- the value for theformrecord componenturl- the value for theurlrecord componentelicitationHandler- the value for theelicitationHandlerrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
clients
Returns the value of theclientsrecord component.- Returns:
- the value of the
clientsrecord component
-
form
public boolean form()Returns the value of theformrecord component.- Returns:
- the value of the
formrecord component
-
url
public boolean url()Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
elicitationHandler
public BiFunction<io.modelcontextprotocol.modern.McpSchema.ElicitRequest,@Nullable ToolContext, elicitationHandler()io.modelcontextprotocol.modern.McpSchema.ElicitResult> Returns the value of theelicitationHandlerrecord component.- Returns:
- the value of the
elicitationHandlerrecord component
-