@@ -360,7 +360,7 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
360
360
// async fn #tool_tool_call(context: rmcp::handler::server::tool::ToolCallContext<'_, Self>)
361
361
// -> std::result::Result<rmcp::model::CallToolResult, rmcp::Error>
362
362
//
363
- // and the block part shoule be like:
363
+ // and the block part should be like:
364
364
// {
365
365
// use rmcp::handler::server::tool::*;
366
366
// let (t0, context) = <T0>::from_tool_call_context_part(context)?;
@@ -383,8 +383,8 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
383
383
// for receiver type, name it as __rmcp_tool_receiver
384
384
let is_async = input_fn. sig . asyncness . is_some ( ) ;
385
385
let receiver_ident = || Ident :: new ( "__rmcp_tool_receiver" , proc_macro2:: Span :: call_site ( ) ) ;
386
- // generate the extraction part for trival args
387
- let trival_args = input_fn
386
+ // generate the extraction part for trivial args
387
+ let trivial_args = input_fn
388
388
. sig
389
389
. inputs
390
390
. iter ( )
@@ -413,8 +413,8 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
413
413
Some ( line)
414
414
}
415
415
} ) ;
416
- let trival_argrextraction_part = quote ! {
417
- #( #trival_args ) *
416
+ let trivial_argrextraction_part = quote ! {
417
+ #( #trivial_args ) *
418
418
} ;
419
419
let processed_argrextraction_part = match & mut tool_macro_attrs. params {
420
420
ToolParams :: Aggregated { rust_type } => {
@@ -441,7 +441,7 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
441
441
}
442
442
} ;
443
443
// generate the execution part
444
- // has reveiver ?
444
+ // has receiver ?
445
445
let params = & input_fn
446
446
. sig
447
447
. inputs
@@ -487,7 +487,7 @@ pub(crate) fn tool_fn_item(attr: TokenStream, mut input_fn: ItemFn) -> syn::Resu
487
487
#raw_fn_vis async fn #tool_call_fn_ident( context: rmcp:: handler:: server:: tool:: ToolCallContext <' _, Self >)
488
488
-> std:: result:: Result <rmcp:: model:: CallToolResult , rmcp:: Error > {
489
489
use rmcp:: handler:: server:: tool:: * ;
490
- #trival_argrextraction_part
490
+ #trivial_argrextraction_part
491
491
#processed_argrextraction_part
492
492
#call
493
493
}
0 commit comments