An MCP content block: text, image, audio, resource link, or embedded resource.
Build with the constructors:
Content.text("hello")
Content.image(binary, "image/png")
Content.audio(binary, "audio/wav")
Content.resource_link("file:///a.txt", name: "a.txt")
Content.embedded_resource("config://app", text: "{}", mime_type: "application/json")
Summary
Functions
Audio content. data is the raw binary; it is base64-encoded on the wire.
Embedded resource content. Pass text: for text resources or blob: (raw
binary, base64-encoded on the wire) for binary resources.
Image content. data is the raw binary; it is base64-encoded on the wire.
Types
@type content_type() :: :text | :image | :audio | :resource_link | :resource
@type t() :: %Noizu.MCP.Types.Content{ annotations: map() | nil, data: binary() | nil, description: String.t() | nil, meta: map() | nil, mime_type: String.t() | nil, name: String.t() | nil, resource: map() | nil, text: String.t() | nil, title: String.t() | nil, type: content_type(), uri: String.t() | nil }
Functions
Audio content. data is the raw binary; it is base64-encoded on the wire.
Embedded resource content. Pass text: for text resources or blob: (raw
binary, base64-encoded on the wire) for binary resources.
Image content. data is the raw binary; it is base64-encoded on the wire.