class

MCP::Shared::Protocol

Inherits Reference < Object

Constants

Log = ::Log.for(self)

Constructors

new(options : ProtocolOptions | Nil = nil)
Source

Instance methods

assert_capability_for_method(method : String)
Source
assert_notification_capability(method : String)
Source
assert_request_handler_capability(method : String)
Source
close
Source
connect(transport : Transport)
Source
fallback_notification_handler
Source
fallback_notification_handler=(fallback_notification_handler : JSONRPCNotification -> | Nil)
Source
fallback_request_handler
Source
fallback_request_handler=(fallback_request_handler : JSONRPCRequest, RequestHandlerExtra -> Result | Nil | Nil)
Source
notification(notification : JSONRPCNotification)
Source
notification_handler(method : String, &block : MCP::Protocol::Notification | Nil -> )
Source
on_close
Source
on_error(error : Exception)
Source
remove_notification_handler(method : String)
Source
remove_request_handler(method : String)
Source
request(request : JSONRPCRequest, options : RequestOptions | Nil = nil) : Result

ameba:disable Metrics/CyclomaticComplexity

Source
request_handler(method : String, &block : RequestParams, RequestHandlerExtra -> Result | Nil)
Source
transport
Source
transport=(transport : Transport | Nil)
Source