Class TextResourceContents

java.lang.Object
org.apache.juneau.bean.mcp.v20250618.TextResourceContents
All Implemented Interfaces:
ResourceContents

@Marshalled(typeName="resourceText") public class TextResourceContents extends Object implements ResourceContents
Text body for resources/read results or embedded resource content.

Discriminator type value is resourceText to avoid colliding with TextContent's MCP wire value text in the same JSON-RPC payload.

  • Constructor Details

  • Method Details

    • getUri

      public String getUri()
      Resource URI.
      Returns:
      The URI, or null if not set.
    • setUri

      Sets the resource URI.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • getMimeType

      public String getMimeType()
      Optional MIME type.
      Returns:
      The MIME type, or null if not set.
    • setMimeType

      Sets the MIME type.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • getText

      public String getText()
      UTF-8 text body.
      Returns:
      The text, or null if not set.
    • setText

      Sets the text body.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).