fix!: remove server_info from DiscoverResult (#1065)
Fixes https://github.com/modelcontextprotocol/rust-sdk/issues/1064 Replaces https://github.com/modelcontextprotocol/rust-sdk/pull/1044 This removes the `server_info` field which is not part of the spec: https://modelcontextprotocol.io/specification/draft/schema#discoverresult.
This commit is contained in:
parent
e54c2220af
commit
9a41811a66
1 changed files with 373 additions and 155 deletions
|
|
@ -163,7 +163,10 @@ async fn test_stdio_transport(records: u32) -> Result<()> {
|
|||
// Initialize
|
||||
let server_info = service.peer_info();
|
||||
if let Some(info) = server_info {
|
||||
tracing::info!("Connected to server: {:?}", info.server_info.name);
|
||||
tracing::info!(
|
||||
"Connected to server: {:?}",
|
||||
info.server_info.as_ref().map(|server| &server.name)
|
||||
);
|
||||
}
|
||||
|
||||
// List tools
|
||||
|
|
@ -214,7 +217,10 @@ async fn test_http_transport(http_url: &str, records: u32) -> Result<()> {
|
|||
// Initialize
|
||||
let server_info = client.peer_info();
|
||||
if let Some(info) = server_info {
|
||||
tracing::info!("Connected to server: {:?}", info.server_info.name);
|
||||
tracing::info!(
|
||||
"Connected to server: {:?}",
|
||||
info.server_info.as_ref().map(|server| &server.name)
|
||||
);
|
||||
}
|
||||
|
||||
// List tools
|
||||
|
|
|
|||
Loading…
Reference in a new issue