@@ -19,7 +19,7 @@ pub struct FunctionListResult {
19
19
#[ derive( Deserialize , JsonSchema ) ]
20
20
pub struct ListFunctionsRequest {
21
21
#[ schemars( description = "Optional function name to filter the list. Supports wildcard patterns (*, ?)" ) ]
22
- pub function_name : Option < String > ,
22
+ pub function_filter : Option < String > ,
23
23
}
24
24
25
25
#[ tool_router( router = list_dsc_functions_router, vis = "pub" ) ]
@@ -34,13 +34,13 @@ impl McpServer {
34
34
open_world_hint = true ,
35
35
)
36
36
) ]
37
- pub async fn list_dsc_functions ( & self , Parameters ( ListFunctionsRequest { function_name } ) : Parameters < ListFunctionsRequest > ) -> Result < Json < FunctionListResult > , McpError > {
37
+ pub async fn list_dsc_functions ( & self , Parameters ( ListFunctionsRequest { function_filter } ) : Parameters < ListFunctionsRequest > ) -> Result < Json < FunctionListResult > , McpError > {
38
38
let result = task:: spawn_blocking ( move || {
39
39
let function_dispatcher = FunctionDispatcher :: new ( ) ;
40
40
let mut functions = function_dispatcher. list ( ) ;
41
41
42
- // apply filtering if function_name is provided
43
- if let Some ( name_pattern) = function_name {
42
+ // apply filtering if function_filter is provided
43
+ if let Some ( name_pattern) = function_filter {
44
44
let regex_str = convert_wildcard_to_regex ( & name_pattern) ;
45
45
let mut regex_builder = RegexBuilder :: new ( & regex_str) ;
46
46
regex_builder. case_insensitive ( true ) ;
0 commit comments