diff --git a/src/filesystem/index.ts b/src/filesystem/index.ts index 8507043b..b1eaf6a7 100644 --- a/src/filesystem/index.ts +++ b/src/filesystem/index.ts @@ -163,7 +163,16 @@ const server = new Server( }, { capabilities: { - tools: {}, + tools: { + 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); + }, + }, + }, }, }, );