Record Class McpServerInfo
java.lang.Object
java.lang.Record
dev.langchain4j.mcp.client.McpServerInfo
- Record Components:
name- the server's programmatic name, for example"filesystem-server"version- the server's own version, unrelated to the MCP protocol versiontitle- an optional human-readable name meant for display, if the server provides one
public record McpServerInfo(String name, @Nullable String version, @Nullable String title)
extends Record
Identifies the MCP server: who it is and which version of it is running.
A server reports this while the client connects to it, and the client passes it on
through
McpDiscoverResult.serverInfo().-
Constructor Summary
ConstructorsConstructorDescriptionMcpServerInfo(String name, @Nullable String version, @Nullable String title) Creates an instance of aMcpServerInforecord 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.@Nullable Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringversion()Returns the value of theversionrecord component.
-
Constructor Details
-
McpServerInfo
-
-
Method Details
-
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). -
name
-
version
-
title
-