Internal Release 0.2.0
- 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
This commit is contained in:
parent
a4df3b8688
commit
6004f42573
1 changed files with 708 additions and 164 deletions
18
lib/model_context_protocol/resource/embedded.rb
Normal file
18
lib/model_context_protocol/resource/embedded.rb
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# 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
|
||||
Loading…
Reference in a new issue