File tree 2 files changed +20
-2
lines changed
2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ export const getTools = <TManifest extends AppManifest>(
190
190
191
191
export interface ListToolsResult {
192
192
tools : Tool [ ] ;
193
+ [ key : string ] : unknown ;
193
194
}
194
195
195
196
export type ListToolsMiddleware = RequestMiddleware <
@@ -209,7 +210,7 @@ function registerTools<TManifest extends AppManifest>(
209
210
) {
210
211
// Add map to store slugified names to original names
211
212
let toolNames : null | Map < string , string > = null ;
212
- const loadTools : ListToolsMiddleware = async ( ) : Promise < ListToolsResult > => {
213
+ const loadTools = async ( ) : Promise < ListToolsResult > => {
213
214
toolNames ??= new Map < string , string > ( ) ;
214
215
const meta = await deco . meta ( ) . then ( ( v ) => v ?. value ) ;
215
216
if ( ! meta ) return { tools : [ ] } ;
@@ -237,7 +238,7 @@ function registerTools<TManifest extends AppManifest>(
237
238
} ) ;
238
239
// Use the original name from the map when invoking
239
240
if ( ! toolNames ) {
240
- await loadTools ( { request : { } } ) ;
241
+ await loadTools ( ) ;
241
242
}
242
243
const originalName = toolNames ! . get ( req . params . name ) ;
243
244
if ( ! originalName ) {
You can’t perform that action at this time.
0 commit comments