class ActionController::MCPServer::Session

Overview

the state of an MCP client connection

Defined in:

action-controller/mcp/session.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(protocol_version : String, bound : Hash(String, String) = {} of String => String) #

[View source]

Instance Method Detail

def bound : Hash(String, String) #

the path params bound from an endpoint URL, a session can only be used at that URL


[View source]
def close(toolbox : String) : Bool #

returns false if the toolbox was not open


[View source]
def expired?(timeout : Time::Span) : Bool #

[View source]
def id : String #

[View source]
def last_seen : Time #

[View source]
def notifications : Channel(String) #

server to client messages awaiting delivery via the GET event stream


[View source]
def notify(message : String) : Nil #

queues a message for the event stream, dropped if the queue is full


[View source]
def open(toolbox : String) : Bool #

returns false if the toolbox was already open


[View source]
def open?(toolbox : String) : Bool #

[View source]
def open_toolboxes : Array(String) #

[View source]
def protocol_version : String #

[View source]
def terminate : Nil #

[View source]
def touch : Nil #

[View source]