Record Class McpServerCapabilities
java.lang.Object
java.lang.Record
org.ek9lang.mcp.model.McpServerCapabilities
public record McpServerCapabilities(McpServerCapabilities.ToolsCapability tools, McpServerCapabilities.ResourcesCapability resources)
extends Record
Declares what the MCP server supports.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResources capability marker.static final recordTools capability marker. -
Constructor Summary
ConstructorsConstructorDescriptionMcpServerCapabilities(McpServerCapabilities.ToolsCapability tools, McpServerCapabilities.ResourcesCapability resources) Creates an instance of aMcpServerCapabilitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic McpServerCapabilitiesdefaults()Default capabilities: tools and resources enabled.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theresourcesrecord component.tools()Returns the value of thetoolsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
McpServerCapabilities
public McpServerCapabilities(McpServerCapabilities.ToolsCapability tools, McpServerCapabilities.ResourcesCapability resources) Creates an instance of aMcpServerCapabilitiesrecord class.- Parameters:
tools- the value for thetoolsrecord componentresources- the value for theresourcesrecord component
-
-
Method Details
-
defaults
Default capabilities: tools and resources enabled. -
toString
-
hashCode
-
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). -
tools
Returns the value of thetoolsrecord component.- Returns:
- the value of the
toolsrecord component
-
resources
Returns the value of theresourcesrecord component.- Returns:
- the value of the
resourcesrecord component
-