Interface ResourceLink

All Superinterfaces:
ContentBlock, MetaCarrier

public non-sealed interface ResourceLink extends ContentBlock
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:
  • 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

      Optional<String> description()
      A description of the linked resource. May be used to help the LLM's understanding of available resources
      Returns:
      the resource description
    • mimeType

      Optional<String> 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

      static ResourceLink.Builder builder(String name, String uri)
      Creates a new builder for a ResourceLink
      Parameters:
      name - the name of the link
      uri - the URI of the target resource
      Returns:
      the resource link builder