Handle a server notification received during request/response.
(&self, notif: JsonRpcNotification)
| 491 | |
| 492 | /// Handle a server notification received during request/response. |
| 493 | async fn handle_notification(&self, notif: JsonRpcNotification) { |
| 494 | match notif.method.as_str() { |
| 495 | "notifications/tools/list_changed" => { |
| 496 | tracing::info!( |
| 497 | server = %self.server_name, |
| 498 | "MCP server tools changed, flagging for reload" |
| 499 | ); |
| 500 | self.tools_changed.store(true, Ordering::SeqCst); |
| 501 | } |
| 502 | "notifications/resources/list_changed" => { |
| 503 | tracing::debug!( |
| 504 | server = %self.server_name, |
| 505 | "MCP server resources changed (not yet handled)" |
| 506 | ); |
| 507 | } |
| 508 | "notifications/prompts/list_changed" => { |
| 509 | tracing::debug!( |
| 510 | server = %self.server_name, |
| 511 | "MCP server prompts changed (not yet handled)" |
| 512 | ); |
| 513 | } |
| 514 | other => { |
| 515 | tracing::debug!( |
| 516 | server = %self.server_name, |
| 517 | method = other, |
| 518 | "Unhandled MCP notification" |
| 519 | ); |
| 520 | } |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | fn is_progress_notification(notif: &JsonRpcNotification) -> bool { |
| 525 | notif.method == "notifications/progress" || notif.method == "$/progress" |
no test coverage detected