#[non_exhaustive]pub enum ServerNotification {
Progress(ProgressParams),
LogMessage(LoggingMessageParams),
ResourceUpdated {
uri: String,
},
ResourcesListChanged,
ToolsListChanged,
PromptsListChanged,
TaskStatusChanged(TaskStatusParams),
FinalTaskStatusChanged(TaskStatusNotificationParams),
SubscriptionAcknowledged {
subscription_id: RequestId,
notifications: SubscriptionFilter,
},
Subscription {
subscription_id: RequestId,
notification: Box<ServerNotification>,
},
SubscriptionCancelled {
subscription_id: RequestId,
reason: Option<String>,
},
Unknown {
method: String,
params: Option<Value>,
},
}Expand description
Notification sent from the server to the client.
These correspond to the notifications/ methods defined in the MCP spec
that flow from server to client.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Progress(ProgressParams)
Progress update for a request (notifications/progress).
LogMessage(LoggingMessageParams)
Log message (notifications/message).
ResourceUpdated
A subscribed resource has been updated (notifications/resources/updated).
ResourcesListChanged
The list of available resources has changed.
ToolsListChanged
The list of available tools has changed.
PromptsListChanged
The list of available prompts has changed.
TaskStatusChanged(TaskStatusParams)
A legacy task changed status (notifications/tasks).
FinalTaskStatusChanged(TaskStatusNotificationParams)
A final-protocol task changed status (notifications/tasks).
SubscriptionAcknowledged
The server acknowledged a subscriptions/listen stream.
Fields
notifications: SubscriptionFilterSubset of the requested filter the server agreed to honor.
Subscription
A notification delivered on a subscriptions/listen stream.
Fields
notification: Box<ServerNotification>The ordinary notification carried by this subscription.
SubscriptionCancelled
The server cancelled an active subscription.
Fields
Unknown
An unknown or unrecognized notification.
Trait Implementations§
Source§impl Clone for ServerNotification
impl Clone for ServerNotification
Source§fn clone(&self) -> ServerNotification
fn clone(&self) -> ServerNotification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more