diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index b1eaf6a7..ae0e06cc 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -167,9 +167,9 @@ const server = new Server( search_files: { description: "Recursively search for files/directories with optional exclude patterns", inputSchema: zodToJsonSchema(SearchFilesArgsSchema), - handler: async ({ path: searchPath, pattern, excludePatterns }) => { - const validatedPath = await validatePath(searchPath); - return searchFiles(validatedPath, pattern, excludePatterns); + handler: async (args: z.infer) => { + const validatedPath = await validatePath(args.path); + return searchFiles(validatedPath, args.pattern, args.excludePatterns); }, }, },