Merge pull request #243 from koic/add_content_audio

Add `Content::Audio` class for audio content type
This commit is contained in:
Koichi ITO 2026-03-02 01:30:20 +09:00 • committed by GitHub
commit 2fc4f5e1d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,5 +28,19 @@ module MCP
{ data: data, mimeType: mime_type, annotations: annotations, type: "image" }.compact
end
end
class Audio
attr_reader :data, :mime_type, :annotations
def initialize(data, mime_type, annotations: nil)
@data = data
@mime_type = mime_type
@annotations = annotations
end
def to_h
{ data: data, mimeType: mime_type, annotations: annotations, type: "audio" }.compact
end
end
end
end