Package io.modelcontextprotocol.spec
Record Class McpSchema.EmbeddedResource
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.EmbeddedResource
- Record Components:
annotations- Optional annotations for the clientresource- The resource contents that are embeddedmeta- See specification for notes on _meta usage
- All Implemented Interfaces:
McpSchema.Annotated,McpSchema.Content,McpSchema.Meta
- Enclosing class:
- McpSchema
public static record McpSchema.EmbeddedResource(McpSchema.Annotations annotations, McpSchema.ResourceContents resource, Map<String,Object> meta)
extends Record
implements McpSchema.Annotated, McpSchema.Content
The contents of a resource, embedded into a prompt or tool call result.
It is up to the client how best to render embedded resources for the benefit of the
LLM and/or the user.
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedResource(McpSchema.Annotations annotations, McpSchema.ResourceContents resource) EmbeddedResource(McpSchema.Annotations annotations, McpSchema.ResourceContents resource, Map<String, Object> meta) Creates an instance of aEmbeddedResourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.meta()Returns the value of themetarecord component.resource()Returns the value of theresourcerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.modelcontextprotocol.spec.McpSchema.Content
type
-
Constructor Details
-
EmbeddedResource
-
EmbeddedResource
public EmbeddedResource(McpSchema.Annotations annotations, McpSchema.ResourceContents resource, Map<String, Object> meta) Creates an instance of aEmbeddedResourcerecord class.- Parameters:
annotations- the value for theannotationsrecord componentresource- the value for theresourcerecord componentmeta- the value for themetarecord component
-
-
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). -
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceMcpSchema.Annotated- Returns:
- the value of the
annotationsrecord component
-
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
meta
Returns the value of themetarecord component.- Specified by:
metain interfaceMcpSchema.Meta- Returns:
- the value of the
metarecord component - See Also:
-
- Specification for notes on _meta usage
-