ruby-sdk/lib/mcp/content.rb
Koichi ITO b626425521 Remove useless magic comment
This PR removes useless magic comment.
2025-09-15 12:33:09 +09:00

32 lines
644 B
Ruby

# frozen_string_literal: true
module MCP
module Content
class Text
attr_reader :text, :annotations
def initialize(text, annotations: nil)
@text = text
@annotations = annotations
end
def to_h
{ text:, annotations:, type: "text" }.compact
end
end
class Image
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:, mime_type:, annotations:, type: "image" }.compact
end
end
end
end