Module: RubyLLM::MCP::Native::Messages::Notifications
- Extended by:
- Helpers
- Defined in:
- lib/ruby_llm/mcp/native/messages/notifications.rb
Overview
Notification message builders Notifications do not have IDs and do not expect responses
Class Method Summary collapse
- .cancelled(request_id:, reason:) ⇒ Object
- .elicitation_complete(elicitation_id:) ⇒ Object
- .initialized ⇒ Object
- .roots_list_changed ⇒ Object
- .tasks_status(task:) ⇒ Object
Methods included from Helpers
add_cursor, add_progress_token, format_completion_context, generate_id
Class Method Details
.cancelled(request_id:, reason:) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby_llm/mcp/native/messages/notifications.rb', line 21 def cancelled(request_id:, reason:) { jsonrpc: JSONRPC_VERSION, method: METHOD_NOTIFICATION_CANCELLED, params: { requestId: request_id, reason: reason } } end |
.elicitation_complete(elicitation_id:) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lib/ruby_llm/mcp/native/messages/notifications.rb', line 47 def elicitation_complete(elicitation_id:) { jsonrpc: JSONRPC_VERSION, method: METHOD_NOTIFICATION_ELICITATION_COMPLETE, params: { elicitationId: elicitation_id } } end |
.initialized ⇒ Object
14 15 16 17 18 19 |
# File 'lib/ruby_llm/mcp/native/messages/notifications.rb', line 14 def initialized { jsonrpc: JSONRPC_VERSION, method: METHOD_NOTIFICATION_INITIALIZED } end |
.roots_list_changed ⇒ Object
32 33 34 35 36 37 |
# File 'lib/ruby_llm/mcp/native/messages/notifications.rb', line 32 def roots_list_changed { jsonrpc: JSONRPC_VERSION, method: METHOD_NOTIFICATION_ROOTS_LIST_CHANGED } end |
.tasks_status(task:) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/ruby_llm/mcp/native/messages/notifications.rb', line 39 def tasks_status(task:) { jsonrpc: JSONRPC_VERSION, method: METHOD_NOTIFICATION_TASKS_STATUS, params: task } end |