Class: ActionMCP::Server::JsonRpcHandler

Inherits:
JsonRpcHandlerBase show all
Includes:
ErrorAware, ErrorHandling, Handlers::LoggingHandler, Handlers::PromptHandler, Handlers::ResourceHandler, Handlers::TaskHandler, Handlers::ToolHandler
Defined in:
lib/action_mcp/server/json_rpc_handler.rb

Instance Attribute Summary

Attributes inherited from JsonRpcHandlerBase

#transport

Instance Method Summary collapse

Methods included from Handlers::TaskHandler

#process_tasks

Methods included from Handlers::LoggingHandler

#handle_logging_set_level

Methods included from Handlers::PromptHandler

#process_prompts

Methods included from Handlers::ToolHandler

#process_tools

Methods included from Handlers::ResourceHandler

#process_resources

Methods inherited from JsonRpcHandlerBase

#initialize

Constructor Details

This class inherits a constructor from ActionMCP::JsonRpcHandlerBase

Instance Method Details

#call(request) ⇒ Object

Handle server-specific methods

Parameters:

  • request (JSON_RPC::Request, JSON_RPC::Notification, JSON_RPC::Response)


16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/action_mcp/server/json_rpc_handler.rb', line 16

def call(request)
  read(request.to_h)

  case request
  when JSON_RPC::Request
    handle_request(request)
  when JSON_RPC::Notification
    handle_notification(request)
  when JSON_RPC::Response
    handle_response(request)
  end
end