@@ -35,6 +35,16 @@ pub trait McpClient: Sync + Send {
3535 fn client_info ( & self ) -> & InitializeRequestParams ;
3636 fn server_info ( & self ) -> Option < InitializeResult > ;
3737
38+ #[ deprecated( since = "0.2.0" , note = "Use `client_info()` instead." ) ]
39+ fn get_client_info ( & self ) -> & InitializeRequestParams {
40+ self . client_info ( )
41+ }
42+
43+ #[ deprecated( since = "0.2.0" , note = "Use `server_info()` instead." ) ]
44+ fn get_server_info ( & self ) -> Option < InitializeResult > {
45+ self . server_info ( )
46+ }
47+
3848 /// Checks whether the server has been initialized with client
3949 fn is_initialized ( & self ) -> bool {
4050 self . server_info ( ) . is_some ( )
@@ -47,12 +57,23 @@ pub trait McpClient: Sync + Send {
4757 . map ( |server_details| server_details. server_info )
4858 }
4959
60+ #[ deprecated( since = "0.2.0" , note = "Use `server_version()` instead." ) ]
61+ fn get_server_version ( & self ) -> Option < Implementation > {
62+ self . server_info ( )
63+ . map ( |server_details| server_details. server_info )
64+ }
65+
5066 /// Returns the server's capabilities.
5167 /// After initialization has completed, this will be populated with the server's reported capabilities.
5268 fn server_capabilities ( & self ) -> Option < ServerCapabilities > {
5369 self . server_info ( ) . map ( |item| item. capabilities )
5470 }
5571
72+ #[ deprecated( since = "0.2.0" , note = "Use `server_capabilities()` instead." ) ]
73+ fn get_server_capabilities ( & self ) -> Option < ServerCapabilities > {
74+ self . server_info ( ) . map ( |item| item. capabilities )
75+ }
76+
5677 /// Checks if the server has tools available.
5778 ///
5879 /// This function retrieves the server information and checks if the
@@ -135,6 +156,10 @@ pub trait McpClient: Sync + Send {
135156 self . server_info ( )
136157 . map ( |server_details| server_details. capabilities . logging . is_some ( ) )
137158 }
159+ #[ deprecated( since = "0.2.0" , note = "Use `instructions()` instead." ) ]
160+ fn get_instructions ( & self ) -> Option < String > {
161+ self . server_info ( ) ?. instructions
162+ }
138163
139164 fn instructions ( & self ) -> Option < String > {
140165 self . server_info ( ) ?. instructions
@@ -216,7 +241,7 @@ pub trait McpClient: Sync + Send {
216241 Ok ( response. try_into ( ) ?)
217242 }
218243
219- async fn prompt (
244+ async fn get_prompt (
220245 & self ,
221246 params : GetPromptRequestParams ,
222247 ) -> SdkResult < rust_mcp_schema:: GetPromptResult > {
0 commit comments