Package io.modelcontextprotocol.spec
Record Class McpSchema.Implementation
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.Implementation
- Record Components:
name- Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).title- Intended for UI and end-user contextsversion- The version of the implementation.
- All Implemented Interfaces:
McpSchema.BaseMetadata
- Enclosing class:
- McpSchema
public static record McpSchema.Implementation(String name, String title, String version)
extends Record
implements McpSchema.BaseMetadata
Describes the name and version of an MCP implementation, with an optional title for
UI representation.
-
Constructor Summary
ConstructorsConstructorDescriptionImplementation(String name, String version) Implementation(String name, String title, String version) Creates an instance of aImplementationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceMcpSchema.BaseMetadata- Returns:
- the value of the
namerecord component
-
title
Returns the value of thetitlerecord component.- Specified by:
titlein interfaceMcpSchema.BaseMetadata- Returns:
- the value of the
titlerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-