Package org.mcpjava.server.content
Interface ResourceLink
- All Superinterfaces:
ContentBlock,MetaCarrier
Content which links to a resource. Contains information about a resource, including its URI but
not the text or data within the resource.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for creating resource link contents -
Method Summary
Modifier and TypeMethodDescriptionOptional annotations for the clientstatic ResourceLink.BuilderCreates a new builder for aResourceLinkA description of the linked resource.mimeType()The MIME type of the linked resourcename()Returns the name of the resourcesize()The size of the resource content, if knowntitle()Returns a human-friendly name for the resource.uri()The URI of the resourceMethods inherited from interface org.mcpjava.server.MetaCarrier
metadata
-
Method Details
-
name
String name()Returns the name of the resource- Returns:
- the name of the resource
-
title
String title()Returns a human-friendly name for the resource.Defaults to
name()if not set- Returns:
- the human-readable name of the resource
-
uri
String uri()The URI of the resource- Returns:
- the URI
-
description
A description of the linked resource. May be used to help the LLM's understanding of available resources- Returns:
- the resource description
-
mimeType
The MIME type of the linked resource- Returns:
- the MIME type
-
annotations
Optional<Annotations> annotations()Optional annotations for the client- Returns:
- the annotations
-
size
OptionalLong size()The size of the resource content, if known- Returns:
- the size of the resource content in bytes
-
builder
Creates a new builder for aResourceLink- Parameters:
name- the name of the linkuri- the URI of the target resource- Returns:
- the resource link builder
-