- 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
18 lines
336 B
Ruby
18 lines
336 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ModelContextProtocol
|
|
class Tool
|
|
class Response
|
|
attr_reader :content, :is_error
|
|
|
|
def initialize(content, is_error = false)
|
|
@content = content
|
|
@is_error = is_error
|
|
end
|
|
|
|
def to_h
|
|
{ content:, isError: is_error }.compact
|
|
end
|
|
end
|
|
end
|
|
end
|