ruby-sdk/lib/mcp/resource/embedded.rb
2025-05-29 17:11:40 -04:00

18 lines
334 B
Ruby

# typed: strict
# frozen_string_literal: true
module MCP
class Resource
class Embedded
attr_reader :resource, :annotations
def initialize(resource:, annotations: nil)
@annotations = annotations
end
def to_h
{ resource: resource.to_h, annotations: }.compact
end
end
end
end