Package io.modelcontextprotocol.spec
Record Class McpSchema.Icon
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.Icon
- Record Components:
src- A URI pointing to an icon resource or a base64-encoded data URI.mimeType- Optional MIME type override if the server's MIME type is missing or generic.sizes- Optional array of strings specifying sizes at which the icon can be used. Each string should be in WxH format (e.g., "48x48", "96x96") or "any" for scalable formats like SVG.theme- Optional specifier for the theme this icon is designed for. "light" indicates the icon is designed for a light background, "dark" indicates the icon is designed for a dark background. If not provided, the client should assume the icon can be used with any theme.
- Enclosing class:
- McpSchema
public static record McpSchema.Icon(String src, String mimeType, List<String> sizes, String theme)
extends Record
Represents an icon that can be displayed in a user interface.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic McpSchema.Icon.Builderfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mimeType()Returns the value of themimeTyperecord component.sizes()Returns the value of thesizesrecord component.src()Returns the value of thesrcrecord component.theme()Returns the value of thethemerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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). -
src
Returns the value of thesrcrecord component.- Returns:
- the value of the
srcrecord component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-
sizes
Returns the value of thesizesrecord component.- Returns:
- the value of the
sizesrecord component
-
theme
Returns the value of thethemerecord component.- Returns:
- the value of the
themerecord component
-