You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,7 @@ The server provides three notification methods:
113
113
-`notify_tools_list_changed` - Send a notification when the tools list changes
114
114
-`notify_prompts_list_changed` - Send a notification when the prompts list changes
115
115
-`notify_resources_list_changed` - Send a notification when the resources list changes
116
+
-`notify_log_message` - Send a structured logging notification message
116
117
117
118
#### Notification Format
118
119
@@ -121,6 +122,28 @@ Notifications follow the JSON-RPC 2.0 specification and use these method names:
121
122
-`notifications/tools/list_changed`
122
123
-`notifications/prompts/list_changed`
123
124
-`notifications/resources/list_changed`
125
+
-`notifications/message`
126
+
127
+
#### Notification Logging Message Flow
128
+
129
+
The `notifications/message` notification is used for structured logging between client and server.
130
+
131
+
1.**Client sends logging configuration**: The client first sends a `logging/setLevel` request to configure the desired log level.
132
+
2.**Server processes and notifies**: Upon receiving the log level configuration, the server uses `notify_log_message` to send log messages at the configured level and higher priority levels.For example, if "error" is configured, the server can send "error", "critical", "alert", and "emergency" messages. Please refer to `lib/mcp/logging_message_notification.rb` for log priorities in details.
0 commit comments