- fix `lib/mcp-ruby` auto-import path - implement server resources - add basic listing of resources to Server - allow setting handlers on Server - wrap handler method results - make tool definition more declarative - make prompt definition more declarative - bump dependency versions
18 lines
351 B
Ruby
18 lines
351 B
Ruby
# typed: strict
|
|
# frozen_string_literal: true
|
|
|
|
module ModelContextProtocol
|
|
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
|