Interface ResourceContents

All Superinterfaces:
HasMeta
All Known Subinterfaces:
BlobResourceContents, TextResourceContents

public sealed interface ResourceContents extends HasMeta permits TextResourceContents, BlobResourceContents
The actual content of a resource, either text or binary.

Both variants share a uri, mimeType, and meta. The sealed hierarchy lets resource registries and mappers handle each variant explicitly.

  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    Returns the MIME type of the resource content, or null if unspecified.
    uri()
    Returns the resource URI.

    Methods inherited from interface dev.tachyonmcp.api.server.domain.HasMeta

    meta
  • Method Details

    • uri

      String uri()
      Returns the resource URI.
      Returns:
      the resource identifier
    • mimeType

      @Nullable String mimeType()
      Returns the MIME type of the resource content, or null if unspecified.
      Returns:
      the MIME type, or null