McpServer.Tool.Content.Audio (HTTP MCP Server v0.9.0)
View SourceRepresents audio content in a tool result.
The audio data is stored as-is (not base64-encoded in the struct). Base64 encoding happens during JSON serialization.
Fields
data- The raw binary audio data (required)mime_type- The MIME type of the audio (required, e.g., "audio/wav", "audio/mpeg", "audio/ogg")
Examples
iex> audio_data = <<0, 1, 2, 3>>
iex> audio = McpServer.Tool.Content.Audio.new(data: audio_data, mime_type: "audio/wav")
iex> audio.mime_type
"audio/wav"
Summary
Types
Functions
Creates a new Audio content struct.
Parameters
opts- Keyword list with required:dataand:mime_typefields
Examples
iex> audio_data = <<0, 1, 2, 3>>
iex> McpServer.Tool.Content.Audio.new(data: audio_data, mime_type: "audio/wav")
%McpServer.Tool.Content.Audio{data: <<0, 1, 2, 3>>, mime_type: "audio/wav"}