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
@@ -111,6 +111,7 @@ The server provides three notification methods:
111
111
-`notify_tools_list_changed` - Send a notification when the tools list changes
112
112
-`notify_prompts_list_changed` - Send a notification when the prompts list changes
113
113
-`notify_resources_list_changed` - Send a notification when the resources list changes
114
+
-`notify_log_message` - Send a structured logging notification message
114
115
115
116
#### Notification Format
116
117
@@ -119,6 +120,28 @@ Notifications follow the JSON-RPC 2.0 specification and use these method names:
119
120
-`notifications/tools/list_changed`
120
121
-`notifications/prompts/list_changed`
121
122
-`notifications/resources/list_changed`
123
+
-`notifications/message`
124
+
125
+
#### Notification Logging Message Flow
126
+
127
+
The `notifications/message` notification is used for structured logging between client and server.
128
+
129
+
1.**Client sends logging configuration**: The client first sends a `logging/setLevel` request to configure the desired log level.
130
+
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