Record Class McpServerCapabilities
java.lang.Object
java.lang.Record
com.github.thought2code.mcp.annotated.configuration.McpServerCapabilities
public record McpServerCapabilities(Boolean resource, Boolean subscribeResource, Boolean prompt, Boolean tool, Boolean completion)
extends Record
This record represents the capabilities of an MCP (Model Context Protocol) server.
- Author:
- codeboyzhou
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class forMcpServerCapabilities. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new instance ofBuilderto buildMcpServerCapabilities.Returns the value of thecompletionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.prompt()Returns the value of thepromptrecord component.resource()Returns the value of theresourcerecord component.Returns the value of thesubscribeResourcerecord component.tool()Returns the value of thetoolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpServerCapabilities
public McpServerCapabilities(Boolean resource, Boolean subscribeResource, Boolean prompt, Boolean tool, Boolean completion) Creates an instance of aMcpServerCapabilitiesrecord class.- Parameters:
resource- the value for theresourcerecord componentsubscribeResource- the value for thesubscribeResourcerecord componentprompt- the value for thepromptrecord componenttool- the value for thetoolrecord componentcompletion- the value for thecompletionrecord component
-
-
Method Details
-
builder
Creates a new instance ofBuilderto buildMcpServerCapabilities.- Returns:
- A new instance of
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). -
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
subscribeResource
Returns the value of thesubscribeResourcerecord component.- Returns:
- the value of the
subscribeResourcerecord component
-
prompt
Returns the value of thepromptrecord component.- Returns:
- the value of the
promptrecord component
-
tool
Returns the value of thetoolrecord component.- Returns:
- the value of the
toolrecord component
-
completion
Returns the value of thecompletionrecord component.- Returns:
- the value of the
completionrecord component
-