Class: RubyMCP::Handlers
- Inherits:
-
Object
- Object
- RubyMCP::Handlers
- Defined in:
- lib/ruby_mcp/handlers.rb
Defined Under Namespace
Classes: CompletionComplete, Initialize, LoggingSetLevel, NotificationsInitialized, Ping, PromptsGet, PromptsList, ResourcesList, ResourcesRead
Class Method Summary collapse
Class Method Details
.parse(json) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ruby_mcp/handlers.rb', line 3 def self.parse(json) parsed = JSON.parse(json) case parsed.fetch("method") when "initialize" Initialize when "notifications/initialized" NotificationsInitialized when "ping" Ping when "prompts/get" PromptsGet when "prompts/list" PromptsList when "completion/complete" CompletionComplete when "resources/list" ResourcesList when "resources/read" ResourcesRead when "logging/setLevel" LoggingSetLevel end.new end |