Internal Release 0.7.0
- add support for resource templates - improve capability negotiation on handlers - clean up readme - reduce default protocol version to "2024-11-05" - address spec compliance of resources - add debug gem to development - alias ModelContextProtocol to MCP - move prompt subclasses to subdir - improve tool and prompt definition - improve passing of server context to tools - improve tool input schema validation
This commit is contained in:
parent
62184957e0
commit
baeb99ffbc
1 changed files with 842 additions and 253 deletions
|
|
@ -3,14 +3,13 @@
|
|||
|
||||
module ModelContextProtocol
|
||||
class Resource
|
||||
attr_reader :uri, :name, :description, :mime_type, :contents
|
||||
attr_reader :uri, :name, :description, :mime_type
|
||||
|
||||
def initialize(uri:, name:, description:, mime_type:, contents:)
|
||||
def initialize(uri:, name:, description:, mime_type:)
|
||||
@uri = uri
|
||||
@name = name
|
||||
@description = description
|
||||
@mime_type = mime_type
|
||||
@contents = contents
|
||||
end
|
||||
|
||||
def to_h
|
||||
|
|
@ -19,7 +18,6 @@ module ModelContextProtocol
|
|||
name: @name,
|
||||
description: @description,
|
||||
mimeType: @mime_type,
|
||||
contents: @contents.map(&:to_h),
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue