@@ -97,6 +97,7 @@ function groupTools(
9797) : ToolGroup [ ] {
9898 const groups : ToolGroup [ ] = [ ] ;
9999 const packageMap = new Map < string , Tool [ ] > ( ) ;
100+ const functionMap = new Map < string , Tool [ ] > ( ) ;
100101 const functionTools : Tool [ ] = [ ] ;
101102 const customTools : Tool [ ] = [ ] ;
102103 const higherOrderTools : Tool [ ] = [ ] ;
@@ -128,8 +129,8 @@ function groupTools(
128129 }
129130
130131 if ( groupKey ) {
131- const existing = packageMap . get ( groupKey ) || [ ] ;
132- packageMap . set ( groupKey , [ ...existing , tool ] ) ;
132+ const existing = functionMap . get ( groupKey ) || [ ] ;
133+ functionMap . set ( groupKey , [ ...existing , tool ] ) ;
133134 } else {
134135 // Function tools without a source go to the generic functions group
135136 functionTools . push ( tool ) ;
@@ -151,6 +152,17 @@ function groupTools(
151152 } ) ;
152153 } ) ;
153154
155+ // Add function groups
156+ functionMap . forEach ( ( tools , functionName ) => {
157+ groups . push ( {
158+ type : "function" ,
159+ icon : "square-function" ,
160+ title : functionName ,
161+ tools,
162+ packageName : functionName ,
163+ } ) ;
164+ } ) ;
165+
154166 // Add function tools group
155167 if ( functionTools . length > 0 ) {
156168 groups . push ( {
0 commit comments