@@ -3089,6 +3089,73 @@ impl ClientRequest {
30893089 }
30903090 }
30913091}
3092+ impl From < & str > for IconTheme {
3093+ fn from ( s : & str ) -> Self {
3094+ match s {
3095+ "dark" => Self :: Dark ,
3096+ "light" => Self :: Light ,
3097+ _ => Self :: Light ,
3098+ }
3099+ }
3100+ }
3101+ impl From < & str > for ElicitResultContent {
3102+ fn from ( value : & str ) -> Self {
3103+ Self :: Primitive ( ElicitResultContentPrimitive :: String ( value. to_string ( ) ) )
3104+ }
3105+ }
3106+ impl From < & str > for ElicitResultContentPrimitive {
3107+ fn from ( value : & str ) -> Self {
3108+ ElicitResultContentPrimitive :: String ( value. to_string ( ) )
3109+ }
3110+ }
3111+ impl From < String > for ElicitResultContentPrimitive {
3112+ fn from ( value : String ) -> Self {
3113+ ElicitResultContentPrimitive :: String ( value)
3114+ }
3115+ }
3116+ impl From < String > for ElicitResultContent {
3117+ fn from ( value : String ) -> Self {
3118+ Self :: Primitive ( ElicitResultContentPrimitive :: String ( value) )
3119+ }
3120+ }
3121+ impl From < Vec < & str > > for ElicitResultContent {
3122+ fn from ( value : Vec < & str > ) -> Self {
3123+ Self :: StringArray ( value. iter ( ) . map ( |v| v. to_string ( ) ) . collect ( ) )
3124+ }
3125+ }
3126+ impl From < i64 > for ElicitResultContent {
3127+ fn from ( value : i64 ) -> Self {
3128+ Self :: Primitive ( value. into ( ) )
3129+ }
3130+ }
3131+ impl CallToolRequestParams {
3132+ pub fn new < T > ( tool_name : T ) -> Self
3133+ where
3134+ T : ToString ,
3135+ {
3136+ Self {
3137+ name : tool_name. to_string ( ) ,
3138+ arguments : None ,
3139+ meta : None ,
3140+ task : None ,
3141+ }
3142+ }
3143+ /// Sets the arguments for the tool call.
3144+ pub fn with_arguments ( mut self , arguments : serde_json:: Map < String , Value > ) -> Self {
3145+ self . arguments = Some ( arguments) ;
3146+ self
3147+ }
3148+ /// Assigns metadata to the CallToolRequestParams, enabling the inclusion of extra context or details.
3149+ pub fn with_meta ( mut self , meta : CallToolMeta ) -> Self {
3150+ self . meta = Some ( meta) ;
3151+ self
3152+ }
3153+ /// Set task metadata , requesting task-augmented execution for this request
3154+ pub fn with_task ( mut self , task : TaskMetadata ) -> Self {
3155+ self . task = Some ( task) ;
3156+ self
3157+ }
3158+ }
30923159/// END AUTO GENERATED
30933160#[ cfg( test) ]
30943161mod tests {
0 commit comments