Package io.modelcontextprotocol.spec
Record Class McpSchema.ClientCapabilities
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.ClientCapabilities
- Record Components:
experimental- Experimental, non-standard capabilities that the client supportsroots- Present if the client supports listing rootssampling- Present if the client supports sampling from an LLMelicitation- Present if the client supports elicitation from the server
- Enclosing class:
- McpSchema
public static record McpSchema.ClientCapabilities(Map<String,Object> experimental, McpSchema.ClientCapabilities.RootCapabilities roots, McpSchema.ClientCapabilities.Sampling sampling, McpSchema.ClientCapabilities.Elicitation elicitation)
extends Record
Capabilities a client may support. Known capabilities are defined here, in this
schema, but this is not a closed set: any client can define its own, additional
capabilities.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final recordProvides a standardized way for servers to request additional information from users through the client during interactions.static final recordPresent if the client supports listing roots.static final recordProvides a standardized way for servers to request LLM sampling ("completions" or "generations") from language models via clients. -
Constructor Summary
ConstructorsConstructorDescriptionClientCapabilities(Map<String, Object> experimental, McpSchema.ClientCapabilities.RootCapabilities roots, McpSchema.ClientCapabilities.Sampling sampling, McpSchema.ClientCapabilities.Elicitation elicitation) Creates an instance of aClientCapabilitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns the value of theelicitationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexperimentalrecord component.final inthashCode()Returns a hash code value for this object.roots()Returns the value of therootsrecord component.sampling()Returns the value of thesamplingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClientCapabilities
public ClientCapabilities(Map<String, Object> experimental, McpSchema.ClientCapabilities.RootCapabilities roots, McpSchema.ClientCapabilities.Sampling sampling, McpSchema.ClientCapabilities.Elicitation elicitation) Creates an instance of aClientCapabilitiesrecord class.- Parameters:
experimental- the value for theexperimentalrecord componentroots- the value for therootsrecord componentsampling- the value for thesamplingrecord componentelicitation- the value for theelicitationrecord component
-
-
Method Details
-
builder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
experimental
Returns the value of theexperimentalrecord component.- Returns:
- the value of the
experimentalrecord component
-
roots
Returns the value of therootsrecord component.- Returns:
- the value of the
rootsrecord component
-
sampling
Returns the value of thesamplingrecord component.- Returns:
- the value of the
samplingrecord component
-
elicitation
Returns the value of theelicitationrecord component.- Returns:
- the value of the
elicitationrecord component
-