Class McpAudioContent

java.lang.Object
com.soklet.McpAudioContent
All Implemented Interfaces:
McpContentBlock

@ThreadSafe public final class McpAudioContent extends Object implements McpContentBlock
Immutable binary audio MCP content block.

The MIME type is validated as an ASCII type/subtype with optional parameters, using the same syntax parser as MCP Apps. Malformed syntax, controls, non-ASCII characters, and duplicate parameter names are rejected. Its spelling is retained; Soklet does not inspect the bytes or check whether a particular client supports the declared format.

The built-in server can send at most 786,432 raw bytes per binary content item: Base64 encoding must fit the 1,048,576-character JSON string limit. The complete response must also fit the 4 MiB UTF-8 JSON limit. Construction defensively copies data but does not prevalidate the eventual response size. Prefer McpResourceLink for larger payloads.

Author:
Mark Allen