mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-17 23:53:24 +02:00
fix: add proper TypeScript types to search_files handler
This commit is contained in:
@@ -167,9 +167,9 @@ const server = new Server(
|
|||||||
search_files: {
|
search_files: {
|
||||||
description: "Recursively search for files/directories with optional exclude patterns",
|
description: "Recursively search for files/directories with optional exclude patterns",
|
||||||
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
|
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
|
||||||
handler: async ({ path: searchPath, pattern, excludePatterns }) => {
|
handler: async (args: z.infer<typeof SearchFilesArgsSchema>) => {
|
||||||
const validatedPath = await validatePath(searchPath);
|
const validatedPath = await validatePath(args.path);
|
||||||
return searchFiles(validatedPath, pattern, excludePatterns);
|
return searchFiles(validatedPath, args.pattern, args.excludePatterns);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user