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
24
lib/model_context_protocol/resource_template.rb
Normal file
24
lib/model_context_protocol/resource_template.rb
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module ModelContextProtocol
|
||||
class ResourceTemplate
|
||||
attr_reader :uri_template, :name, :description, :mime_type
|
||||
|
||||
def initialize(uri_template:, name:, description: nil, mime_type: nil)
|
||||
@uri_template = uri_template
|
||||
@name = name
|
||||
@description = description
|
||||
@mime_type = mime_type
|
||||
end
|
||||
|
||||
def to_h
|
||||
{
|
||||
uriTemplate: @uri_template,
|
||||
name: @name,
|
||||
description: @description,
|
||||
mimeType: @mime_type,
|
||||
}.compact
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue